How does Mathematica create contour plots (or density plots)?

More specifically, suppose I want a contour plot (with maybe 10 contour

lines) or a density plot of a function that has just one primary peak

located somewhere in an otherwise vast and featureless (i.e., flat)

plane with value z=0. (Or maybe a narrow ridge running diagonally

across the plane.) But:

* I don't know in advance where this peak is -- or, it moves with

time, and I want to make multiple plots and follow its motion.

* The function it represents is somewhat costly to calculate.

* And I'd like to get a moderately detailed (but maybe not super

resolved) portrayal of the substructure within that peak.

* And all this with reasonably fast response (e.g., inside a

Manipulate).

To obtain this, does Mathematica have to calculate a cast array of

finely spaced pixel values covering the entire plane, then derive the

contours from this?

Or does it use some kind of smart algorithm that does a (random?) search

for non-zero points, then rapidly homes in on areas of interest?

Or, is there some way I can help it find the regions of interest?

It would help to have a specific case, but you might try to use the

MaxRecursion option instead of increasing PlotPoints too much. You might

also try the PerformanceGoal option. Maybe you could compute the location of

the peak before using graphics.

David Park

XXXX@XXXXX.COM

http://www.yqcomputer.com/ ~djmpark/

From: AES [mailto: XXXX@XXXXX.COM ]

How does Mathematica create contour plots (or density plots)?

More specifically, suppose I want a contour plot (with maybe 10 contour

lines) or a density plot of a function that has just one primary peak

located somewhere in an otherwise vast and featureless (i.e., flat)

plane with value z=0. (Or maybe a narrow ridge running diagonally

across the plane.) But:

* I don't know in advance where this peak is -- or, it moves with

time, and I want to make multiple plots and follow its motion.

* The function it represents is somewhat costly to calculate.

* And I'd like to get a moderately detailed (but maybe not super

resolved) portrayal of the substructure within that peak.

* And all this with reasonably fast response (e.g., inside a

Manipulate).

To obtain this, does Mathematica have to calculate a cast array of

finely spaced pixel values covering the entire plane, then derive the

contours from this?

Or does it use some kind of smart algorithm that does a (random?) search

for non-zero points, then rapidly homes in on areas of interest?

Or, is there some way I can help it find the regions of interest?

MaxRecursion option instead of increasing PlotPoints too much. You might

also try the PerformanceGoal option. Maybe you could compute the location of

the peak before using graphics.

David Park

XXXX@XXXXX.COM

http://www.yqcomputer.com/ ~djmpark/

From: AES [mailto: XXXX@XXXXX.COM ]

How does Mathematica create contour plots (or density plots)?

More specifically, suppose I want a contour plot (with maybe 10 contour

lines) or a density plot of a function that has just one primary peak

located somewhere in an otherwise vast and featureless (i.e., flat)

plane with value z=0. (Or maybe a narrow ridge running diagonally

across the plane.) But:

* I don't know in advance where this peak is -- or, it moves with

time, and I want to make multiple plots and follow its motion.

* The function it represents is somewhat costly to calculate.

* And I'd like to get a moderately detailed (but maybe not super

resolved) portrayal of the substructure within that peak.

* And all this with reasonably fast response (e.g., inside a

Manipulate).

To obtain this, does Mathematica have to calculate a cast array of

finely spaced pixel values covering the entire plane, then derive the

contours from this?

Or does it use some kind of smart algorithm that does a (random?) search

for non-zero points, then rapidly homes in on areas of interest?

Or, is there some way I can help it find the regions of interest?

1. Plot contour plots on 2D planes of 3D plot

2. Contour Plot / Plot Range / Contour Scaling

3. Plotting copula density contour

4. 2D scatter plot with density contour line,

6. How to plot a log-log domain plot of power spectral density

7. Creating a plot with line plot and scatter plot in the same figure

8. Matlab Contour Plot with Absolute Colors instead of relative per plot

9. plotting points over contour plot / graph transparency

10. plotting a matrix into a contour plot

11. Moving the contour plot with the surfc plot fu

12. merge contour plots and line plots

13. Plotting 3D points on 2D-contour plots with colors indicating z values

14. 3d plot with multiple 2d plot contours

15. Plotting things at the base of a contour plot

2 post • Page:**1** of **1**