[Matplotlib-users] Movable Legend

2009-10-26 Thread Andrea Gavana
Hi All, a while ago, Che posted a nice example on how to drag a legend with the mouse. I have upgraded to matplotlib 0.99.1 and it looks like the nice example is not working anymore: for the life of me I can't figure out what's wrong. I attach the runnable sample submitted originally. Any sug

Re: [Matplotlib-users] Movable Legend

2009-10-27 Thread Andrea Gavana
Hi Jae-Joon, 2009/10/26 Jae-Joon Lee: > This is a known bug. While this is fixed in the svn, this did go into > the maint. branch. > As a workaround, add the following line after line 70. > >        self.legend.set_axes(self.subplot) Thank you for your help, it works perfectly. Andrea. "Imagina

[Matplotlib-users] plot(x,y) Trouble?

2010-02-21 Thread Andrea Gavana
On 21 February 2010 15:44, Alan G Isaac wrote: > On 2/21/2010 10:29 AM, Wayne Watson wrote: >> plot(2.8,3.4) doesn't work in my program >> > > Why should it? I believe it should. > Plot takes once or two *sequences* of numbers as arguments. I don't think it would be so complicated for the "plot"

[Matplotlib-users] Optimal positioning of text

2010-02-27 Thread Andrea Gavana
Hi All, I am trying to visualize some more text in an already rather crowded 2D plot. As this new information I want to display is optional (it depends on a use choice) but possibly very useful as information, I would like to add it as text inside my plot, and possibly to add it in a "smart" w

Re: [Matplotlib-users] Optimal positioning of text

2010-02-27 Thread Andrea Gavana
On 28 February 2010 01:18, Jae-Joon Lee wrote: > On Sat, Feb 27, 2010 at 12:29 PM, Andrea Gavana > wrote: >> This code is not doing anything useful as I always get a badness of 0, >> although I can see that the new text overlaps quite a lot of other >> artists. >

Re: [Matplotlib-users] Optimal positioning of text

2010-03-01 Thread Andrea Gavana
Hi Jae-Joon & All, On 28 February 2010 03:09, Jae-Joon Lee wrote: > If I read your correctly, > >       for l, b in zip(x, y): > >          # And here  I work with data coordinates (!) > >           dashBox = Bbox.from_bounds(l, b, width+5, height+5) >           badness = 0 >           for line in

[Matplotlib-users] Runtime customization of plots

2010-03-02 Thread Andrea Gavana
Hi All, I believe this question has been already asked in the past (I found something at http://old.nabble.com/A-good,-interactive-plotting-package-td15396445.html). I use matplotlib extensively in our applications, and some of my users repetitively asked for a way to customize *in runtime* t

Re: [Matplotlib-users] Runtime customization of plots

2010-03-03 Thread Andrea Gavana
Hi, On 3 March 2010 00:18, Gökhan Sever wrote: > > > On Tue, Mar 2, 2010 at 5:57 PM, Andrea Gavana > wrote: >> >> Hi All, >> >>    I believe this question has been already asked in the past (I >> found something at >> >> http://old.nabble.co

[Matplotlib-users] Custom Pie-Like Marker In Scatter

2008-04-17 Thread Andrea Gavana
Hi All, I was wondering about custom markers in the scatter method, and I thought to ask here for some suggestions. Basically, I have 3 variables to show, which are oil, gas and water production. I would like to define the bubble size by the sum of these three variables (or something akin), and

Re: [Matplotlib-users] Custom Pie-Like Marker In Scatter

2008-04-19 Thread Andrea Gavana
Hi Manuel, On Fri, Apr 18, 2008 at 8:49 AM, Manuel Metz wrote: > > Andrea Gavana wrote: > > Hi All, > > > > I was wondering about custom markers in the scatter method, and I > > thought to ask here for some suggestions. > > Basically, I have 3 variables t

Re: [Matplotlib-users] backend_wx and 0.98.0

2008-06-13 Thread Andrea Gavana
Hi Stan, On Fri, Jun 13, 2008 at 2:09 PM, Stan West wrote: > For what it's worth, the WX backend isn't working for me with wxPython > 2.8.4; I get the following when I attempt to show a figure: > > File "C:\Program > Files\Python25\lib\site-packages\matplotlib-0.98.0_r5467-py2.5-win32.egg\mat > p

Re: [Matplotlib-users] backend_wx and 0.98.0

2008-06-13 Thread Andrea Gavana
Hi Michael, On Fri, Jun 13, 2008 at 2:23 PM, Michael Droettboom wrote: > FWIW, I developed the new wx backend using wx 2.8.6.1, and it does currently > work for me. Unfortunately, it's always hard to know how to write for a > broad range of point releases for wxPython -- the documentation offers

[Matplotlib-users] offset_copy in transforms.py... Gone?

2008-06-27 Thread Andrea Gavana
Hi All, I have upgraded matplotlib from an old version I was using (0.91.2) to the very latest one (0.98.1). In one of my applications, I am using this code: from matplotlib.transforms import offset_copy def offset(ax, x, y): return offset_copy(ax.transData, x=x, y=y, units='dots') Righ

[Matplotlib-users] Axis Limits and Dash Text Misbehaviours

2008-06-27 Thread Andrea Gavana
Hi All, I have switched from matplotlib 0.91.2 to 0.98.1, and I have noticed a couple of "strange" behaviours (I am not using PyLab, but matplotlib embedded in wxPython): 1) If I use: ylims = self.myAxis.get_ylim() And then I add other lines to the plot, the value of ylims is modified. It g

[Matplotlib-users] Fwd: offset_copy in transforms.py... Gone?

2008-06-27 Thread Andrea Gavana
-- Forwarded message -- From: Andrea Gavana <[EMAIL PROTECTED]> Date: Jun 27, 2008 1:53 PM Subject: Re: [Matplotlib-users] offset_copy in transforms.py... Gone? To: Michael Droettboom <[EMAIL PROTECTED]> Hi Michael, On 6/27/08, Michael Droettboom wrote: > Yes, thi

Re: [Matplotlib-users] Axis Limits and Dash Text Misbehaviours

2008-06-27 Thread Andrea Gavana
Hi Michael, On Fri, Jun 27, 2008 at 7:54 PM, Michael Droettboom wrote: > Andrea Gavana wrote: >> >> 2) The dashed text positioning is wrong, you can see it by running >> dashpointlabel.py in the >> matplotlib_examples_0.98.1\examples\pylab_examples: the position of >

Re: [Matplotlib-users] Axis Limits and Dash Text Misbehaviours

2008-06-30 Thread Andrea Gavana
Hi All, On 6/27/08, Andrea Gavana wrote: > Hi Michael, > > On Fri, Jun 27, 2008 at 7:54 PM, Michael Droettboom wrote: > > Andrea Gavana wrote: > >> > >> 2) The dashed text positioning is wrong, you can see it by running > >> dashpointlabel.py in th

[Matplotlib-users] Box Off on Axis

2008-07-15 Thread Andrea Gavana
Hi All, I am helping my girlfriend in doing some plots for her thesis (!). Normally, matplotlib puts the graph in a box, left y axis, bottom x axis, right y axis, top x axis. What she would like to do is to remove the right y axis and the top x axis, akin the matlab command "box off" (if I rem

[Matplotlib-users] Contour/Contourf misunderstanding?

2008-12-10 Thread Andrea Gavana
Hi All, I am trying to create a contour map with matplotlib. I have modified the source code for the contour sample which comes with the matplotlib 0.98.3 online documentation: I am using the "contour(X, Y, Z, V)" API call and, as the docs say: """ contour(X,Y,Z,V) draw contour lines at the v

Re: [Matplotlib-users] Contour/Contourf misunderstanding?

2008-12-10 Thread Andrea Gavana
Hi Mauro & All, On Wed, Dec 10, 2008 at 10:32 AM, Mauro Cavalcanti wrote: > Dear Andrea, > > Greetings. I have tried your script here. > > 2008/12/10 Andrea Gavana <[EMAIL PROTECTED]>: >> I attach my small sample to the message. Am I doing something worng in >>

[Matplotlib-users] Plot3D errors

2006-10-21 Thread Andrea Gavana
Hi all,       am I the only one that noticed that 3D plots do not work anymore? Unless I am missing something, contour3D, contourf3D simply fails with this message:   Traceback (most recent call last):  File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 440, in add_axes    a = Axes(sel

[Matplotlib-users] Compatible Version of Numpy?

2006-10-23 Thread Andrea Gavana
Hi Chris, > Ok, thanks. I suspected that, but since even Google isn't able to find > an rc2 binary, I guess my only option is to wait for a compatible > Matplotlib to be released. Try here: http://prdownloads.sourceforge.net/numpy/numpy-1.0rc2.win32-py2.4.exe?download Or, for Python 2.5: http:

[Matplotlib-users] Removing a line from a plot

2006-11-08 Thread Andrea Gavana
Hi NG, I posted this question few months ago and I didn't receive any answer, so I'll try to rephrase my problem. I have a GUI written in wxPython, the main portion of it is a matplotlib canvas. There is a tree control on the left with checkboxes: if the user checks a checkbox, I add a line o

Re: [Matplotlib-users] Removing a line from a plot

2006-11-09 Thread Andrea Gavana
Thank you guys, and thanks for the Wiki entry ;-) Andrea. On 11/9/06, Pierre GM <[EMAIL PROTECTED]> wrote: > > > I have a GUI written in wxPython, the main portion of it is a > > matplotlib canvas. There is a tree control on the left with > > checkboxes: if the user checks a checkbox, I add a lin

Re: [Matplotlib-users] New to matplotlib; documentation errors

2006-11-09 Thread Andrea Gavana
Hi, >* You need PyNum (documented) I suppose you meant NumPy >* You need wxPython (not documented that I've found) No, I don't remember that particular need, unless things have changed in the meanwhile. If so, please correct my ignorance. > Python 2.4.3 (#1, Mar 30 2006, 11:02:

Re: [Matplotlib-users] Removing a line from a plot

2006-11-10 Thread Andrea Gavana
Hi Gang, Andrea> Thank you guys, and thanks for the Wiki entry ;-) Andrea. I have a further small question. When I add a line to my plot, the axes gracefully rescale to accomodate the new data plotted. However, when I remove a line, they do not rescale, even if I call: locator = self.leftaxis.ya

Re: [Matplotlib-users] Removing a line from a plot

2006-11-14 Thread Andrea Gavana
Hi John, sorry to come back so late with this subject. Well, I have tried your suggestion: > When you add lines to the plot, the dataLim are updated, but when you > remove data with del ax.lines[-1] etc, the dataLim are not updated. > If all you have in the Axes are line instances, you can up

[Matplotlib-users] line set_visible() and legend

2006-11-15 Thread Andrea Gavana
Hi gang, I apologize to come up always with noob questions, but it's been a while I used matplotlib seriously... Related to the "deleting a line from a plot" subject, I was thinking about *hiding* the line instead of completely erasing it from the graph. This is because the user can check or u

[Matplotlib-users] Plot vs Line Collections

2007-05-31 Thread Andrea Gavana
Hi All, I am writing an application (wxPython based) which embeds a big matplotlib figure as a main panel. Basically, this app shows oil well producers and gas injectors on a 2D map as dots (every dot represents its surface location), and a bunch of "streamlines" (i.e., straight lines or simpl

Re: [Matplotlib-users] Plot vs Line Collections

2007-06-01 Thread Andrea Gavana
Hi John, On 5/31/07, John Hunter wrote: > On 5/31/07, Andrea Gavana <[EMAIL PROTECTED]> wrote: > > Hi All, > > > > I am writing an application (wxPython based) which embeds a big > > matplotlib figure as a main panel. Basically, this app shows oil well > &

Re: [Matplotlib-users] Plot vs Line Collections

2007-06-01 Thread Andrea Gavana
Hi John, On 5/31/07, John Hunter wrote: > On 5/31/07, Andrea Gavana <[EMAIL PROTECTED]> wrote: > > Hi All, > > > > I am writing an application (wxPython based) which embeds a big > > matplotlib figure as a main panel. Basically, this app shows oil well > &

Re: [Matplotlib-users] Plot vs Line Collections

2007-06-02 Thread Andrea Gavana
Hi John and All, On 6/1/07, Andrea Gavana wrote: > Hi John, > > On 5/31/07, John Hunter wrote: > > On 5/31/07, Andrea Gavana <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > > > > I am writing an application (wxPython based) which embeds a big &g

[Matplotlib-users] "Visually equivalent" contours/parallels

2012-02-14 Thread Andrea Gavana
Hi All, after some great help from the Numpy users list, I have managed to create "parallel curves". Basically I have a set of X, Y data (around 1,000 elements each) and I want to create 2 parallel "curves" (offset curves) to the original one; "parallel" means curves which are displaced from

Re: [Matplotlib-users] "Visually equivalent" contours/parallels

2012-02-14 Thread Andrea Gavana
Hi Jerzy, On 14 February 2012 16:03, Jerzy Karczmarczuk wrote: > Andrea Gavana : >> after some great help from the Numpy users list, I have managed to >> create "parallel curves". >> >> >> But I can't really do that with the set of data I have, as

Re: [Matplotlib-users] "Visually equivalent" contours/parallels

2012-02-17 Thread Andrea Gavana
Hello Jerzy & All, On 14 February 2012 17:55, Jerzy Karczmarczuk wrote: > Andrea, I believe that if you find ONE good visual aspect ratio, > according to your figure size, that should do. Yo know your > figsize, and if you know all in your axes([bot,lft,wid, height]), that > this visual ratio shou

Re: [Matplotlib-users] backend with edition capabilities

2012-03-01 Thread Andrea Gavana
On 1 March 2012 21:37, Benjamin Root wrote: > > > On Wed, Feb 29, 2012 at 4:02 PM, Federico Ariza > wrote: >> >> Dear all >> >> I am a long time matplotlib user  (under linux) but new to the list >> (second post). >> >> On of the things that bothers me the most is the inability of the standard >>

[Matplotlib-users] Image as marker and axes "equal" aspect ratio

2012-09-19 Thread Andrea Gavana
Hi All, I am currently trying to plot 4 points (but they will be more, in an animated sequence later), and I am trying to use an image as a point marker. I am using the axes transData transform to get the point coordinates from the data world to the display world. Everything seems to be worki

Re: [Matplotlib-users] Image as marker and axes "equal" aspect ratio

2012-09-21 Thread Andrea Gavana
Hi Eric, All, On 21 September 2012 15:46, Moore, Eric (NIH/NIDDK) [F] wrote: >> -Original Message- >> From: Andrea Gavana [mailto:andrea.gav...@gmail.com] >> Sent: Wednesday, September 19, 2012 11:09 AM >> To: matplotlib-users@lists.sourceforge.net >> Subjec

Re: [Matplotlib-users] Image as marker and axes "equal" aspect ratio

2012-09-24 Thread Andrea Gavana
On 22 September 2012 16:57, Jae-Joon Lee wrote: > I recommend you to use OffsetImage. Here is an example of how one can > use OffsetImage. > > http://matplotlib.org/examples/pylab_examples/demo_annotation_box.html > > And attached is the modified version of the original script. Thank you JJ, I was

[Matplotlib-users] Axes changing position while programmatically zooming in/out

2013-09-20 Thread Andrea Gavana
Hello list, I am creating a series of plots automatically. During the first 10 of them, I gradually zoom in to a specific area, while during the last 10 I zoom out to the original axes limits. The problem is, I am only changing the x/y limits of the axes, not their position. However, when sav

Re: [Matplotlib-users] how to reduce the file size of plots generated with matplotlib

2014-03-22 Thread Andrea Gavana
On 22 March 2014 20:23, Christopher Kuhlman wrote: > Hello: > > I use matplotlib to generate x-y data plots; i.e., 2-D plots. The problem > is that the output files (the PDF files containing plots that are generated > with matplotlib) are huge. I can generate files that are 100's of KB or > even