Skip to content

DensityPlot ​

Wolfram's own DensityPlot, held inert -- the expression is what a worksheet or REPL draws, not something this library computes (see @enumeratio/formats/src/graphics.ts).

Wolfram LanguageDensityPlot
DensityPlot(...)Wolfram's own DensityPlot, held inert -- the expression is what a worksheet or REPL draws, not something this library computes (see @enumeratio/formats/src/graphics.ts).
Typed signatures
TypePackageApplies
(any*) -> anyformatsalways

Domain: Graphics·Drawn as Graphics

Details

Draws as a GraphicsBox holding a RasterBox: one cell per sample, colored along the gradient by value (ColorFunction, Reverse). PlotLegends -> True adds a color bar, and PlotRange -> (zmin, zmax) pins the scale so several plots compare on one. N is the samples per side.

Examples

Basic #

A density plot of sin x cos y

live ↗
InDensityPlot(sin⁡(x)cos⁡(y),(x,−3.14,3.14),(y,−3.14,3.14))\mathrm{DensityPlot}(\sin(x)\cos(y), (x,-3.14,3.14), (y,-3.14,3.14))OutDensityPlot(sin⁡(x)cos⁡(y),(x,−3.14,3.14),(y,−3.14,3.14))\mathrm{DensityPlot}(\sin(x)\cos(y), (x,-3.14,3.14), (y,-3.14,3.14))
Options #

A color bar over a scale pinned to 0 to 30

live ↗
InDensityPlot(x2+y2,(x,−3,3),(y,−3,3),(PlotLegends,True),(PlotRange,(0,30)))\mathrm{DensityPlot}(x^2+y^2, (x,-3,3), (y,-3,3), (\mathrm{PlotLegends},\mathrm{True}), (\mathrm{PlotRange},(0,30)))OutDensityPlot(x2+y2,(x,−3,3),(y,−3,3),(PlotLegends,True),(PlotRange,(0,30)))\mathrm{DensityPlot}(x^2+y^2, (x,-3,3), (y,-3,3), (\mathrm{PlotLegends},\mathrm{True}), (\mathrm{PlotRange},(0,30)))
About
Examples2
CrosswalkWolfram Language