Skip to content

Commit 45ee925

Browse files
committed
Merge commit 'refs/pull/36296/head' of github.com:sagemath/sage into yet_more_spkg_conf_for_python
2 parents d002b3f + b7c6367 commit 45ee925

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

src/sage/plot/contour_plot.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,9 +1391,10 @@ def f(x,y):
13911391
raise ValueError("fill=%s is not supported" % options['fill'])
13921392

13931393

1394-
@options(frame=False, axes=True, legend_label=None, aspect_ratio=1)
1395-
def region_plot(f, xrange, yrange, plot_points=100, incol='blue', outcol=None, bordercol=None,
1396-
borderstyle=None, borderwidth=None, alpha=1, **options):
1394+
@options(plot_points=100, incol='blue', outcol=None, bordercol=None,
1395+
borderstyle=None, borderwidth=None, frame=False, axes=True,
1396+
legend_label=None, aspect_ratio=1, alpha=1)
1397+
def region_plot(f, xrange, yrange, **options):
13971398
r"""
13981399
``region_plot`` takes a boolean function of two variables, `f(x, y)`
13991400
and plots the region where f is True over the specified
@@ -1657,6 +1658,14 @@ def region_plot(f, xrange, yrange, plot_points=100, incol='blue', outcol=None, b
16571658
from warnings import warn
16581659
import numpy
16591660

1661+
plot_points = options['plot_points']
1662+
incol = options.pop('incol')
1663+
outcol = options.pop('outcol')
1664+
bordercol = options.pop('bordercol')
1665+
borderstyle = options.pop('borderstyle')
1666+
borderwidth = options.pop('borderwidth')
1667+
alpha = options.pop('alpha')
1668+
16601669
if not isinstance(f, (list, tuple)):
16611670
f = [f]
16621671

@@ -1675,9 +1684,9 @@ def region_plot(f, xrange, yrange, plot_points=100, incol='blue', outcol=None, b
16751684
if neqs and not bordercol:
16761685
bordercol = incol
16771686
if not f:
1678-
return implicit_plot(feqs[0], xrange, yrange, plot_points=plot_points,
1679-
fill=False, linewidth=borderwidth,
1680-
linestyle=borderstyle, color=bordercol, **options)
1687+
return implicit_plot(feqs[0], xrange, yrange, fill=False,
1688+
linewidth=borderwidth, linestyle=borderstyle,
1689+
color=bordercol, **options)
16811690
f_all, ranges = setup_for_eval_on_grid(feqs + f,
16821691
[xrange, yrange],
16831692
plot_points)

0 commit comments

Comments
 (0)