Skip to content

Commit

Permalink
Update gliderpy/plotting.py
Browse files Browse the repository at this point in the history
Co-authored-by: Filipe <[email protected]>
  • Loading branch information
FloraSauerbronn and ocefpaf authored Jun 18, 2024
1 parent c8d673a commit ebe0451
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gliderpy/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ def plot_transect(
"""
cmap = kw.get("cmap", None)

if ax is None:
fignums = plt.get_fignums()
if ax is None and not fignums:
fig, ax = plt.subplots(figsize=(17, 2))
elif ax:
fig = ax.get_figure()
else:
fig = ax.figure
ax = plt.gca()
fig = plt.gcf()

cs = ax.scatter(
df.index,
Expand Down

0 comments on commit ebe0451

Please sign in to comment.