Hi there,

I have the following simple code to plot a (static)  fill_between region in
a given plot.


import numpy as np
import matplotlib. pyplot as plt

plt.figure()
ax=plt.axes()
ax.set_xlim([0,10000])

x = np.linspace(6000.,7000.)
y = np.ones(np.shape(x))

plt.fill_between(x,y)


I would like now to animate this band (which is a PolyCollection object,
and not a Line2D one) so that it moves smoothly to the right up together
with being stretched, that is, to the new x positions: .7200, 8400. I saw
several animations in the matplotlib homepage, but they only looped over
line or image objects, not polycollection ones, such as fill_between... Is
this possible?

In stackoverflow there is this link:
http://stackoverflow.com/questions/16120801/matplotlib-animate-fill-between-shape,
which might solve this question but I was not able to understand it fully
in order to have a simple minmal working example. If that is the right
direction, I would appreciate immensely if someone could provide such an
example!

Thanks in advance

-- 
#######################################
Prof. Mauricio Ortiz Calvao
Federal University of Rio de Janeiro
Institute of Physics, P O Box 68528
CEP 21941-972 Rio de Janeiro, RJ
Brazil

Email: o...@if.ufrj.br
Phone: (55)(21)25627483
Homepage: http://www.if.ufrj.br/~orca
#######################################
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to