New in Wolfram
Mathematica
8: Statistical Visualization
◄
previous
|
next
►
Graphics & Visualization
Combine Histograms with Data
Show a 3D smooth histogram with an inset scatter plot of the actual data.
In[1]:=
X
data = ExampleData[{"Statistics", "OldFaithful"}];
In[2]:=
X
inset = ListPlot[data, PlotRange -> {{1, 6}, {30, 110}}, AspectRatio -> 1, Frame -> True, ImageSize -> 150, PlotStyle -> Black, PlotLabel -> Text[Style["Old Faithful Geyser Data", "Label"]], Background -> Directive[Opacity[.5], White], Axes -> None];
In[3]:=
X
SmoothHistogram3D[data, "SheatherJones", PlotRange -> All, Mesh -> 25, PlotLabel -> Text[Style["Duration vs. Waiting\[Hyphen]Time", "Label", Large]], PlotPoints -> 100, ColorFunction -> "BrownCyanTones", MeshStyle -> Directive[Opacity[.3]], MeshFunctions -> {#2 &, #1 &}, ViewPoint -> {2, -2, 1}, Epilog -> Inset[inset, {Right, Bottom}, {Right, Bottom}], ImageSize -> 600, BaseStyle -> {FontFamily -> "Helvetica"}, LabelStyle -> Bold]
Out[3]=