Skip to content

Commit 136ef3e

Browse files
MNT: adjust y limits for the most of plots here
1 parent fadada4 commit 136ef3e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

rocketpy/plots/environment_plots.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def __wind(self, ax):
6363
axup.set_xlabel("Wind Direction (°)", color="#1f77b4")
6464
axup.tick_params("x", colors="#1f77b4")
6565
axup.set_xlim(0, 360)
66+
ax.set_ylim(self.grid[0], self.grid[-1])
6667
ax.set_ylabel("Height Above Sea Level (m)")
6768
ax.grid(True)
6869

@@ -98,6 +99,7 @@ def __density_speed_of_sound(self, ax):
9899
)
99100
axup.set_xlabel("Density (kg/m³)", color="#1f77b4")
100101
axup.tick_params("x", colors="#1f77b4")
102+
ax.set_ylim(self.grid[0], self.grid[-1])
101103
ax.set_ylabel("Height Above Sea Level (m)")
102104
ax.grid(True)
103105

@@ -130,6 +132,7 @@ def __wind_components(self, ax):
130132
ax.set_ylabel("Height Above Sea Level (m)")
131133
ax.set_xlabel("Wind Speed (m/s)")
132134
ax.grid(True)
135+
ax.set_ylim(self.grid[0], self.grid[-1])
133136

134137
return ax
135138

@@ -165,6 +168,7 @@ def __pressure_temperature(self, ax):
165168
axup.tick_params("x", colors="#1f77b4")
166169
ax.set_ylabel("Height Above Sea Level (m)")
167170
ax.grid(True)
171+
ax.set_ylim(self.grid[0], self.grid[-1])
168172

169173
return ax
170174

@@ -186,6 +190,7 @@ def gravity_model(self):
186190
ax.set_ylabel("Height Above Sea Level (m)")
187191
ax.set_xlabel("Gravity Acceleration (m/s²)")
188192
ax.grid(True)
193+
ax.set_ylim(self.grid[0], self.grid[-1])
189194
plt.xticks(rotation=45)
190195

191196
plt.show()

0 commit comments

Comments
 (0)