listdensityplot - Maple Help

Home : Support : Online Help : Graphics : Packages : plots : listdensityplot

plots

 listdensityplot
 two-dimensional density plotting of data

 Calling Sequence listdensityplot(A, options)

Parameters

 A - grid of data to be plotted options - (optional) options for the plot

Description

 • The listdensityplot creates a density plot of the given grid of data. The data may be input as a list of lists of real numbers, or a matrix of real numbers.  In a density plot, the color of each cell depicts the numerical value of the cell.  By default, each cell is assigned a gray level from black (smallest value) to white (the largest value) as the value of the cell increases.
 • Any additional arguments are interpreted as options which are specified as equations of the form option = value. They may be either of the two options described below or any valid option for a 2-D plot.  See the help page for plot[options].
 • The option smooth=false or smooth=true is used to specify whether smooth shading should be used to display the density plot. By default, the value is false, which provides a plot of cells with discrete colors, and produces one cell for each value. If set to true, the data is interpreted to be a sampling of a function, where the samples now correspond to the corners of each cell (instead of the center), and smooth shading is used to draw the density plot. This means that for 5x5 data, smooth=false will produce a plot with 25 discretely colored cells, and smooth=true will produce a plot with 16 smoothly shaded cells.
 • The option colorstyle=RGB and colorstyle=HUE specify that color is to be used instead. For colorstyle=RGB, the red intensity increases with the x-axis, the green intensity increases with the y-axis, and the blue intensity is specified by the input values. For colorstyle=HUE, the density plot is displayed with respect to the HUE values.
 • The option range=a..b where a and b are real constants specifies that the data is to be interpreted as being in the range a..b when intensity values are assigned. By default the minimum data value and the maximum data value in A are used. If this option is used, and data values in A are outside of the range a..b, they will be truncated to the given range.
 • A call to listdensityplot produces a PLOT data structure, which is then displayed.  For information on this data structure see the plot/structure help page.

Examples

 > $\mathrm{with}\left(\mathrm{plots}\right):$
 > $\mathrm{points}≔\left[\mathrm{seq}\left(\left[\mathrm{seq}\left(\mathrm{exp}\left(-\frac{{x}^{2}+{y}^{2}}{100}\right),x=-10.0..10.0\right)\right],y=-10.0..10.0\right)\right]:$
 > $\mathrm{listdensityplot}\left(\mathrm{points}\right)$
 > $\mathrm{min}\left(\mathrm{op}\left(\mathrm{map}\left(\mathrm{op},\mathrm{points}\right)\right)\right)$
 ${0.1353352832}$ (1)
 > $\mathrm{max}\left(\mathrm{op}\left(\mathrm{map}\left(\mathrm{op},\mathrm{points}\right)\right)\right)$
 ${1.}$ (2)
 > $\mathrm{listdensityplot}\left(\mathrm{points},\mathrm{range}=0..\frac{1}{2},\mathrm{axes}=\mathrm{none}\right)$
 > $\mathrm{listdensityplot}\left(\mathrm{points},\mathrm{range}=0..\frac{1}{2},\mathrm{colorstyle}=\mathrm{HUE}\right)$

Now the same plots using smooth shading

 > $\mathrm{listdensityplot}\left(\mathrm{points},\mathrm{range}=0..\frac{1}{2},\mathrm{smooth}=\mathrm{true},\mathrm{axes}=\mathrm{none}\right)$
 > $\mathrm{listdensityplot}\left(\mathrm{points},\mathrm{range}=0..\frac{1}{2},\mathrm{smooth}=\mathrm{true},\mathrm{colorstyle}=\mathrm{HUE}\right)$