Hi Mike,

The number that is getting set (~9.92e6) is just one bin off from the maximum value (you have a range of 2e7 and the default is 256 bins).  The code that displays the colorbar, as best I can tell, occurs when you call save_annotated.  This method eventually calls ColorTransferFunction.vert_cbar where the ticks and limits are applied to the colorbar axes object.

Looking over the logic in that code, it is not immediately obvious to me why the index is off.  I suspect is has something to do with how the `visible` variable is defined, but I'd need to play with a dataset and some print statements...

Chris 


On Wed, May 7, 2014 at 8:17 PM, Michael Zingale <michael.zingale@stonybrook.edu> wrote:
I'm trying to show the transfer function on a volume render.  Plotting a velocity component, I set the transfer function with 4 Gaussians all with the same width.  The range of the transfer function is -1.e7 to 1.e7, but for some reason, when output, the upper label in the colorbar is not 1.e7 but a bit lower (9.92e6).  I am not sure where the code is that draws this, and I am confused why it is not setting the tick at 1.e7. It gets the bottom tick right.
Here's an image:

http://bender.astro.sunysb.edu/random/test_0000.png

and the script:


any pointers are appreciated.

Mike
--
Michael Zingale
Associate Professor

Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800
phone:  631-632-8225

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