Hi All, I have a slice plot that I make with the simple: slc = SlicePlot(pf,'z',('gas','temperature')) slc.zoom(5) slc.save('junk2.png') and produces this (it's super ugly but not the point :) ): http://i.imgur.com/j9H4imp.png I can't figure out how to get the colorbar to reveal the numbers that the colors correspond to. Is there an obvious solution? thanks -d
Hi Desika
By default, slices of the temperature field are log-scaled. It looks like
there is less than one order of magnitude in temperature variation, so no
colorbar tick labels are showing up.
You will likely have better results if you switch to linear colorbar
scaling:
slc.set_log('temperature', False)
If you switch to the latest dev version (what will be the upcoming yt 3.1
release) you should have minor tick marks on your plot.
Here's an example I just whipped up:
http://nbviewer.ipython.org/gist/ngoldbaum/f3424a7307baeb050c61
HTH,
Nathan
On Tue Nov 18 2014 at 12:42:37 PM Desika Narayanan
Hi All,
I have a slice plot that I make with the simple:
slc = SlicePlot(pf,'z',('gas','temperature')) slc.zoom(5) slc.save('junk2.png')
and produces this (it's super ugly but not the point :) ): http://i.imgur.com/j9H4imp.png
I can't figure out how to get the colorbar to reveal the numbers that the colors correspond to. Is there an obvious solution?
thanks -d _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Desika, I'll just add one thing. If you want to know the min and max values of the colorbar you can access the matplotlib values with: temp_plot = slc.plots['temperature'] print '(vmin, vmax) =', (temp_plot.cb.norm.vmin, temp_plot.cb.norm.vmax) Cheers, Aaron On 11/18/14, 3:01 PM, Nathan Goldbaum wrote:
Hi Desika
By default, slices of the temperature field are log-scaled. It looks like there is less than one order of magnitude in temperature variation, so no colorbar tick labels are showing up.
You will likely have better results if you switch to linear colorbar scaling:
slc.set_log('temperature', False)
If you switch to the latest dev version (what will be the upcoming yt 3.1 release) you should have minor tick marks on your plot.
Here's an example I just whipped up:
http://nbviewer.ipython.org/gist/ngoldbaum/f3424a7307baeb050c61
HTH,
Nathan
On Tue Nov 18 2014 at 12:42:37 PM Desika Narayanan
mailto:dnarayan@haverford.edu> wrote: Hi All,
I have a slice plot that I make with the simple:
slc = SlicePlot(pf,'z',('gas','temperature')) slc.zoom(5) slc.save('junk2.png')
and produces this (it's super ugly but not the point :) ): http://i.imgur.com/j9H4imp.png
I can't figure out how to get the colorbar to reveal the numbers that the colors correspond to. Is there an obvious solution?
thanks -d _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org mailto:yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Aaron and Nathan,
This worked great - thanks a lot!
-desika
On Tue, Nov 18, 2014 at 4:18 PM, Aaron Smith
Hi Desika,
I'll just add one thing. If you want to know the min and max values of the colorbar you can access the matplotlib values with:
temp_plot = slc.plots['temperature'] print '(vmin, vmax) =', (temp_plot.cb.norm.vmin, temp_plot.cb.norm.vmax)
Cheers, Aaron
On 11/18/14, 3:01 PM, Nathan Goldbaum wrote:
Hi Desika
By default, slices of the temperature field are log-scaled. It looks like there is less than one order of magnitude in temperature variation, so no colorbar tick labels are showing up.
You will likely have better results if you switch to linear colorbar scaling:
slc.set_log('temperature', False)
If you switch to the latest dev version (what will be the upcoming yt 3.1 release) you should have minor tick marks on your plot.
Here's an example I just whipped up:
http://nbviewer.ipython.org/gist/ngoldbaum/f3424a7307baeb050c61
HTH,
Nathan
On Tue Nov 18 2014 at 12:42:37 PM Desika Narayanan
wrote: Hi All,
I have a slice plot that I make with the simple:
slc = SlicePlot(pf,'z',('gas','temperature')) slc.zoom(5) slc.save('junk2.png')
and produces this (it's super ugly but not the point :) ): http://i.imgur.com/j9H4imp.png
I can't figure out how to get the colorbar to reveal the numbers that the colors correspond to. Is there an obvious solution?
thanks -d _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing listyt-users@lists.spacepope.orghttp://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
Aaron Smith
-
Desika Narayanan
-
Nathan Goldbaum