Re: [Matplotlib-users] MPL with PyQt: different behavior on Windows vs. Linux

2009-06-10 Thread Steve Nicholes
There is definitely something weird going on here.  It could still be a bad command on my part, but I cannot get Windows to plot interactively if I embed it in pyqt.  I even tried adapting one of the qt examples from the matplotlib homepage and I still have the same problem (i.e., it will only p

Re: [Matplotlib-users] autocrop function

2009-06-10 Thread Jae-Joon Lee
I guess I misunderstood your intention. As you posted the message in the mpl list, I assumed that you want to crop out the boundary of the mpl figure, which seems to be not the case. Sorry for the noise. -JJ On Wed, Jun 10, 2009 at 12:09 PM, Nils Wagner wrote: > On Wed, 10 Jun 2009 02:26:54 -040

Re: [Matplotlib-users] plots do not scale to size

2009-06-10 Thread John Hunter
On Wed, Jun 10, 2009 at 9:40 AM, Paul Anton Letnes wrote: > Hm, I see. Thanks for an informative answer. I'll dig into my rcParams > and matplotlibrc then... That is worth doing, but you needn't change the defaults. You can also pass in the arguments explicitly: fig = plt.figure((3,3)) fig.subp

Re: [Matplotlib-users] Removing picked line

2009-06-10 Thread Ole Streicher
Hi John, John Hunter writes: > On Wed, Jun 10, 2009 at 9:11 AM, John Hunter wrote: >> ax.lines.remove(someline) >> fig.canvas.draw() > See also > http://matplotlib.sourceforge.net/users/artists.html Thank you very much, this helped a lot. (the manpages to artists and axes are a bit complicated

Re: [Matplotlib-users] plots do not scale to size

2009-06-10 Thread Paul Anton Letnes
On 10. juni. 2009, at 14.53, John Hunter wrote: > On Wed, Jun 10, 2009 at 1:58 AM, Paul Anton > Letnes wrote: > >>> This _must_ be a bug. Consider the following: >>> ## >>> import matplotlib > > No it is not a bug -- mpl is doing what you tell it to do. Consider > figure() s

[Matplotlib-users] windows installer missing from sourceforge; where to get previous versions?

2009-06-10 Thread reckoner
hi, The Windows installer binaries have been missing from sourceforge for awhile now. I understand there are problems with the latest version for windows. Where can I get the previous versions that have working Windows installer binaries? Thanks in advance. -

Re: [Matplotlib-users] Removing picked line

2009-06-10 Thread John Hunter
On Wed, Jun 10, 2009 at 9:11 AM, John Hunter wrote: >> The other question that now remains is: how can I remove a line from an >> axes? > > ax.lines.remove(someline) > fig.canvas.draw() See also http://matplotlib.sourceforge.net/users/artists.html which covers this and other useful things. J

Re: [Matplotlib-users] Removing picked line

2009-06-10 Thread John Hunter
On Wed, Jun 10, 2009 at 9:04 AM, Ole Streicher wrote: > Hi John, > > John Hunter writes: >> If for some reason the built in pick_event is unsuitable, you can >> create your own matplotlib.backend_bases.MouseEvent and call >> line.contains(event) for each line you want to hit test. > > Thank you, t

Re: [Matplotlib-users] Removing picked line

2009-06-10 Thread Ole Streicher
Hi John, John Hunter writes: > If for some reason the built in pick_event is unsuitable, you can > create your own matplotlib.backend_bases.MouseEvent and call > line.contains(event) for each line you want to hit test. Thank you, that works for me. But for some reason, the "y" coordinate is inve

Re: [Matplotlib-users] updating changed diagram?

2009-06-10 Thread Ryan May
On Wed, Jun 10, 2009 at 6:22 AM, Ole Streicher wrote: > Hi Mathias, > > Matthias Michler writes: > > you can reset the ydata using: > > ydata = myline.get_ydata() > > ydata += 50 > > myline.set_ydata(ydata) # pass new data to line object > > Does this work for you? > > Yes. Altough I dont underst

Re: [Matplotlib-users] axis break: a bit of a random query

2009-06-10 Thread Ryan May
On Tue, Jun 9, 2009 at 9:42 AM, Nicholas Stephens < nicholas.steph...@univ-brest.fr> wrote: > Hi all, > > I am still very green when it comes to the use of matplotlib but I am > finding the versatility and robustness of the package extremely useful > at present. One application I am constantly usi

Re: [Matplotlib-users] Removing picked line

2009-06-10 Thread John Hunter
On Wed, Jun 10, 2009 at 6:55 AM, Ole Streicher wrote: > Hi again, > > when right-clicking on one or more lines in a plot, I want to present > the user a context menu where he can select to remove these lines. > > Preferrably I want to do this not with a 'pick_event' connection but > with the (Qt) b

Re: [Matplotlib-users] plots do not scale to size

2009-06-10 Thread John Hunter
On Wed, Jun 10, 2009 at 1:58 AM, Paul Anton Letnes wrote: >> This _must_ be a bug. Consider the following: >> ## >> import matplotlib No it is not a bug -- mpl is doing what you tell it to do. Consider >>> figure() >>> subplot(111) >>> plot([1,2,3]) >>> xlabel('hi mom', font

Re: [Matplotlib-users] matplotlibrc customizing

2009-06-10 Thread Gary Ruben
> When I f.e. change > > #xtick.labelsize : 14 (from '12') > #xtick.direction : out (from 'in') Uncomment the lines. #xtick.labelsize : 14 #xtick.direction : out to xtick.labelsize : 14 xtick.direction : out --

[Matplotlib-users] Removing picked line

2009-06-10 Thread Ole Streicher
Hi again, when right-clicking on one or more lines in a plot, I want to present the user a context menu where he can select to remove these lines. Preferrably I want to do this not with a 'pick_event' connection but with the (Qt) backend methods since the context menu should contain more options

Re: [Matplotlib-users] updating changed diagram?

2009-06-10 Thread Matthias Michler
Hi Ole, I think the ydata of the line is updated, but the plot is not updated. To achieve the latter, you need to use set_ydata. I'm sorry if this was your original question and I didn't get this. >From the source code of set_data another way seems to be possbilbe - although quite strange: yda

Re: [Matplotlib-users] [Matplotlib-announce] Fwd: Matplotlib ticklabels error

2009-06-10 Thread Sandro Tosi
Hi Jothy, first of all, please do not use -announce mailing list, that is for... announcement. There is matplotlib-users for users support request like this one (move the discussion there). On Wed, Jun 10, 2009 at 11:08, KS Jothy wrote: > Hi, > > I am getting a strange error while platting a graph

Re: [Matplotlib-users] updating changed diagram?

2009-06-10 Thread Ole Streicher
Hi Mathias, Matthias Michler writes: > you can reset the ydata using: > ydata = myline.get_ydata() > ydata += 50 > myline.set_ydata(ydata) # pass new data to line object > Does this work for you? Yes. Altough I dont understand why I have to set it again (the ydata still belong to the curve) Tha

Re: [Matplotlib-users] Pylab causes crash if not given some idle time using raw_input()?

2009-06-10 Thread Wellenreuther, Gerd
Dear all, just noticed that the problem also happens with the raw_input - I guess I just closed the figure-windows during the raw_input-call. Closing the figures (either manually or with pylab.close()) prevents the crash, but I wonder why? Memory should not be an issue, python crashes when only

Re: [Matplotlib-users] updating changed diagram?

2009-06-10 Thread Matthias Michler
Hi Ole, you can reset the ydata using: ydata = myline.get_ydata() ydata += 50 myline.set_ydata(ydata) # pass new data to line object or just in-place myline.set_ydata( myline.get_ydata() + 50) after that you need a draw to redraw the figure or a show to show up the result. Does this work for y

[Matplotlib-users] updating changed diagram?

2009-06-10 Thread Ole Streicher
Hi, I want to change the value of a line in an axes. What I tried is myline = axes.plot(...) xdata, ydata = myline.get_data() for i in range(ydata.__len__()): ydata[i] += 50 to shift all y values up by 50. But I dont see the change I made, even after a show(). How can I force the diagram to

[Matplotlib-users] Pylab causes crash if not given some idle time using raw_input()?

2009-06-10 Thread Wellenreuther, Gerd
Dear all, I just again faced a problem appearing whenever I quickly generate multiple plots (using Windows XP, Python 2.5, matplotlib 0.98.1): > > pylab.ion() > for n in range(n_elements): > ##print > ##print element_symbols[n]+'-'+element_linegroup[n] > ##print normalized_mass_frac

[Matplotlib-users] plots do not scale to size

2009-06-10 Thread Paul Anton Letnes
> On 9. juni. 2009, at 17.18, Jouni K. Seppänen wrote: > >> Chaitanya Krishna writes: >> >>> On Tue, Jun 9, 2009 at 12:05 PM, Paul Anton Letnes >>> >> > wrote: When I run the script below, the xlabel and ylabel do not show up. If I increase the figure size, it all works fin