0

enter image description here

I found that plot on the web. I don`t know which kind of Distribution yields this. I would like to draw such plot on paper. But get some help from Mathematica if possible :

With this image as example could I obtain the 2D coordinate of each visible bar edges of the plot?

I don`t know if it is purely edge detection of an image from a plot or if we could get this info from the plot itself.

Ideally I would adjust the image size to match my paper size and obtain the coordinates scaled. It would be incredible.

Thank You for your attention.

500
  • 6,509
  • 8
  • 46
  • 80
  • 1
    What do you mean by "obtain the coordinates scaled"? – DavidC Oct 01 '11 at 23:57
  • I do not understand your question .. – Dr. belisarius Oct 03 '11 at 01:54
  • @belisarius, I want to draw 3D histograms on paper with pencils, paints and other. To trace I could print the plot with the desired view and measures by hand each edge coordinates to then be able to reproduce. Instead I wonder if Mathematica could give me such infos. The coordinates of the edges on the displayed page of a Histogram3D given a chosen view angle. then peer, ruler, pencil ! Hope it make sense. – 500 Oct 03 '11 at 02:06
  • @500 like http://www.corneliafunkefans.com/en/world/picture-books/angels-pigs-and-pirates-a-picture-book-story/6? – Dr. belisarius Oct 03 '11 at 02:32
  • No to messy, I am doing very precise drawing on a thick paper. I have tried all t=in that direction. Such a thing would avoid me the perspective drawing mess such as : http://prism.troy.edu/~chapman/projects_school/edrawing/images/2pt_boxes.png – 500 Oct 03 '11 at 02:35

1 Answers1

1

@500 If you simply want to draw a plot like this by hand, capture it and bring it into a drawing program as a stencil. Then draw over it on a different layer, while gridlines are on; finally, remove the picture and print it. It's an easy job to scale it to whatever size you wish. But it you want to explore how Mathematica works with it, read on.


Looks like you'll want to be using Histogram3D. (See documentation.)

Let's generate normally distributed data points (n= 10k) around means of 40 and 125 with standard deviations of 10 and 50, respectively and a Spearman rho of .45.

data = RandomVariate[BinormalDistribution[{40, 125}, {10, 50}, .45],  10^4]

You may grab data from FullForm if you like. That will give you the z-values.

Let's plot it using Histogram3D. We'll use bins of width 5 and 25 for x, y, respectively.

Histogram3D[data2, {{Table[10 + 5 k, {k, 15}]}, {Table[ 0 + 25 k, {k, 0, 12}]}}]

Histogram3D


Edit:

When you mouse over a bar, the z-value will appear in a tooltip. So if you want to gather the data "by hand", you can do it that way. Alternatively, using FullForm you can look for Lists such as the following, which appear to contain the coordinates you are looking for. They appear to be in the List following CuboidBox but they may be the CuboidBox parameters. Someone should be able to clarify this.

List[Tooltip[
  StatusArea[
  List[RawBoxes[
  DynamicBox[
  List[FEPrivate`If[CurrentValue["MouseOver"], 
    EdgeForm[
     List[RGBColor[0.6666666666666666`, 0.6666666666666666`, 
       0.6666666666666666`], AbsoluteThickness[1.5`]]], List[], 
       List[]], 
       CuboidBox[List[15.`, 0.`, 0.`], List[20.`, 25.`, 10.`]]]]]], 
       10.`], Style[10.`, List[GrayLevel[0]]]]]

You could also use LabelingFunction to display the z-values, but this will not look good unless you are looking perpendicular to the x-y plane, in which case it might be better to use DensityPlot.

Histogram3D[data2, {{Table[10 + 5 k, {k, 15}]}, 
  {Table[0 + 25 k, {k, 0, 12}]}}, 
  LabelingFunction -> (Placed[Panel[#1, FrameMargins -> 0], Above] &)]
DavidC
  • 3,056
  • 1
  • 20
  • 30
  • Thank You David, so you think it would be possible to get the coordinate of the edge in the image you show for example, FullForm gives me the 3D coordinates still. I am looking forward :-) I used Histogram3D if you replace 500 by 1 000 000 it looks like powder ! – 500 Oct 02 '11 at 00:05
  • The "scaled" is just if for example we get the 2d coordinates for your images that looks like 6*4cm, I will be able to adjust the coordinates to apply on a 30*20 (with deformations) or 60*40cm (as perceived now. Basically what I hope to obtain is a list of coordinates to reproduce a 3D figure on a 2D piece of paper. I am sorry It can be confusing. – 500 Oct 02 '11 at 00:12
  • @500 What is the 'edge' in 'coordinates of the edge'? If if is the z-value, I suggested grabbing the information from the `Tooltip` or the info revealed by `FullForm`. – DavidC Oct 02 '11 at 00:58
  • FEPrivate` What is this ? Just in case because i know what I ask is special. I want to reproduce, painting such plot. And to trace the elements with a pencil first I want to get the coordinate of the edges. The alternative is for me to plot such a thing. Choose my view angela, print it in the desired format, then take the measurement from the print and reproduce. – 500 Oct 02 '11 at 01:11
  • @500 I provided a short answer to your question about hand-painting at the beginning of my post. Looks like we're going back to perspective drawing, using something like Alberti's window. – DavidC Oct 02 '11 at 01:15
  • thank you so much ! Still can't make your last code work though 'FEPrivate` ' and data2 ? – 500 Oct 02 '11 at 01:18
  • @500 The code you are wondering about was from FullForm. It is not meant to work by itself. – DavidC Oct 02 '11 at 01:58