Mac O$, Anaconda and movie

Hello.

In this page, there is the example moviewriter.py. I can’t use, and the error message is the following one.

File “//anaconda/lib/python2.7/site-packages/matplotlib/animation.py”, line 64, in getitem return self.avail[name]

KeyError: 'ffmpeg’

Is there a way to use such kind of functionnality with Anaconda ?

If not, is there a way to produce at least a folder containing each frame picture ?

Christophe BAL

Hello,
I’ve found how to do that.

  1. Donwload the binary ffmpeg from here.
  2. Copy this binary file into the folder anaconda/bin.
    That’s all !
···

2014-03-19 10:40 GMT+01:00 Christophe Bal <projetmbc@…287…>:

Hello.

In this page, there is the example moviewriter.py. I can’t use, and the error message is the following one.

File “//anaconda/lib/python2.7/site-packages/matplotlib/animation.py”, line 64, in getitem return self.avail[name]

KeyError: 'ffmpeg’

Is there a way to use such kind of functionnality with Anaconda ?

If not, is there a way to produce at least a folder containing each frame picture ?

Christophe BAL

Dear matplotlib users,

I'm having trouble using Basemap through the object oriented interface
of Matplotlib. All the examples on the website use pyplot. But that does
not work if plots are generated in a parallel environment, i.e., in a
web application, since pyplot is obviously not thread safe.

Does anyone have a working example of Basemap without pyplot?
One of the issues I'm having is that

coastlines = map.drawcoastlines(linewidth=0.25)

does not show any coastlines. The underlying figure is created like this:

from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure, Axes

fig = Figure()
canvas = FigureCanvas(fig)
ax = Axes(fig, [0., 0., 1., 1.])
fig.add_axes(ax)

I feel a bit lost here. Any help is appreciated.

Cheers,
Remo

Stupid me! I overlooked parameter 'ax' of class Basemap. You can pass an
axis when creating a Basemap instance:

ax = fig.add_axes([0., 0., 1., 1.])
map = Basemap(...., ax=ax)

Best,
Remo

···

On 03/19/2014 04:41 PM, Remo Goetschi wrote:

Dear matplotlib users,

I'm having trouble using Basemap through the object oriented interface
of Matplotlib. All the examples on the website use pyplot. But that does
not work if plots are generated in a parallel environment, i.e., in a
web application, since pyplot is obviously not thread safe.

Does anyone have a working example of Basemap without pyplot?
One of the issues I'm having is that

coastlines = map.drawcoastlines(linewidth=0.25)

does not show any coastlines. The underlying figure is created like this:

from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure, Axes

fig = Figure()
canvas = FigureCanvas(fig)
ax = Axes(fig, [0., 0., 1., 1.])
fig.add_axes(ax)

I feel a bit lost here. Any help is appreciated.

Cheers,
Remo

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users