It is possible to attach a colormap to a volume render image.  I can't quite remember how to do that.  If someone else could chime in on that, that would be great.<br>If you already have the colorbar image you want, you can concatenate two image arrays easily and then write out the new image, provided the arrays are the same size in one direction.  With pylab, you can do something like this:<br>
from matplotlib import pylab<br>import numpy as na<br>from yt.visualization.image_writer import write_bitmap<br>image1 = pylab.imread(file1)<br>image2 = pylab.imread(file2)<br>new_image = na.concatenate([image1, image2], axis=1)<br>
write_bitmap(new_image, output_file)<br><br>I believe the image_writer now supports adding text as well, so that should take care of the labels.<br><br>Britton<br><br><div class="gmail_quote">On Wed, Jan 5, 2011 at 10:46 AM, Elizabeth Harper-Clark <span dir="ltr"><<a href="mailto:h-clark@astro.utoronto.ca">h-clark@astro.utoronto.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Good morning everyone,<br><br>I was wondering how to add colorbars and text labels (e.g. with the time) to images produced through volume rendering. I am unsure of how to adapt all the usual techniques I know for projections etc. gievn the different technique for drawing the images. I am using a constant colorbar so if anyone can suggest a post-processing way of adding to created images that would work too!<br>

<br>I am using the following to create my volume rendered images:<br>    for i, snapshot in enumerate(cam.rotation(2.*na.pi, n_angles)):<br>        print "     drawing:  dump =", numb, "angle =",  i, "shot=",shott<br>

        if cam._mpi_get_rank() == 0:<br>            write_bitmap(snapshot, frame_template % (sys.argv[-1],shott))<br>            pl.draw()<br>            shott = shott+1<br><br>Many thanks,<br><br>Libby <br clear="all"><font color="#888888"><br>

-- <br>Elizabeth Harper-Clark MA MSci<br>PhD Candidate, Canadian Institute for Theoretical Astrophysics, UofT<br>Sciences and Engineering Coordinator, Teaching Assistants' Training Program, UofT<br><br><a href="http://www.astro.utoronto.ca/%7Eh-clark" target="_blank">www.astro.utoronto.ca/~h-clark</a><br>

<a href="mailto:h-clark@cita.utoronto.ca" target="_blank">h-clark@cita.utoronto.ca</a><br>Astronomy office phone: +1-416-978-5759<br>
</font><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br>