Instead of dens = np.log10(f['PartType4']['Masses'][:]) I would convert to solar masses and not log, e.g. dens = f['PartType4']['Masses'][:]*1e10/0.6774 and then I would later take the log of the hist2d e.g. plot = np.log10(plot). In this way the units you write in the colorbar label would be correct.
Greetings,
I am trying to create a 2D histogram of stellar map distributions. However, I'm having troubles with its scales
But my final result is this histogram
https://www.illustris-project.org/exp/user/6271/14f27bb0b213058e71fdab53f2935dbd.png
which is pretty awkward. Any suggestions?
Thank you in advance!
Instead of
dens = np.log10(f['PartType4']['Masses'][:])
I would convert to solar masses and not log, e.g.dens = f['PartType4']['Masses'][:]*1e10/0.6774
and then I would later take the log of the hist2d e.g.plot = np.log10(plot)
. In this way the units you write in the colorbar label would be correct.You should be able to come up with an image similar to that made by the visualization tool.