[yt-dev] Issue #640: Enable changing the location of a SlicePlot (yt_analysis/yt)

Stuart Mumford issues-reply at bitbucket.org
Tue Aug 27 06:19:31 PDT 2013


New issue 640: Enable changing the location of a SlicePlot
https://bitbucket.org/yt_analysis/yt/issue/640/enable-changing-the-location-of-a

Stuart Mumford:

I would like to be able to animate changing the location of a SlicePlot, i.e. sweeping through a domain.

Something like this
```python
slc = yt.SlicePlot(ds_h5, 'z', 'VortXmag', origin='left-domain', center=(1e8,1e8,10*12.5e5))
slc.set_window_size(8)

fig = slc.plots['VortXmag'].figure
def animate(i):
    slc.set_center((1e8,1e8,i*12.5e5))

animation.FuncAnimation(fig, animate, frames=range(0,127,2), interval=50, blit=True)
```





More information about the yt-dev mailing list