<div dir="ltr">Hi Michael,<div><br></div><div>There are a few of us who are working on rewriting the entire camera interface.  It was originally supposed to go out in 3.0, but there were some delays.  I think once 3.0 is out, the new interface won't be too far behind.  So as far as modifying the draw_domain and save_annotated functions to work within the new background color stuff, it might make more sense to hold off until we get the new framework up and running.  But we'll definitely try to keep this functionality interoperable.</div>

<div><br></div><div>About the orientation issue, I'm not sure.  Perhaps Matt or Sam can speak to the orientation issues with write_png?  I see that when we call "write_png" it does this:</div><div>return write_bitmap(out.swapaxes(0, 1), filename)<br>

</div><div><br></div><div>But then write_bitmap goes to a different (png_writer) write_png, which then goes to use matplotlib's write_png tools.  After all that jumping I'm not sure the orientation, but I think there are still some residual orientation issues, as you can see here with the two plots generated here in the docs from nearly identical recipes (off-axis-projections use the camera interface which also makes the volume renderings):</div>

<div><br></div><div><a href="http://yt-project.org/docs/dev-3.0/visualizing/plots.html#off-axis-projection-plots">http://yt-project.org/docs/dev-3.0/visualizing/plots.html#off-axis-projection-plots</a><br></div><div><br>
</div>
<div>Again, though, I think this will be mostly addressed through the new camera interface in the next few months.</div><div><br></div><div>Cameron</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Thu, Jul 31, 2014 at 9:07 AM, Michael Zingale <span dir="ltr"><<a href="mailto:michael.zingale@stonybrook.edu" target="_blank">michael.zingale@stonybrook.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Cameron, this answers a question I've had for a white, since I've been trying to get a white background.  Two comments on the new cookbook recipe you just posted -- are you sure that "up" is "up" in those images?  When I use write_png, my image is upside down.  Secondary, do we want to try to pass the transparent/white background stuff through the draw_domain and save_annotated functions?  At the moment, draw_domain forces things to be black, and save_annotated sets the facecolor of the resulting plot to black.<div>


<br></div><div>Mike</div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Thu, Jul 31, 2014 at 12:12 AM, Cameron Hummels <span dir="ltr"><<a href="mailto:issues-reply@bitbucket.org" target="_blank">issues-reply@bitbucket.org</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">New issue 873: volume rendering set_background does not work<br>
<a href="https://bitbucket.org/yt_analysis/yt/issue/873/volume-rendering-set_background-does-not" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/873/volume-rendering-set_background-does-not</a><br>
<br>
Cameron Hummels:<br>
<br>
I tried to make a VR with different background colors by combining the two cookbook recipes:<br>
<br>
<a href="http://yt-project.org/docs/dev-3.0/cookbook/simple_plots.html#image-background-colors" target="_blank">http://yt-project.org/docs/dev-3.0/cookbook/simple_plots.html#image-background-colors</a><br>
<a href="http://yt-project.org/docs/dev-3.0/cookbook/simple_plots.html#simple-volume-rendering" target="_blank">http://yt-project.org/docs/dev-3.0/cookbook/simple_plots.html#simple-volume-rendering</a><br>
<br>
The resulting script is here:<br>
<br>
<a href="http://paste.yt-project.org/show/4978/" target="_blank">http://paste.yt-project.org/show/4978/</a><br>
<br>
Unfortunately, the 'background' keyword for `write_png` doesn't seem to work on real VRs.  All of the options end up yielding the original all-black background.<br>
<br>
When I dug into the code to figure out what was going on, it appears the problem is that the color channels are being normalized by the opacity channel prior to adding in the background color, and then renormalized by 1-opacity afterwards.  The VRs produced by the standard recipe yield a opacity=1 uniformly across the image, which essentially wipes out any changes from the renormalization.<br>



<br>
I can rip out this renormalization, or replace it with a rescale() function, but I wanted to make sure that wouldn't break other things.  Maybe this isn't worth changing since VR is getting a makeover soon.<br>
<br>
<br>
_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div>Michael Zingale</div><div>Associate Professor</div><div><br></div><div>Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800</div>


<div><i>phone</i>:  <a href="tel:631-632-8225" value="+16316328225" target="_blank">631-632-8225</a></div><div><i>e-mail</i>: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a></div>

<div><i>web</i>: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a></div>

</font></span></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Cameron Hummels<div>Postdoctoral Researcher</div><div>Steward Observatory</div><div>University of Arizona</div><div><a href="http://chummels.org" target="_blank">http://chummels.org</a></div>


</div>