Getting mathematica to take more points when it plots

Click For Summary
SUMMARY

This discussion addresses the issue of insufficient plot resolution in Mathematica when visualizing complex functions, particularly those involving high-frequency oscillations or numerous terms. Users have identified that adjusting the PlotPoints option can significantly enhance the quality of plots, transforming jagged line segments into smooth curves. For contour plots, similar adjustments are necessary, although the specific parameter may differ. The default low setting for plot points is acknowledged for its efficiency in managing computation time.

PREREQUISITES
  • Familiarity with Mathematica's plotting functions
  • Understanding of the PlotPoints option in Mathematica
  • Knowledge of contour plots and their parameters
  • Basic concepts of function oscillations and interpolation
NEXT STEPS
  • Research how to optimize PlotPoints for various plot types in Mathematica
  • Explore the differences between PlotPoints and other plotting options in Mathematica
  • Learn about interpolation techniques in Mathematica for better plot accuracy
  • Investigate performance trade-offs when increasing plot resolution in Mathematica
USEFUL FOR

Mathematica users, data scientists, and researchers who require high-quality visualizations of complex mathematical functions and want to improve their plotting techniques.

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 5 ·
Replies
5
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K