[Matplotlib-users] Arrow question/request

2010-02-14 Thread rcnelson
Most of the plots I need to make for work have very different x and y axis scales, and under these conditions, the pyplot.arrow function (which I think is a FancyArrow) makes arrows where the heads are pretty distorted. (MPL version 0.99.1 -- Windows; version 0.99.1.1-r1 -- Gentoo) I've spent qui

Re: [Matplotlib-users] Enter Figure on Macs

2010-02-14 Thread David Arnold
John, Only the wxagg worked. Here is the output: $HOME=/Users/darnold CONFIGDIR=/Users/darnold/.matplotlib matplotlib data path /Library/Frameworks/Python.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/mpl-data loaded rc file /Users/darnold/.matplotlib/matplotlibrc matplotlib ve

[Matplotlib-users] Easy come easy go

2010-02-14 Thread David Arnold
All, This example: http://matplotlib.sourceforge.net/examples/event_handling/keypress_demo.html Raises this exception o my Macbook when the key 's' is pressed: The debugged program raised the exception unhandled TypeError "save_figure() takes exactly 1 argument (2 given)" File: /Library/Frame

Re: [Matplotlib-users] Enter Figure on Macs

2010-02-14 Thread John Hunter
On Sun, Feb 14, 2010 at 6:53 PM, David Arnold wrote: > All, > > Any Mac users out there? This script from the User Guide does not seem to > recognize entering or leaving a figure. Any thoughts? My Mac is currently dead, but I developed these events while I was a mac user and so am pretty sure th

Re: [Matplotlib-users] memory leak for GTKAgg animation

2010-02-14 Thread John Hunter
On Sat, Feb 13, 2010 at 2:53 PM, John Jameson wrote: > HI, > I find the very basic animation below has a memory leak (my pagefile usage > number keeps growing in the Windows XP Windows Task Manager Performance > graph).I don't see this with the "animation_blit_gtk.py" example on: > > http://matplo

[Matplotlib-users] Enter Figure on Macs

2010-02-14 Thread David Arnold
All, Any Mac users out there? This script from the User Guide does not seem to recognize entering or leaving a figure. Any thoughts? # enterleave.py import matplotlib.pyplot as plt def enter_axes(event): print 'enter_axes', event.inaxes event.inaxes.patch.set_facecolor('yellow') ev

Re: [Matplotlib-users] How to blank an area of the canvas?

2010-02-14 Thread Jae-Joon Lee
I have added a bbox support for "restore_region", but I'm afraid that this feature is not well tested. And I guess what you find is, unfortunately, a bug. While I'll try to push the changes to the svn tomorrow, you may try to monkey-patch with following code. from matplotlib.transforms import Bbo

Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Eric Firing
Wayne Watson wrote: > Thank you for the code below. Yes, it actually does what I want it to > do. The difference in what I did similarly yesterday (see my response to > Philipp moments ago) is the [ ], a list. All this for one simple bit of > list notation. Newer versions of mpl do not requir

Re: [Matplotlib-users] turning off tick labels

2010-02-14 Thread Jeffrey Blackburne
On Feb 14, 2010, at 5:41 PM, Jan Strube wrote: > Dear matplotters, > > I'm trying to follow > http://matplotlib.sourceforge.net/examples/pylab_examples/ > ganged_plots.html > as an example how to turn of the ticks in the case of shared x axes. > The tick labels are gone, but unfortunately, matpl

[Matplotlib-users] half-filled markers, two-colors

2010-02-14 Thread T J
I ran across: http://old.nabble.com/half-filled-markers-td24003576.html The name "fillstyle" can give the wrong impression about what is being filled. For example, see the comment here: http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg13074.html It's probably too l

[Matplotlib-users] turning off tick labels

2010-02-14 Thread Jan Strube
Dear matplotters, I'm trying to follow http://matplotlib.sourceforge.net/examples/pylab_examples/ganged_plots.html as an example how to turn of the ticks in the case of shared x axes. The tick labels are gone, but unfortunately, matplotlib still plots a '1e5' on the axis for which I have turned of

Re: [Matplotlib-users] LineBuilder

2010-02-14 Thread John Hunter
On Sun, Feb 14, 2010 at 3:34 PM, David Arnold wrote: > line, =ax.plot([0], [0]) > plt.show() > linebuilder=LineBuilder(line) > > However, if I put the plt.show() on the last line, it works. Can anyone > explain? plt.show is meant to raise all GUI windows and start the mainloop. For many user int

Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Philipp Bender
Hi Wayne, (I wanted to answer you directly but the mail came back, don't know why) I have several points that you really should work on if you expect anyone to answer to your mails in future. First, you should check the destination of your messages. I got at least three of your messages addres

[Matplotlib-users] LineBuilder

2010-02-14 Thread David Arnold
All, I am curious why this doesn't work: # linebuilder.py import matplotlib.pyplot as plt class LineBuilder: def __init__(self, line): self.line=line self.xs=list(line.get_xdata()) self.ys=list(line.get_ydata()) self.cid=line.figure.canvas.mpl_connect('button

[Matplotlib-users] Python 3

2010-02-14 Thread David Arnold
All, Can anyone shed light on how python 3 is working together with matplotlib, scipy, and numpy? David -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winni

Re: [Matplotlib-users] Down Another Pathway with Plot-Show (Finsihed!)

2010-02-14 Thread Wayne Watson
Well, well. One can get interesting results by persistence. The code I speak of here now works without using ipython. All it took was moving the offending def (show() at the end) and putting it somewhere else where the completion of the def bounced right back into the main flow of the program. T

Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Wayne Watson
Thank you for the code below. Yes, it actually does what I want it to do. The difference in what I did similarly yesterday (see my response to Philipp moments ago) is the [ ], a list. All this for one simple bit of list notation. Somehow I'm not getting through to anyone what I have actually

Re: [Matplotlib-users] How to blank an area of the canvas?

2010-02-14 Thread Brendan Barnwell
Brendan Barnwell wrote: > I'm trying to find the quickest way to erase a rectangular area of > the figure canvas. I tried using canvas.restore_region with the > optional bbox argument, but there seems to be some mismatch between > the measurement units of the saved buffer object and the c

Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Wayne Watson
Did you see the figure I included to John? If not, let me put it simply. Suppose you have 50 straight sticks connected at their ends with some hook. I want to color the hook holding stick 10 to 11, but color no other hook. Not 99 hooks. Yesterday, I tried to do a simple plot of three points

Re: [Matplotlib-users] tick labels in colorbar?

2010-02-14 Thread Philipp Bender
Hi Nico, I didn't test it, but maybe with something like that: rc('text', usetex=True) [taken from http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/tex_demo.py] ax.set_xticks((-pi,pi)) ax.set_xticklabels(('$-\pi$','$\pi$')) [taken from http://matplotlib.sourceforg

[Matplotlib-users] Import bug for numpy >= 2.0

2010-02-14 Thread Charles R Harris
Lines 147-151 of __init__ need to be changed to import numpy nn = numpy.__version__.split('.') if not (int(nn[0]) > 1 or int(nn[0]) == 1 and int(nn[1]) >= 1): raise ImportError( 'numpy 1.1 or later is required; you have %s' % numpy.__version__) Chuck --

Re: [Matplotlib-users] How Does One Learn to Use MatPlotLib?

2010-02-14 Thread dred
Not read it myself but 'Matplotlib for Python Developers' might be what you're after - see review http://dalelane.co.uk/blog/?p=1222 Best way to learn Matplotlib is to use a good IDE like Spyder. I find it much easier than IPython. http://code.google.com/p/spyderlib/ Installing Python(x,y) is

Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Filipe Pires Alvarenga Fernandes
Dear Wayne Watson, As yourself I'm also new to matplotlib (and python) and I know that learning such a library can be overwhelming at first. Still, this community/mailist has answered all my newbie questions, even when they were clearly in the manual or have already been answered in previous posts

Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Jae-Joon Lee
On Sat, Feb 13, 2010 at 11:28 PM, Wayne Watson wrote: > Well, I'm not quite sure what to say to your claim. In certain instances I > am trying to get through to someone here that something is missing for > newbies. In one word, pedagogy (as perhaps in a text book, not a reference > manual or dicti

[Matplotlib-users] tick labels in colorbar?

2010-02-14 Thread Nico Schlömer
Hi, I'm plotting a colorbar with pylab.colorbar(ticks=(-pi,0,pi)) and trying to add proper "\pi" labels to it. Couldn't find out how to do that from the manual -- any hints here? Cheers, Nico -- SOLARIS 10 is the O

Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Philipp Bender
Why don't you just use the code provided here: http://matplotlib.sourceforge.net/examples/api/watermark_image.html The first thing to do when you want to plot something is maybe to look at the examples section, isn't it? It shows pretty good how to not only mark points, but also to mark points