Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT: fix env plots legends #440

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions rocketpy/plots/environment_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ def __wind_components(self, ax):
ax.plot(
[self.environment.wind_velocity_x(i) for i in self.grid],
self.grid,
label="Wind U",
label="wind u",
)
ax.plot(
[self.environment.wind_velocity_y(i) for i in self.grid],
self.grid,
label="Wind V",
label="wind v",
)
# ax.legend(loc="best").set_draggable(True)
ax.legend(loc="best")
ax.set_ylabel("Height Above Sea Level (m)")
ax.set_xlabel("Wind Speed (m/s)")
ax.grid(True)
Expand Down Expand Up @@ -221,7 +221,6 @@ def atmospheric_model(self):
# Create wind u and wind v subplot
ax3 = plt.subplot(223)
ax3 = self.__wind_components(ax3)
# ax3.legend(loc="best").set_draggable(True)

# Create pressure and temperature subplot
ax4 = plt.subplot(224)
Expand Down Expand Up @@ -255,7 +254,6 @@ def ensemble_member_comparison(self):
self.grid,
label=i,
)
# ax5.legend(loc='best').set_draggable(True)
ax5.set_ylabel("Height Above Sea Level (m)")
ax5.set_xlabel("Wind Speed (m/s)")
ax5.set_title("Wind U - Ensemble Members")
Expand All @@ -270,7 +268,6 @@ def ensemble_member_comparison(self):
self.grid,
label=i,
)
# ax6.legend(loc='best').set_draggable(True)
ax6.set_ylabel("Height Above Sea Level (m)")
ax6.set_xlabel("Wind Speed (m/s)")
ax6.set_title("Wind V - Ensemble Members")
Expand All @@ -283,7 +280,6 @@ def ensemble_member_comparison(self):
ax7.plot(
[self.environment.wind_speed(i) for i in self.grid], self.grid, label=i
)
# ax7.legend(loc='best').set_draggable(True)
ax7.set_ylabel("Height Above Sea Level (m)")
ax7.set_xlabel("Wind Speed (m/s)")
ax7.set_title("Wind Speed Magnitude - Ensemble Members")
Expand All @@ -298,7 +294,6 @@ def ensemble_member_comparison(self):
self.grid,
label=i,
)
# ax8.legend(loc='best').set_draggable(True)
ax8.set_ylabel("Height Above Sea Level (m)")
ax8.set_xlabel("Degrees True (°)")
ax8.set_title("Wind Direction - Ensemble Members")
Expand All @@ -311,7 +306,6 @@ def ensemble_member_comparison(self):
ax9.plot(
[self.environment.pressure(i) for i in self.grid], self.grid, label=i
)
# ax9.legend(loc='best').set_draggable(True)
ax9.set_ylabel("Height Above Sea Level (m)")
ax9.set_xlabel("Pressure (P)")
ax9.set_title("Pressure - Ensemble Members")
Expand All @@ -324,7 +318,6 @@ def ensemble_member_comparison(self):
ax10.plot(
[self.environment.temperature(i) for i in self.grid], self.grid, label=i
)
# ax10.legend(loc='best').set_draggable(True)
ax10.set_ylabel("Height Above Sea Level (m)")
ax10.set_xlabel("Temperature (K)")
ax10.set_title("Temperature - Ensemble Members")
Expand Down
Loading