4
$\begingroup$

I am trying to make a DiscretePlot3D of a DiscreteUniformDistribution but the result in not the expected. I tried to use the PlotMarker-> "Sphere" but the spheres appear flattened. With other distributions this does not happens.

The code was the following

DiscretePlot3D[
 PDF[DiscreteUniformDistribution[{{1, 6}, {1, 6}}], {x, y}], {x, 1, 6}, {y, 1, 6},
 PlotMarkers -> {"Sphere", Large},
 PlotStyle -> Thick
 ]

enter image description here

I don't know why this happens. Thanks for your comments.

$\endgroup$
5
$\begingroup$

I suspect this is a bug.

Note:

DiscretePlot3D[
 PDF[DiscreteUniformDistribution[{{1, 6}, {1, 6}}], {x, y}], {x, 0, 
  6}, {y, 0, 6}, PlotMarkers -> {"Sphere", Large}, 
 PlotRange -> {{0.5, 6.5}, {0.5, 6.5}, {0, .04}}]

enter image description here

Yet:

DiscretePlot3D[
 PDF[DiscreteUniformDistribution[{{1, 6}, {1, 6}}], {x, y}], {x, 1, 
  6}, {y, 1, 6}, PlotMarkers -> {"Sphere", Large}, 
 PlotRange -> {{0.5, 6.5}, {0.5, 6.5}, {0, .04}}]

enter image description here

In both cases, the "aspect/box ratio of the plot" is the same, and "The z axis is very narrow", putting paid I think to that being the cause.

I see the same behavior on 11.x and 12.x, BTW.

| improve this answer | |
$\endgroup$
  • $\begingroup$ the upper plot range limit must be larger than the upper distribution limit to get the sphere shape. $\endgroup$ – HD2006 Aug 8 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.