Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions src/sage/plot/contour_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,8 +1394,7 @@ def f(x,y):
@options(plot_points=100, incol='blue', outcol=None, bordercol=None,
borderstyle=None, borderwidth=None, frame=False, axes=True,
legend_label=None, aspect_ratio=1, alpha=1)
def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol,
borderstyle, borderwidth, alpha, **options):
def region_plot(f, xrange, yrange, **options):
r"""
``region_plot`` takes a boolean function of two variables, `f(x, y)`
and plots the region where f is True over the specified
Expand Down Expand Up @@ -1659,6 +1658,14 @@ def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol,
from warnings import warn
import numpy

plot_points = options['plot_points']
incol = options.pop('incol')
outcol = options.pop('outcol')
bordercol = options.pop('bordercol')
borderstyle = options.pop('borderstyle')
borderwidth = options.pop('borderwidth')
alpha = options.pop('alpha')

if not isinstance(f, (list, tuple)):
f = [f]

Expand All @@ -1677,9 +1684,9 @@ def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol,
if neqs and not bordercol:
bordercol = incol
if not f:
return implicit_plot(feqs[0], xrange, yrange, plot_points=plot_points,
fill=False, linewidth=borderwidth,
linestyle=borderstyle, color=bordercol, **options)
return implicit_plot(feqs[0], xrange, yrange, fill=False,
linewidth=borderwidth, linestyle=borderstyle,
color=bordercol, **options)
f_all, ranges = setup_for_eval_on_grid(feqs + f,
[xrange, yrange],
plot_points)
Expand Down