[yt-users] Projection Question

david collins dcollins4096 at gmail.com
Mon Apr 8 16:07:12 PDT 2013


Hi, Everybody!

I have a probably dumb question.  I keep getting the following error when
projecting.  I get this from a variety of methods, but what I'm trying to
do is project a region.  What I used to do was something like this, but
it's no longer working (with or without the source.)

reg = pf.h.region(center,left,right)
pf = load(thing)
pc = PlotCollection(pf)
proj =  pf.h.proj(0,'Density',center=Center) #,source=reg)
prooj = pc.add_projection('Density','x') #,data_source=reg)

So my question is: with the recent developments to yt, what's the best
mechanism to do this?
I'm on a self install that was done fresh pretty recently, the hash
is 34b95297062b

Thanks,
d.


    prooj = pc.add_projection('Density','x',data_source=reg)
  File
"/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/visualization/plot_collection.py",
line 786, in add_projection
    size=fig_size, periodic=periodic))
  File
"/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/visualization/plot_types.py",
line 326, in __init__
    self.__init_temp_image(use_colorbar)
  File
"/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/visualization/plot_types.py",
line 358, in __init_temp_image
    shrink=0.95)
  File
"/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/figure.py",
line 1387, in colorbar
    cb = cbar.colorbar_factory(cax, mappable, **kw)
  File
"/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
line 1173, in colorbar_factory
    cb = Colorbar(cax, mappable, **kwargs)
  File
"/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
line 854, in __init__
    ColorbarBase.__init__(self, ax, **kw)
  File
"/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
line 298, in __init__
    self.draw_all()
  File
"/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
line 323, in draw_all
    self._config_axes(X, Y)
  File
"/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
line 409, in _config_axes
    self.update_ticks()
  File
"/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
line 345, in update_ticks
    ticks, ticklabels, offset_string = self._ticker()
  File
"/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
line 560, in _ticker
    ticks = self._locate(b)
  File
"/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
line 808, in _locate
    z = np.take(y, i0) + (xn-np.take(b,i0))*dy/db
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130408/e9bf3cd9/attachment.htm>


More information about the yt-users mailing list