From ec9336b750af16454e9516fd625d5d7b4ec0dbb4 Mon Sep 17 00:00:00 2001 From: Nikhar Abbas Date: Thu, 8 Oct 2020 11:05:17 -0600 Subject: [PATCH] restructure plotting --- Examples/example_04.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Examples/example_04.py b/Examples/example_04.py index bfe071b5e..c2ecae37c 100644 --- a/Examples/example_04.py +++ b/Examples/example_04.py @@ -42,14 +42,14 @@ file_processing.write_DISCON(turbine,controller,param_file=param_file, txt_filename=path_params['rotor_performance_filename']) # Plot gain schedule -plt.figure(0) -plt.plot(controller.v[len(controller.vs_gain_schedule.Kp):], controller.pc_gain_schedule.Kp) -plt.xlabel('Wind Speed') -plt.ylabel('Proportional Gain') +fig, ax = plt.subplots(1,2,constrained_layout=True) +ax[0].plot(controller.v[len(controller.vs_gain_schedule.Kp):], controller.pc_gain_schedule.Kp) +ax[0].set_xlabel('Wind Speed') +ax[0].set_ylabel('Proportional Gain') -plt.figure(1) -plt.plot(controller.v[len(controller.vs_gain_schedule.Ki):], controller.pc_gain_schedule.Ki) -plt.xlabel('Wind Speed') -plt.ylabel('Integral Gain') +ax[1].plot(controller.v[len(controller.vs_gain_schedule.Ki):], controller.pc_gain_schedule.Ki) +ax[1].set_xlabel('Wind Speed') +ax[1].set_ylabel('Integral Gain') +plt.suptitle('Pitch Controller Gains') plt.show() \ No newline at end of file