Skip to content

Commit

Permalink
Merge branch 'matplotlib-3.8.0' into matplotlib_pillow_update
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Sep 23, 2023
2 parents c32c24b + 92a8a96 commit 86c9580
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sage/plot/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
# ****************************************************************************

import os
from numbers import Integral
from collections.abc import Iterable
from math import isnan
import sage.misc.verbose
Expand Down Expand Up @@ -2874,6 +2875,11 @@ def matplotlib(self, filename=None,
weight=lopts.pop('font_weight', 'medium'),
variant=lopts.pop('font_variant', 'normal'))
color = lopts.pop('back_color', 'white')
if 'loc' in lopts:
loc = lopts['loc']
if isinstance(loc, Integral):
# matplotlib 3.8 doesn't support sage integers
lopts['loc'] = int(loc)
leg = subplot.legend(prop=prop, **lopts)
if leg is None:
from warnings import warn
Expand Down

0 comments on commit 86c9580

Please sign in to comment.