Re: [Matplotlib-users] Plotting Arrows

2010-09-26 Thread Marius 't Hart
The function arrow() works for me (Python 2.6.5, matplotlib 99.1.2). Perhaps something in your installation needs to be changed. You might try pylab.Arrow() to create patches or perhaps quiver() which draws a whole set of arrows. On 09/26/2010 08:11 AM, Gus Ishere wrote: I'd like to plot som

Re: [Matplotlib-users] ginput(0) termination error

2010-06-07 Thread Marius 't Hart
Can't you do ginput(n=1) in a while loop? Ginput needs to end at some point, right? Initiating a never ending loop seems like the wrong solution for any real-life problem. On 06/07/2010 01:15 PM, Thøger Emil Juul Thorsen wrote: > Bump - no one knows a solution/workaround to this? > > > >> He

[Matplotlib-users] Fwd: Clearing A Figure (I Know That This Has Been Posted Before But I Does Not Work For Me)

2010-05-27 Thread Marius 't Hart
What I usually do is to clear the axis (using cla() only) right after creating or accessing it (either with figure() or subplot() or similar magic): from pylab import * fig = figure(num=1) for example in range(5): cla() plot(rand(100)) savefig('test-%d.png'%example) Original

[Matplotlib-users] error using LinearSegmentedColormap example from SciPy Cookbook

2010-05-11 Thread Marius 't Hart
Hi all, When creating a new colormap, with a script based on the example given here: http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps When plotting the data, and when adding the colobar, I get this error: In [27]: Exception in Tkinter callback Traceback (most recent call last): File "/u

Re: [Matplotlib-users] colorbar() and plt.title()

2010-04-03 Thread Marius 't Hart
Try this: from pylab import * from numpy import * Z = random.randn(100,100) figure() subplot(1,2,1) imgHandle = imshow(Z, cmap=cm.gray) scatter(random.rand(10)*100,random.rand(10)*100) colorbar(imgHandle) title('Hello') show() By the way, I find jet a bad colormap to represent scientific data:

Re: [Matplotlib-users] Heat Map

2010-04-02 Thread Marius 't Hart
rachel-mikel_arcejae...@hmc.edu wrote: > Hello, > > I'm trying to create a heat map from two lists of corresponding X and Y > coordinates. > > I've tried both numpy.histogram2d() and pyplot.hexbin(). > > The histogram I get back doesn't correspond to the points I gave it. It seems > as if it's so

Re: [Matplotlib-users] contourf creats white-like lines (or gaps) between each two color patches

2010-03-22 Thread Marius 't Hart
Actually, it does not draw the polygon edges, but leaves small gaps between them. Through those gaps you can see the background. (This also happens with polar plots and other polygons by the way.) I consider this a bug, though there are ways around it. For contour plots one can plot two contour

Re: [Matplotlib-users] best format for MS word?

2009-09-02 Thread Marius 't Hart
Can't word handle eps files? In the WYSIWYG it will show the embedded preview as far as I recall, so the image will seem empty if their is no preview embedded or blurry if the preview is blurry. For printing however (including to pdf) it uses the vector version. Of course, eps can't handle tran

Re: [Matplotlib-users] formatting figures for publciation

2008-09-28 Thread Marius 't Hart
Yes: savefig On Fri, 2008-09-26 at 18:49 -0400, Gideon Simpson wrote: > Is there anything akin to this MATLAB script: > > http://www.mathworks.com/company/newsletters/digest/june00/export/ > > available for mpl? or some simple set of commands that will > accomplish the same task? > -gideon >

Re: [Matplotlib-users] Resolution of SVG output

2007-01-05 Thread Marius 't Hart
Dear Chris, That site really cleared the basic resolution stuff up for me, and it was pretty much as I expected. Your remark about how imshow() works with SVG made me wonder. Might it be that the output of imshow() is set in pixels so that when I increase the dpi of the total figure, the subplots

Re: [Matplotlib-users] subplot problems using comma notation

2006-11-17 Thread Marius 't Hart
eers, > Josh > > On Fri, 17 Nov 2006, Marius 't Hart wrote: > > >> I have the same symptoms on my Ubuntu 6.06 using python 2.4 and >> matplotlib 0.82-5. Where did you find matplotlib 0.87-5 though? It's not >> in the repositories as far as I can tell.

Re: [Matplotlib-users] subplot problems using comma notation

2006-11-17 Thread Marius 't Hart
I have the same symptoms on my Ubuntu 6.06 using python 2.4 and matplotlib 0.82-5. Where did you find matplotlib 0.87-5 though? It's not in the repositories as far as I can tell. I use synaptic for upgrading. Josh Lifton schreef: > Thanks for confirming that it works on another system. As I'm cur

Re: [Matplotlib-users] Type Error

2006-11-13 Thread Marius 't Hart
Try opening a python shell and type: from pylab import * a = [1,2,3] a What is a? Is it an array? Make sure you create an array by giving a command like this: a = array([1,2,3]) [EMAIL PROTECTED] schreef: > Hello I have installed matplotlib on su 10.0 > > when i do only this example > > from