Skip to content

Commit

Permalink
if an ax is not provided, need to get fig from ax
Browse files Browse the repository at this point in the history
  • Loading branch information
adrn committed Feb 14, 2024
1 parent 72480aa commit c4595f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gala/potential/potential/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,8 @@ def plot_rotation_curve(self, R_grid, t=0.0, ax=None, labels=None, **plot_kwargs

if ax is None:
fig, ax = plt.subplots()
else:
fig = ax.figure

if labels is not False:
ax.set_xlabel(labels[0])
Expand Down

0 comments on commit c4595f3

Please sign in to comment.