A few things:
- What python and matplotlib are you using? I recommend Mac Python from 
python.org (use the binary installer) and the Mac binary installer for 
matplotlib.

- Note that matplotlib 0.99.0 is current. I suggest you upgrade.

- If you are using TkAgg (as seems likely), I'm not sure how well it 
plays with IDLE. I suggest you try the same example from the command 
line (Terminal application).

- What is your default backend? The normal Mac binary matplotlib uses 
TkAgg, which is a good choice in this case. But if you build from source 
the default is Agg, which is probably not what you want. You can set the 
default explicitly by editing .matplotlib/matplotlibrc (which has 
probably appeared now that you've run matplotlib once).

Here's a slightly shorter example (I confess I'm not familiar with 
matplotlib.pyplot so I hope this is not deprecated):
import pylab
pylab.plot([1, 2, 3])
pylab.show()

-- Russell

In article <426212.49374...@web110309.mail.gq1.yahoo.com>,
 Walid Majid <wma...@yahoo.com> wrote:

> Hi,
> 
> I am new to matplotlib and having trouble running a simple example, which I 
> found on one of the tutorial pages:
> 
> import matplotlib.pyplot as plt
> plt.plot([1,2,3])
> plt.ylabel('some numbers')
> plt.show()
> 
> The problem I encounter is that no plot actually shows up when I run the 
> above sequence on my idle session. 
> I am running on Mac OS X 10.5.6 and if anyone can give me some help, I would 
> appreciate it.  
> 
> Python: 2.5.4
> idle: 1.2.4
> matplotlib: 0.98.5.3
> 
> WM


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to