[Matplotlib-users] build matplotlib on OSX Lion

2011-08-09 Thread Randy Heiland
Hi all,

Since I recently got a new machine with a fresh install of OSX Lion, I thought 
I'd share my building-from-source experience.  There seems to be a variety of 
approaches for doing this that folks have offered up  - including installing 
another Python, installing homebrew (and subsequent pkgs), etc.  So I thought 
I'd add one more  - and for all I know this is redundant info.

My approach was the following:
- use the Python that came with the system:
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin

- download matplotlib from git:
git clone git://github.com/matplotlib/matplotlib.git

cd matplotlib
export CFLAGS='-I/usr/X11/include/freetype2 -I/usr/X11/include/libpng15'

cd /usr/local/lib
sudo ln -s /usr/X11/lib/libpng15.dylib libpng15.dylib
sudo ln -s /usr/X11/lib/libfreetype.6.dylib libfreetype.dylib

python setup.py build
sudo python setup.py install

-Randy
--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Fwd: build matplotlib on OSX Lion

2011-08-09 Thread Randy Heiland
A user just replied with some problems he had and made me realize that I'd 
forgotten that I manually installed a freetype2 lib (which made the earlier 
build recipe work).  If I undo that manual freetype2 installation, then I 
*believe* the earlier recipe will work with the following change:

export CFLAGS='-I/usr/X11/include -I/usr/X11/include/freetype2 
-I/usr/X11/include/libpng15'

-Randy

Begin forwarded message:

 From: Randy Heiland heil...@indiana.edu
 Subject: build matplotlib on OSX Lion
 Date: August 9, 2011 4:45:31 PM EDT
 To: matplotlib-users@lists.sourceforge.net
 
 Hi all,
 
 Since I recently got a new machine with a fresh install of OSX Lion, I 
 thought I'd share my building-from-source experience.  There seems to be a 
 variety of approaches for doing this that folks have offered up  - including 
 installing another Python, installing homebrew (and subsequent pkgs), etc.  
 So I thought I'd add one more  - and for all I know this is redundant info.
 
 My approach was the following:
 - use the Python that came with the system:
 Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
 [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
 
 - download matplotlib from git:
 git clone git://github.com/matplotlib/matplotlib.git
 
 cd matplotlib
 export CFLAGS='-I/usr/X11/include/freetype2 -I/usr/X11/include/libpng15'
 
 cd /usr/local/lib
 sudo ln -s /usr/X11/lib/libpng15.dylib libpng15.dylib
 sudo ln -s /usr/X11/lib/libfreetype.6.dylib libfreetype.dylib
 
 python setup.py build
 sudo python setup.py install
 
 -Randy

--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] dynamic image update

2009-06-16 Thread Randy Heiland
Can someone point me to the best way to dynamically update a 2D  
[image] array (think of cellular automata)?  E.g., this simple example  
works, but gets sluggish after several iterations:

import numpy as N
import pylab as P

nx = 20
ny = 20
c = N.zeros(nx*ny, dtype='int8')
c.resize(ny,nx)

iters = 50
for its in range(iters):
   ix0 = N.random.rand()*nx
   iy0 = N.random.rand()*ny
   c[iy0,ix0] = 1
   P.imshow(c,interpolation='nearest')
   P.draw()

I'm guessing I'll want to use the mpl's API, but unsure of the best  
approach.  I'm currently using mpl 0.98.5.

thanks, Randy

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users