Skip to content

Commit

Permalink
chore: Proper axis labels for standard plots
Browse files Browse the repository at this point in the history
  • Loading branch information
iwishiwasaneagle committed Apr 5, 2023
1 parent f6c03aa commit 585d2d3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/jdrones/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,18 @@ def plot_standard(
(Default = :code:`True`)
"""
fig = plt.figure(figsize=figsize)

ax = fig.add_subplot(221, projection="3d")
plot_3d_path(df, ax)

for ind, states in (
(222, ("x", "y", "z")),
(223, ("vx", "vy", "vz")),
(224, ("phi", "theta", "psi")),
for ind, states, label in (
(222, ("x", "y", "z"), "position (m)"),
(223, ("vx", "vy", "vz"), "velocity (m/s)"),
(224, ("phi", "theta", "psi"), "angular position (rad)"),
):
ax = fig.add_subplot(ind)
plot_states_over_time(df, states, ax)
ax.set_ylabel(label)
ax.legend()

fig.tight_layout()
Expand Down

0 comments on commit 585d2d3

Please sign in to comment.