<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 2, 2014 at 1:45 PM, Johanna Malinen <span dir="ltr"><<a href="mailto:pjmaline@gmail.com" target="_blank">pjmaline@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
I just installed the yt development version<br>
<a href="http://hg.yt-project.org/yt/raw/yt/doc/install_script.sh" target="_blank">http://hg.yt-project.org/yt/raw/yt/doc/install_script.sh</a><br>
Version = 3.1-dev<br>
Changeset = dc2ade033502 (yt) tip<br>
into ubuntu 14.04<br>
with<br>
 INST_ZLIB=0<br>
 INST_FTYPE=0<br>
<br>
yt seemed to install properly and it works otherwise, but it doesn't<br>
open any windows when I'm trying to show an image, e.g.,<br>
when running the script<br>
<a href="http://yt-project.org/doc/quickstart/3)_Simple_Visualization.py" target="_blank">http://yt-project.org/doc/quickstart/3)_Simple_Visualization.py</a><br>
line by line in ipython:<br>
p = yt.ProjectionPlot(ds, "y", "density")<br>
p.show()   #doesn't open a window<br>
In [35]: p.show()<br>
<yt.visualization.plot_window.ProjectionPlot at 0x7fe1897941d0><br>
However, saving the image works:<br>
p.save()<br>
<br>
When I run that script directly with python, I get the following error:<br>
Traceback (most recent call last):<br>
  File "3)_Simple_Visualization_short.py", line 28, in <module><br>
    p.show()<br>
  File "/home/.../yt/yt-x86_64/src/yt-hg/yt/visualization/plot_container.py",<br>
line 622, in show<br>
    raise YTNotInsideNotebook<br>
yt.utilities.exceptions.YTNotInsideNotebook: This function only works<br>
from within an IPython Notebook.<br>
<br>
I'm using<br>
ipython --matplotlib<br>
from pylab import *<br>
and e.g. plot() and figure() open a window normally. Is there a way to<br>
open a window with yt's show() and other functions<br>
using ipython and python, or does that really require IPython Notebook?<br></blockquote><div><br></div><div>Hi Johanna,</div><div><br></div><div>This is a known issue:</div><div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/issue/660/support-for-interactive-mpl-backends">https://bitbucket.org/yt_analysis/yt/issue/660/support-for-interactive-mpl-backends</a><br></div><div><br></div><div>We had a recent discussion about this on the dev mailing list:</div><div><br></div><div><a href="http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/2014-November/013944.html">http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/2014-November/013944.html</a></div><div><br></div><div>So it's not impossible, but it will take some work.  I've wanted to get this set up for a while, but need to complete my Ph.D. before I can focus on this.  If someone else wants to step up and work on this, I think that would be an excellent contribution.</div><div><br></div><div>For now you do need to work inside of the IPython notebook if you want to interactively work with yt plots.</div><div><br></div><div>You can also manually create your plots using e.g. FixedResolutionBuffer and pyplot.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Cheers,<br>
Johanna<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>
</blockquote></div><br></div></div>