Animation problem of Virgil Stokes.
Since I began the answer sequence, here's a little more. If this
overlaps other answers, I apologize.
About the third parameter
"/frames/ can be a generator, an iterable, or a number of frames."
This makes very little sense to me --- what does "or a number
"Thanks for this also Ben --- I will quite likely get this book. However,
considering the complexity of Matplotlib --- only 174 pages bothers me a
little. :-)"
I am just that good! No, really though, the book focuses only on a subset
of features in Matplotlib, and it does assume that you are some
On 23-Apr-2015 18:28, Thomas Caswell wrote:
Can everyone please bring the level of snark/hostility down? Programming is
frustrating, but antagonizing the mailing list does not help anyone.
It is not well documented, but the signature for `func` is assumed to be `def
function(required, *option
On 23-Apr-2015 18:48, Benjamin Root wrote:
... keeping conversation on-list ...
The reason why you get that error is because you took out the argument from
the call signature. But, FuncAnimation assumes that it can send in at least
one argument. That argument is not optional, even if you aren'
Brendan, good catch, I didn't notice Virgil's confusion earlier. I think
that is a good explanation. I remember getting very confused by all of that
stuff back when I started in Python. I think mostly because I don't know of
any other language that does argument handling like how Python does it. I
On 2015-04-23 03:22, Virgil Stokes wrote:
>
> 1. There are 3 positional arguments given for animation.FuncAnimation;
> but, in the
> API documentation for this class
> (http://matplotlib.org/api/animation_api.html), only
> two positional arguments are shown.
One thing I think may be mislea
... keeping conversation on-list ...
The reason why you get that error is because you took out the argument from
the call signature. But, FuncAnimation assumes that it can send in at least
one argument. That argument is not optional, even if you aren't using it.
So, animate() was called with an ar
Can everyone please bring the level of snark/hostility down? Programming
is frustrating, but antagonizing the mailing list does not help anyone.
It is not well documented, but the signature for `func` is assumed to be
`def function(required, *optional_positional)` see
https://github.com/matplotli
The documentation should say "the number", not "a number". This particular
argument expects either a generator, an iterable, or an integer. If none is
given, it will try and figure out something for itself. The integer is used
to create a number generator, and so you effectively have an iterable th
Le 23/04/2015 12:22, Virgil Stokes a écrit :
The following interesting example (random_data.py) is posted at:
http://matplotlib.org/1.4.2/examples/animation/random_data.html
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import numpy as np
fig, ax = plt.subplots(
The following interesting example (random_data.py) is posted at:
http://matplotlib.org/1.4.2/examples/animation/random_data.html
import matplotlib.pyplot as plt
import matplotlib.animation as animation
fig, ax = plt.subplots()
line, = ax.plot(np.random.rand(10))
ax.set_ylim(0, 1)
def update(d
On Tue, 20 Dec 2011 10:48:42 -0600
Ryan May wrote:
> On Tue, Dec 20, 2011 at 8:00 AM, Nils Wagner
> wrote:
>> Hi all,
>>
>> How do I use animation.FuncAnimation to plot real-life
>> data from parsing a text file ?
>
> Here's a version that does what I think you want:
>
> import matplotlib.pyp
On Tue, Dec 20, 2011 at 8:00 AM, Nils Wagner
wrote:
> Hi all,
>
> How do I use animation.FuncAnimation to plot real-life
> data from parsing a text file ?
Here's a version that does what I think you want:
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import sys
import
On Tue, Dec 20, 2011 at 8:00 AM, Nils Wagner
wrote:
> Hi all,
>
> How do I use animation.FuncAnimation to plot real-life
> data from parsing a text file ?
>
>
> import numpy as np
> import matplotlib.pyplot as plt
> import matplotlib.animation as animation
>
> import sys
> import time
> import re
Hi all,
How do I use animation.FuncAnimation to plot real-life
data from parsing a text file ?
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import sys
import time
import re
x = [] # x
y = [] # y
fig = plt.figure()
ax= f
15 matches
Mail list logo