I have a 3D dataset which I visualize with a scatter plot. This is how it looks like:
I would now like to color the different dots depending on the density of the data. Is there any way I can do this in Python or MATLAB? Another option could be to bin the data and color the bins depending on how many data points lie within them. I binned the data by using Python's histogramdd
function.
H,edges = np.histogramdd(al,bins=(16,16,16))
The idea is to have it look kind of like this:
using the code provided in this thread: 3D discrete heatmap in matplotlib
If you have any ideas on how I could do this, I would be really happy to hear them!