WLJS LogoWLJS Notebook

DensityPlot

DensityPlot[f, {x, xmin, xmax}, {y, ymin, ymax}] makes a density plot showing f as colors over the x-y plane.

Examples

Create density plots:

DensityPlot[Sin[x] Sin[y], {x, 0, 2 Pi}, {y, 0, 2 Pi}]

(* With custom color function *)
DensityPlot[x^2 - y^2, {x, -2, 2}, {y, -2, 2},
  ColorFunction -> "Rainbow",
  PlotLegends -> Automatic
]

Please visit the official Wolfram Language Reference for more details.

On this page