MeshRange is an option for ListPlot3D, ListDensityPlot, ListContourPlot, SurfaceGraphics, DensityGraphics, and ContourGraphics. ListPlot3D, ListDensityPlot, and ListContourPlot are used to plot a matrix of numeric values.  When the default setting (MeshRange→Automatic) is used these functions simply label the resulting tick marks as if the rows and columns of the matrix are numbered 1, 2, 3, ... This is what you get from evaluating the next cell.  These functions can't do any better because there is nothing in the data indicating otherwise.

RowBox[{RowBox[{data, =, RowBox[{Table, [, RowBox[{(x - 35)^2 (y - 70)^2/100, ,, RowBox[{{, Ro ... nsityPlot[data, MeshRangeAutomatic] ; ListContourPlot[data, MeshRangeAutomatic] ;

However, in the case above we know that the rows of data correspond to x values between 30 and 40. Likewise the columns of data correspond to y values between 60 and 80.  In the next cell the MeshRange option is used to ensure the TickMarks are relavent for this data.

ListPlot3D[data, MeshRange {{30, 40}, {60, 80}}] ; ListDensityPlot[data, MeshRange {{30, 40}, {60, 80}}] ; ListContourPlot[data, MeshRange {{30, 40}, {60, 80}}] ;

Created by Mathematica  (May 16, 2004)

Back to Ted’s Tricks index page