When making a plot,
PlotPoints
or
MaxRecursion
options are used to specify the accuracy or the extent of how detailed the result will be.
Ff either of them do the similar job, I think only one option of the two is enough for the purpose.
Then, why the two are used in Mathematica? What is the fundamental difference between them?
Answer
PlotPoints guarantees a number of points that will be plotted. MaxRecursion states the maximum recursion, which might not be needed or used in a given plot. If I'm plotting a large number of functions—some simple, some complex—then I use MaxRecursion so as to speed the plotting of "simple" graphs.
Moreover, PlotPoints generally places the points equally spaced while MaxRecursion effectively places the extra detail in positions of the plot with rapidly changing function, as is evident in the small-$x$ values in the graph: Plot[Sin[1/x], {x, 0, 1}].
Comments
Post a Comment