[Matplotlib-users] quick documentation fix

2011-06-14 Thread Uri Laserson
In the Legend Guide: http://matplotlib.sourceforge.net/users/legend_guide.html it gives a list of artists that the legend can handle (e.g., Line2D, Patch, etc.). However, it leaves out CircleCollection. Best, Uri ..

Re: [Matplotlib-users] representing discrete values by colors

2011-06-14 Thread Eric Firing
On 06/14/2011 12:36 AM, Bala subramanian wrote: > Friends, > I have a simple array like this data=[0,0,1,1,3,1,0,1,1,3]. I want to > make a plot (using pcolor/matshow) by giving distinct color to each > integer. Something like green for zero, red for 1 and blue for 3. Your > suggestions / any pseud

[Matplotlib-users] Can there is any method for embeding basemap in pyqt4?

2011-06-14 Thread fanmpf
Dear Sir/Ms: I am using matplotlib and pyqt4,and i want design a qt program for display map.Now i have embed matplotlib in qt,but i can not embed basemap in qt,i need get your help!Thanks! Bestwish! A python student。 -

[Matplotlib-users] Can there is any method for embeding basemap in pyqt4?

2011-06-14 Thread fanmpf
Dear Sir/Ms: I am using matplotlib and pyqt4,and i want design a qt program for display map.Now i have embed matplotlib in qt,but i can not embed basemap in qt,i need get your help!Thanks! Bestwish! A python student。 -

[Matplotlib-users] mplot3d: How to convert a 3D coordinate to a 2D view coordinate

2011-06-14 Thread xpli02
I want to annotate a 3D point when I use a mouse to click it. In order to know which point I am clicking, I am thinking to compare the mouse 2d coordinate and that for this point. But I don't know how to get the 2D view coordinate for this point. Does any one know how to do this? Or you have any a

Re: [Matplotlib-users] remove white area around

2011-06-14 Thread Justin McCann
On Mon, Jun 13, 2011 at 8:37 AM, Andrea Crotti wrote: > > I found this question asked other times, but trying myself there is no > way that I get something working.. > > So I just want to generate a pdf from a plot with the smallest possible > margin, and I was trying for example this: > >fig

Re: [Matplotlib-users] X-ticklabels not working in histogram?

2011-06-14 Thread Daπid
ax.set_xticks(bins) ax.set_xticklabels(n, rotation='vertical') The first one is for creating the ticks in proper places and the second is plotting each number under it. n is already a list, so you don't want to put it again on it. What you are doing with it is to plot under each bar the height of

[Matplotlib-users] representing discrete values by colors

2011-06-14 Thread Bala subramanian
Friends, I have a simple array like this data=[0,0,1,1,3,1,0,1,1,3]. I want to make a plot (using pcolor/matshow) by giving distinct color to each integer. Something like green for zero, red for 1 and blue for 3. Your suggestions / any pseudo code would be of great help. Thanks, Bala -

[Matplotlib-users] X-ticklabels not working in histogram?

2011-06-14 Thread Victor Hooi
heya, I'm trying to use Matplotlib to generate a histogram of some measurements: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as pyplot ... fig = pyplot.figure() ax = fig.add_subplot(1,1,1,) n, bins, patches = ax.hist(measurements, bins=50, range=(graph_minimum, graph_maximum)

Re: [Matplotlib-users] Histogram with single series - colour coding different ranges?

2011-06-14 Thread Victor Hooi
Goyo, Aha, so I can call .set_facecolor() on the Patch objects, and then force the graph to re-draw(). I've tested it - it works when I do savefig(). And if I'm running it interactive, I just run matplotlib.draw() after modifying the patch list. I suppose I can combine that technique with the ca

Re: [Matplotlib-users] Histogram with single series - colour coding different ranges?

2011-06-14 Thread Victor Hooi
Ben, Awesome - thanks for the sample code. I had to make a slight change - multiplying 'y' by a float doesn't work: TypeError: can't multiply sequence by non-int of type 'float' I just did a cast to int, and it worked - not sure if this is a bad practice in Python though?: cs = (['y'] * int(