[Yt-svn] New issue 300 in yt: quiver calllbacks on PlotCollectionInteractive

Bitbucket issues-noreply at bitbucket.org
Fri Aug 26 13:15:13 PDT 2011


--- you can reply above this line ---

New issue 300: quiver calllbacks on PlotCollectionInteractive
https://bitbucket.org/yt_analysis/yt/issue/300/quiver-calllbacks-on

samskillman on Fri, 26 Aug 2011 22:15:13 +0200:

Description:
  Some interplay of the pylab window changing the plot characteristics cause a crash when adding a quiver callback on an interactive plot.

Here is a script that reproduces the errror

from yt.mods import *

pf = load('DD1701')

## This does not work

pc = PlotCollectionInteractive(pf,center=[0.5]*3)

##This does work:

##pc = PlotCollection(pf,center=[0.5]*3)

p = pc.add_slice('Density',0)

p.modify['velocity']()

pc.set_width(0.5,'1')

pc.save()


And the error:

Traceback (most recent call last):
  File "test_script.py", line 13, in <module>
    pc.set_width(0.5,'1')
  File "/Users/skillman/local/lib/python2.7/site-packages/yt-2.2dev-py2.7-macosx-10.4-x86_64.egg/yt/visualization/plot_collection.py", line 1587, in pylabify
    retval = func(self, *args, **kwargs)
  File "/Users/skillman/local/lib/python2.7/site-packages/yt-2.2dev-py2.7-macosx-10.4-x86_64.egg/yt/visualization/plot_collection.py", line 266, in set_width
    plot.set_width(width, unit)
  File "/Users/skillman/local/lib/python2.7/site-packages/yt-2.2dev-py2.7-macosx-10.4-x86_64.egg/yt/visualization/plot_types.py", line 436, in set_width
    self._refresh_display_width()
  File "/Users/skillman/local/lib/python2.7/site-packages/yt-2.2dev-py2.7-macosx-10.4-x86_64.egg/yt/visualization/plot_types.py", line 454, in _refresh_display_width
    self._redraw_image()
  File "/Users/skillman/local/lib/python2.7/site-packages/yt-2.2dev-py2.7-macosx-10.4-x86_64.egg/yt/visualization/plot_types.py", line 401, in _redraw_image
    self._run_callbacks()
  File "/Users/skillman/local/lib/python2.7/site-packages/yt-2.2dev-py2.7-macosx-10.4-x86_64.egg/yt/visualization/plot_types.py", line 258, in _run_callbacks
    cb(self)
  File "/Users/skillman/local/lib/python2.7/site-packages/yt-2.2dev-py2.7-macosx-10.4-x86_64.egg/yt/visualization/plot_modifications.py", line 85, in __call__
    return qcb(plot)
  File "/Users/skillman/local/lib/python2.7/site-packages/yt-2.2dev-py2.7-macosx-10.4-x86_64.egg/yt/visualization/plot_modifications.py", line 150, in __call__
    plot._axes.quiver(X,Y, pixX, pixY, scale=self.scale, scale_units=self.scale_units)
  File "/Users/skillman/local/lib/python2.7/site-packages/matplotlib/axes.py", line 6301, in quiver
    q = mquiver.Quiver(self, *args, **kw)
  File "/Users/skillman/local/lib/python2.7/site-packages/matplotlib/quiver.py", line 395, in __init__
    self.XY = np.hstack((X[:,np.newaxis], Y[:,np.newaxis]))
  File "/Users/skillman/local/lib/python2.7/site-packages/numpy/core/shape_base.py", line 258, in hstack
    return _nx.concatenate(map(atleast_1d,tup),1)
ValueError: array dimensions must agree except for d_0




--

This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.



More information about the yt-svn mailing list