Message Boards Message Boards

Role of Z-axis in SmoothHistogram3D?

Posted 3 years ago

Hi, I have plotted the following:

data1 = RandomVariate[
NormalDistribution[0.0014, 1.936 E - 005], {10000, 2}];

data2 = RandomVariate[
NormalDistribution[0.0013, 1.925 E - 005], {10000, 2}];

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

I am a bit confused with the generated graph. I understand that the x and y axes are the "mean" of the normal distribution, however, I am not really sure what the z-axis is representing? Also, Is there any possibility to specify the axis and what they should represent? If yes, please let me know how to do it. Finally, Is there any possibility to change the plot colors? other than the automatic Blue and Orange that is generated?

Thanks!

POSTED BY: Mary Caisy
3 Replies
Posted 3 years ago

Hi Mary,

To change the colors

PlotStyle -> {Directive[Opacity[opacity], Red], Directive[Opacity[opacity], Green]}
POSTED BY: Rohit Namjoshi
Posted 3 years ago

Thanks! Is there any possibility to change the plot colors? other than the automatic Blue and Orange that is generated?

POSTED BY: Mary Caisy

What is 1.936 E - 005? Surprisingly, even Interpreter cannot decypher it:

Interpreter["Number"]["1.936 E-005"]

Assuming that it means 1.936*10^(-005), here is your plot:

data1 = RandomVariate[
   NormalDistribution[0.0014, 1.936*10^(-005)], {10000, 2}];
data2 = RandomVariate[
   NormalDistribution[0.0013, 1.936*10^(-005)], {10000, 2}];
Manipulate[
 SmoothHistogram3D[{data1, data2}, PlotStyle -> Opacity[opacity], 
  PlotLegends -> {"Bi-section", "Genetic Algorithm"}], {{opacity, 1}, 
  0.5, 1, 0.05, Appearance -> "Labeled"}]

The z values should be the probability density function (PDF) of the distributions.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract