[yt-users] using show() in ipython/python

Johanna Malinen pjmaline at gmail.com
Tue Dec 2 13:45:15 PST 2014


Hi,

I just installed the yt development version
http://hg.yt-project.org/yt/raw/yt/doc/install_script.sh
Version = 3.1-dev
Changeset = dc2ade033502 (yt) tip
into ubuntu 14.04
with
 INST_ZLIB=0
 INST_FTYPE=0

yt seemed to install properly and it works otherwise, but it doesn't
open any windows when I'm trying to show an image, e.g.,
when running the script
http://yt-project.org/doc/quickstart/3)_Simple_Visualization.py
line by line in ipython:
p = yt.ProjectionPlot(ds, "y", "density")
p.show()   #doesn't open a window
In [35]: p.show()
<yt.visualization.plot_window.ProjectionPlot at 0x7fe1897941d0>
However, saving the image works:
p.save()

When I run that script directly with python, I get the following error:
Traceback (most recent call last):
  File "3)_Simple_Visualization_short.py", line 28, in <module>
    p.show()
  File "/home/.../yt/yt-x86_64/src/yt-hg/yt/visualization/plot_container.py",
line 622, in show
    raise YTNotInsideNotebook
yt.utilities.exceptions.YTNotInsideNotebook: This function only works
from within an IPython Notebook.

I'm using
ipython --matplotlib
from pylab import *
and e.g. plot() and figure() open a window normally. Is there a way to
open a window with yt's show() and other functions
using ipython and python, or does that really require IPython Notebook?

Cheers,
Johanna
_______________________________________________
yt-users mailing list
yt-users at lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org




More information about the yt-users mailing list