[Matplotlib-users] Attempting to get animated plot to work in this example

Jody Klymak jklymak at uvic.ca
Fri Apr 22 14:15:21 EDT 2016


Does this code works for someone else?  

I don’t think "animate=True" is even a valid keyword argument for pyplot.plot.  There is an “animated” keyword argument, but I have no idea what it does.  I doubt it actually animates anything; to do that I believe you need some kind of for-loop (or animation.FuncAnimation if you want to be fancy).  There are lots of matplotlib animation examples. http://matplotlib.org/examples/animation/basic_example.html. If molniya is just a 2xN array, looping over the N values should be straightforward.

Cheers,   Jody


> On Apr 22, 2016, at  11:06 AM, Samuel Dupree <sdupree at computational-astronomer.com> wrote:
> 
> I can't reduce the example to a point that demonstrates my problem without the "orbital" module. However, I've done some deeper digging into the "orbital" module to find the functions that support the plotting. I've attached that source file to this note, and if you could point out any issues you may see dealing with the animate function, I would appreciate it.
> 
> Sam Dupree.
> 
> 
> 
> 
> On 4/22/16 13:48:45, Paul Hobson wrote:
>> Can you reduce this problem down to an example that doesn't involve this "orbital" module? For all we know, the issue is in there
>> 
>> On Fri, Apr 22, 2016 at 10:41 AM, Samuel Dupree <sdupree at computational-astronomer.com <mailto:sdupree at computational-astronomer.com>> wrote:
>> There are two plots that should output plots showing a satellite orbiting about the Earth. Instead the plots are static which they sjouldn't be.
>> 
>> Hope this helps.
>> 
>> Sam Dupree.
>> 
>> 
>> 
>> 
>> 
>> On 4/22/16 13:37:17, Paul Hobson wrote:
>>> On Fri, Apr 22, 2016 at 10:07 AM, Samuel Dupree < <mailto:sdupree at computational-astronomer.com>sdupree at computational-astronomer.com <mailto:sdupree at computational-astronomer.com>> wrote:
>>> I'm running matplotlib ver. 1.5.1 in an anaconda distribution on a MacBook Pro running Mac OS X ver. 10.11.4 (El Capitan). I'm attempting to get the animation portion of the example attached to this note running. I've looked through the on-line documentation on plot() and plot3d() but have turned up empty.
>>> 
>>> Any thoughts.
>>> 
>>> Sam Dupree.
>>> 
>>> What specific problems are you encountering? Does the script halt with some error messages? If so, what are they?
>>> 
>>> Does the script run, but fails to produce output?
>>> 
>>> Does the script produce output, but it is not as expected? 
>> 
>> 
> 
> <plotting.py.txt>_______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160422/0c98b61e/attachment.html>


More information about the Matplotlib-users mailing list