[Image-SIG] PIL on intel based Mac not compiling

Christopher Barker Chris.Barker at noaa.gov
Thu Jun 12 18:45:56 CEST 2008


Pietro Speroni di Fenizio wrote:
>> If you are trying to put a MPL plot in a TK app, Matplotlib can do that
>> directly -- no need to go through files, GIF or otherwise.
> 
> But how? How??

This is really a question for the matplotlib list, but here's a short 
explanation:

Matplotlib can use a number of "back-ends". These are the parts that do 
the actual rendering. The some of the options are:

TkInter, pyGTK, wxPython, Agg, pyQT, PDF, PS, etc.

> But then no explanations are given on
> how to install,

TkInter is probably installed by default.

> activate, command and get obeyed by them

The default back end is set in your .matplotlibrc file. Alternately, you 
can set it at runtime like so:

import matplotlib
matplotlib.use('TkAgg')

then you can do

import pylab

etc, and tk will be used.

 > I would really need to be able to interact with
> Tk in a graphical way.

What you want is to embed MPL in a Tk app. To see how to do this, take a 
look at the examples:

user_interfaces/embedding_in_tk*

The examples can be downloaded as a zip file from the main MPL web site:

http://matplotlib.sourceforge.net/

direct further questions to the MPL list:

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Image-SIG mailing list