« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Legends
Show Gradient for a Density
Show a gradient legend to interpret the colors used in a density histogram.
In[1]:=
X
SeedRandom[3]; DensityHistogram[ RandomVariate[ MultinormalDistribution[{-1, 1}, {{1, -1.4}, {-1.4, 4}}], 1000], {{1/2.5}, {1}}, ChartBaseStyle -> EdgeForm[Directive[Opacity[0.5], White]], PlotRange -> {{-5, 4}, {-6, 8}}, ColorFunction -> "Rainbow", ImageSize -> 400, AspectRatio -> 1/GoldenRatio, ChartLegends -> Placed[Automatic, Right]]
Out[1]=