Skip to content

Commit

Permalink
fixing matplotlib deprecation warning in plot() replicate#562
Browse files Browse the repository at this point in the history
Signed-off-by: Enoch Kan <[email protected]>
  • Loading branch information
enochkan committed Mar 15, 2021
1 parent 9c69afa commit b57c578
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/keepsake/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,7 @@ def plot(self, metric: Optional[str] = None, logy=False):

if metric is None:
metric = self.primary_metric()

plotted_label = plt.axes().yaxis.get_label().get_text() or metric
plotted_label = plt.gca().get_ylabel() or metric

if metric != plotted_label:
plt.figure()
Expand Down

0 comments on commit b57c578

Please sign in to comment.