Skip to content

Commit 8d4b6d6

Browse files
committed
Make default PlotPoints 200 for vectorized plot
1 parent 6a3892f commit 8d4b6d6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

mathics/builtin/drawing/plot.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
# Set option such as $UseVectorizedPlot, and maybe a non-standard Plot3D option.
6161
# For now an env variable is simplest.
6262
# TODO: work out exactly how to deploy.
63-
if os.getenv("MATHICS3_USE_VECTORIZED_PLOT", False):
63+
use_vectorized_plot = os.getenv("MATHICS3_USE_VECTORIZED_PLOT", False)
64+
if use_vectorized_plot:
6465
from mathics.eval.drawing.plot3d_vectorized import eval_DensityPlot, eval_Plot3D
6566
else:
6667
from mathics.eval.drawing.plot3d import eval_DensityPlot, eval_Plot3D
@@ -489,8 +490,9 @@ def check_plotpoints(steps):
489490
return True
490491
return False
491492

493+
default_plotpoints = (200, 200) if use_vectorized_plot else (7, 7)
492494
if plotpoints == "System`None":
493-
plotpoints = (7, 7)
495+
plotpoints = default_plotpoints
494496
elif check_plotpoints(plotpoints):
495497
plotpoints = (plotpoints, plotpoints)
496498
if not (
@@ -500,7 +502,7 @@ def check_plotpoints(steps):
500502
and check_plotpoints(plotpoints[1])
501503
):
502504
evaluation.message(expr.get_name(), "invpltpts", plotpoints)
503-
plotpoints = (7, 7)
505+
plotpoints = default_plotpoints
504506
self.plotpoints = plotpoints
505507

506508
# MaxRecursion Option

0 commit comments

Comments
 (0)