Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Previous section-----Next section

1.9.7 Converting between Types of Graphics

Contour, density and surface plots are three different ways to display essentially the same information about a function. In all cases, you need the values of a function at a grid of points.

The Mathematica functions ContourPlot, DensityPlot and Plot3D all produce Mathematica graphics objects that include a list of the values of your function on a grid. As a result, having used any one of these functions, Mathematica can easily take its output and use it to produce another type of graphics.

Here is a surface plot.

In[1]:=  Plot3D[BesselJ[nu, 3x], {nu, 0, 3}, {x, 0, 3}]

Out[1]=

This converts the object produced by Plot3D into a contour plot.

In[2]:=  Show[ ContourGraphics[ % ] ]

Out[2]=

Show[ContourGraphics[g]] convert to a contour plot
Show[DensityGraphics[g]] convert to a density plot
Show[SurfaceGraphics[g]] convert to a surface plot
Show[Graphics[g]] convert to a two-dimensional image

Conversions between types of graphics.
You can use GraphicsArray to show different types of graphics together.

In[3]:=  Show[ GraphicsArray[ {%, %%} ] ]

Out[3]=


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: