2
$\begingroup$

Let us suppose that I have a set of N points described by x-y couples, i.e., I have a table such that, for example, table[[4]]={0.234,0.678}. For every element of the table, both x and y are comprised between 0 and 1.

The points in the table are not uniformly distributed, but they are a lot, say 10^9, so that doing ListPlot[table] simply gives a graph that does not give any information about the actual distribution of the points since they amass.

What is the best way to obtain a numerical distribution graph based on the sample I have? I want to do an x-y colored graph in which the color of each point is linked to the probability of obtaining a random point around the point in the graph, preferably in the Log10 scale. If I could plot in this way the numerical Probability Density Function it would be the best thing.

Thank you all for the answers!

$\endgroup$
5
  • $\begingroup$ Perhaps look at DensityHistogram? $\endgroup$ – march Feb 13 '20 at 16:40
  • $\begingroup$ Look at documentation for EmpiricalDistribution, HistogramDistribution, SmoothKernelDistribution, and FindDistribution $\endgroup$ – Bob Hanlon Feb 13 '20 at 18:45
  • $\begingroup$ @march thanks, DensityHistogram seems to do what I want but it is extremely slow. I tried with 10^6 point in a 1000x1000 grid and I had to abort because it did not finish to make the calculations. Moreover, I would like to save the result of this organization of the data. Thanks for the help! $\endgroup$ – Knomes Feb 14 '20 at 12:17
  • $\begingroup$ @BobHanlon I do not understand from the documentation how should I obtain a graph like the one given by DensityHistogram. For reference, I am trying to obtain graphs like in this other question I made mathematica.stackexchange.com/questions/214629/… There, I organized the data with a custom function in order to obtain a 1000x1000 matrix, but the problem is that then I have problems with the representation of those data. Thanks for the help! $\endgroup$ – Knomes Feb 14 '20 at 12:20
  • $\begingroup$ Do not ask questions in the comments of other questions. Start a new question, show the code for what you have tried and explain what specific problems you are having. Include a reduced representative data set. $\endgroup$ – Bob Hanlon Feb 14 '20 at 18:38

Your Answer

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

Browse other questions tagged or ask your own question.