0
$\begingroup$

I want to plot lots of coordinate values with DensityHistogram function, such as:

data = RandomReal[1, {100000, 2}];
DensityHistogram[data, 50]

When the bin number is small, it will run fast, but as I have hundreds of thousands of coordinate data, I want to give a bigger bin number (maybe DensityHistogram[data, 1000]), which will be very slow or crash.

(In my real case, hundreds of thousands of data will form a specific shape)

I have another question is how to get the density matrix (DensityHistogram will give a density image, I think it can save time when replot it by ArrayPlot next time.)

$\endgroup$
0
$\begingroup$

I found HistogramList can return the density array, and then use ArrayPlot plot is faster.

$\endgroup$

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.