Re: [Matplotlib-users] matplotlib with tk? online examples fail...

2009-09-25 Thread Jonathan Tomshine
You're right! I almost forgot that I had installed a local copy of matplotlib a long time ago. It looks like Python was finding that copy before it found the "correct" one. The example appears to work now. Thanks again, -Jon On Fri, Sep 25, 2009 at 2:14 PM, Jeff Whitaker wrote: > Jonathan T

Re: [Matplotlib-users] matplotlib with tk? online examples fail...

2009-09-25 Thread Jeff Whitaker
Jonathan Tomshine wrote: > I'm quite new to python, but am attempting to add basic plotting > functionality to a tk-based GUI application that is run primarily on a > Mac. My initial attempts at simply calling "plot" or "errorbar" from > within the application resulted in erratic behavior on Pytho

[Matplotlib-users] matplotlib with tk? online examples fail...

2009-09-25 Thread Jonathan Tomshine
I'm quite new to python, but am attempting to add basic plotting functionality to a tk-based GUI application that is run primarily on a Mac. My initial attempts at simply calling "plot" or "errorbar" from within the application resulted in erratic behavior on Python installed through macports on m

Re: [Matplotlib-users] Rectangles with position in data coords and width in axes coords

2009-09-25 Thread Eric Firing
Uri Laserson wrote: > Hi, > > I want to draw a rectangle whose center is at given x,y coords (data > coords), but whose width is in axes coords. The goal is to rewrite > boxplot so that if the scaling changes etc, the boxes will stay the > same width but their x and y positions will adjust accord

Re: [Matplotlib-users] interactive python session with matplotlib

2009-09-25 Thread Christopher Barker
Andre Walker-Loud wrote: >> IPython can remedy all your wonderings :) I second that! > What I have in mind is writing code that I can call from a terminal, as > opposed to interactively as with iPython. you can call ipython with a script as a command line parameter: ipython TheScriptToRun.py

Re: [Matplotlib-users] Two questions...

2009-09-25 Thread Gökhan Sever
On Fri, Sep 25, 2009 at 6:52 AM, John Hunter wrote: > On Thu, Sep 24, 2009 at 3:29 PM, Gökhan Sever > wrote: > > Hello, > > > > One easy one harder two questions :) > > > > My screenshot http://img213.imageshack.us/img213/3443/snapshot5.png > > > > 1-) I want to link bottom and top x axes as wel

[Matplotlib-users] Rectangles with position in data coords and width in axes coords

2009-09-25 Thread Uri Laserson
Hi, I want to draw a rectangle whose center is at given x,y coords (data coords), but whose width is in axes coords. The goal is to rewrite boxplot so that if the scaling changes etc, the boxes will stay the same width but their x and y positions will adjust accordingly. Does anyone have a good

Re: [Matplotlib-users] interactive python session with matplotlib

2009-09-25 Thread Andre Walker-Loud
Hi Gökhan, Thanks. I will start playing around with iPython. Andre On Sep 25, 2009, at 1:22 AM, Gökhan Sever wrote: On Thu, Sep 24, 2009 at 10:47 PM, Andre Walker-Loud > wrote: IPython can remedy all your wonderings :) http://matplotlib.sourceforge.net/users/shell.html -- Gökhan Hi G

Re: [Matplotlib-users] Controlling colours for NaN values with basemap

2009-09-25 Thread mdekauwe
Note palette.set_bad ('w',1.0) # Bad values (i.e., masked, set to white!) mdekauwe wrote: > > Problem solved thanks to Jose. > > For interest... > > import numpy as np > import matplotlib.pyplot as plt > a = np.array([[1,2,3,np.nan,5],[4,22,np.nan,11,9]]) > palette = plt.cm.jet > palette.set

Re: [Matplotlib-users] Controlling colours for NaN values with basemap

2009-09-25 Thread mdekauwe
Problem solved thanks to Jose. For interest... import numpy as np import matplotlib.pyplot as plt a = np.array([[1,2,3,np.nan,5],[4,22,np.nan,11,9]]) palette = plt.cm.jet palette.set_bad ('w',1.0) # Bad values (i.e., masked, set to grey 0.8 A = np.ma.array ( a, mask=np.isnan(a)) plt.imshow(A,int

[Matplotlib-users] patchcollection wihtout edgecolor and gradient filled patches

2009-09-25 Thread Leopold Stadler
Hi, I use a small script to read the elments of a vtk-file and plot them as polygons, therefore I create polygons with polygon = Polygon(coordinates) and collect them as patches: patches.append(polygon) afterwards I plot all patches with: p = PatchCollection(patches, alpha = 1.0,

[Matplotlib-users] Controlling colours for NaN values with basemap

2009-09-25 Thread mdekauwe
Hi, I am trying to plot a 2D array which contains some NaN values as a map. I would like to be able to control the colours assigned to these data points. At the moment it seems that there are given the same colour as the highest value in the array. Any suggestions would be appreciated. Although n

Re: [Matplotlib-users] Two questions...

2009-09-25 Thread John Hunter
On Thu, Sep 24, 2009 at 3:29 PM, Gökhan Sever wrote: > Hello, > > One easy one harder two questions :) > > My screenshot http://img213.imageshack.us/img213/3443/snapshot5.png > > 1-) I want to link bottom and top x axes as well as left and right y axes. > For now on the x-axis xticks are the time