1

can I plot 2 different sets of data ({x1,y1} and also {x2,y2}) in the same density histogram (mathematica)?

I don't know if that is possible due to superposition of colors.

1 Answers1

0

How about something like this?

a = SmoothDensityHistogram[
   RandomVariate[BinormalDistribution[0.3], 10], Mesh -> 3, 
   MeshStyle -> Red, ColorFunction -> None];
b = SmoothDensityHistogram[
   RandomVariate[BinormalDistribution[0.6], 10], Mesh -> 3, 
   MeshStyle -> Blue, ColorFunction -> None];
Show[
 a /. GrayLevel[_] -> Opacity[0],
 b /. GrayLevel[_] -> Opacity[0],
 ImageSize -> 300]

enter image description here

Chris Degnen
  • 8,443
  • 2
  • 23
  • 40