# color distinguish two smooth histograms

I want to color distinguish my two smooth histograms, I am not able to do so. I am writing the following but it is not working, Can you aid?

data1 = RandomVariate[NormalDistribution[0, 1], {100, 2}];

data2 = RandomVariate[NormalDistribution[1, 1], {100, 2}];

Show[SmoothHistogram3D[data1], SmoothHistogram3D[data2],
PlotRange -> All]

Show[ColorFunction -> "DarkRainbow"]

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Commented Mar 20, 2021 at 18:16

Clear["Global*"]

SeedRandom[1234];

data1 = RandomVariate[NormalDistribution[0, 1], {100, 2}];

data2 = RandomVariate[NormalDistribution[1, 1], {100, 2}];

Manipulate[
SmoothHistogram3D[{data1, data2},
PlotStyle -> Opacity[opacity],
PlotLegends -> {"data1", "data2"}],
{{opacity, 1}, 0.5, 1, 0.05, Appearance -> "Labeled"}]


• Thanks Bob n ! Can you please elaborate more on the following? I am a new user and very confused Manipulate[ SmoothHistogram3D[{data1, data2}, PlotStyle -> Opacity[opacity], PlotLegends -> {"data1", "data2"}], {{opacity, 1}, 0.5, 1, 0.05, Appearance -> "Labeled"}] Commented Mar 19, 2021 at 2:16
• In Mathematica highlight any command or option in the code that you do not understand and press F1` for help. If after reading the documentation you then have a specific question ask on this forum. Commented Mar 19, 2021 at 2:21