Hi Shankar,

1. You can set range of the colorbar by doing, for example:

p.set_zlim('particle_mass', 1e6, 1e8)

2. Calling it "Particle Mass" follows the yt convention for phase plots, but you're right that "mass per pixel" or something like that might make more sense. At any rate, you can change the label to whatever you want using, e.g.:

p.set_colorbar_label('particle_mass', 'Particle mass per pixel')

3. Currently, contour callbacks are disabled for particle plots. I think they could be made to work, although the results might look like a mess if the plot pixels are sparsely populated. Is this an important feature for you? If so, you could add a ticket about it here, and we'll see about enabling this feature. 

Thanks,
Andrew


On Wed, Jul 29, 2015 at 8:11 AM, Shankar Agarwal <agarwalshankar@gmail.com> wrote:
Hi,

I have a few plotting questions:

1. http://yt-project.org/docs/3.2/cookbook/simple_plots.html#simple-particle-plot

p.set_unit('particle_mass', 'Msun')

In the above plot, Colorbar range is approximately Mass=10^5-10^9. When making a plot using ParticlePlot or ParticleProjectionPlot, can I manually force the range on the colorbar?

2. The label on the colorbar says "Particle Mass". Instead, shouldn't it be saying something like mass_per_pixel, since the plot is showing the total number of particles projected along the z-axis? How can we rename the colorbar?

3. Can contours of mass be added to the above plot, using annotate?

Regards,
Shankar


_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org