Skip to content

Commit 6cfe3d2

Browse files
committed
Rever maxrecursion default. Revise comments.
1 parent 2349d81 commit 6cfe3d2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

mathics/builtin/drawing/plot.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,15 @@ def eval(self, functions, x, start, stop, evaluation: Evaluation, options: dict)
280280
# MaxRecursion Option
281281
max_recursion_limit = 15
282282
maxrecursion_option = self.get_option(options, "MaxRecursion", evaluation)
283-
# Old default was 3. Bruce Lucas observes that
284-
# 0 using more points is faster and gives better results.
285-
maxrecursion = 0
283+
284+
# Investigate whether the maxrecursion value is optimal. Bruce
285+
# Lucas observes that in some cases, using more points and
286+
# decreasing recursion is faster and gives better results.
287+
# Note that the tradeoff may be different for Plot versus
288+
# Plot3D. Recursive subdivision in Plot3D is probably a lot
289+
# harder.
290+
maxrecursion = 3
291+
286292
try:
287293
if maxrecursion_option is not SymbolAutomatic:
288294
maxrecursion = maxrecursion_option.to_python()

0 commit comments

Comments
 (0)