Mathematica Getting mathematica to take more points when it plots

AI Thread Summary
Mathematica users often encounter issues with plots appearing as connected line segments instead of smooth curves due to insufficient points being used in the plotting process. This problem is exacerbated in high-frequency plots and contour plots, where oscillations can lead to polygon-like representations. To address this, increasing the PlotPoints parameter can significantly enhance the quality of the plots, although it may also increase calculation time. Users have noted that Mathematica defaults to a lower number of points to maintain reasonable computation speeds, adjusting based on the function's range rather than the specified plot range. Properly configuring these settings can greatly improve the visual output of complex functions in Mathematica.
rynlee
Messages
44
Reaction score
0
I've had this problem many times in the past, and haven't thought of a way to fix it.

Sometimes when I plot a function that requires quite a bit of effort on mathematica's part, (for example, one time the function was a sum of about a thousand terms, each of which was multiplied complex terms with my independent variable dependence (in this case time)), when it plots it the plot is correct but for some reason doesn't take enough points, it's not nicely curved as it should be but instead looks like connected line segments. When I have a particularly high frequency plot this is particularly troublesome, as features get washed out sometimes and curves are straightened.

Most recently I am plotting a contour plot where there are oscillations in each of the variables, and mathematica is turning the contour basically into polygons.

Is there a way to get mathematica to use more points when constructing a plot? Is that the source of this grievance?

Thanks for any Advice
 
Physics news on Phys.org
For normal plots its PlotPoints->x, for contour I would have to double check (munching on breakfast atm) but it should be in help under options somewhere (if it is not the same as above)
 
thanks! that really did the trick, I'm amazed at how few points mathematica actually takes. That said I'm glad for its low plot points by default - cranking it up really increases the calculation time, it looks like when PlotPoints is set to automatic, it tries to keep the calculation time reasonable.
 
No worries. Also I've found if you're plotting say an interpolating function which is valid over a given range, it will calculate the number of points to use based on that range rather than the plot range, at least in certain instances.
 

Similar threads

Replies
2
Views
2K
Replies
1
Views
2K
Replies
1
Views
7K
Replies
2
Views
3K
Replies
4
Views
5K
Replies
2
Views
2K
Back
Top