Skip to content

Commit

Permalink
infuriatingly python3.6 doesn't have the {x,y}label options implement…
Browse files Browse the repository at this point in the history
…ed correctly
  • Loading branch information
williamjameshandley committed Aug 15, 2022
1 parent 0015cdc commit 0a1b54c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions anesthetic/samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def plot_1d(self, axes, *args, **kwargs):
xlabel = self.tex[x] if x in self.tex else x
self[x].plot(ax=ax, xlabel=xlabel,
*args, **kwargs)
ax.set_xlabel(xlabel)
else:
ax.plot([], [])

Expand Down Expand Up @@ -248,9 +249,12 @@ def plot_2d(self, axes, *args, **kwargs):
if x == y:
self[x].plot(ax=ax.twin, xlabel=xlabel,
*args, **lkwargs)
ax.set_xlabel(xlabel)
else:
self.plot(x, y, ax=ax, xlabel=xlabel,
ylabel=ylabel, *args, **lkwargs)
ax.set_xlabel(xlabel)
ax.set_ylabel(ylabel)
else:
if x == y:
ax.twin.plot([], [])
Expand Down

0 comments on commit 0a1b54c

Please sign in to comment.