Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-28 Thread Matthias Michler
Hello Chris, Hello list, On Thursday 27 March 2008 18:26, Chris Withers wrote: Matthias Michler wrote: I'm not sure that I understand you correctly. The code I refering is the one which I attached some mails ago. The following works for me: Ah, okay, to get the problem I was having, change

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-28 Thread Chris Withers
Matthias Michler wrote: I'm not sure it is the easiest way, but it works for me: for label in ax.xaxis.get_majorticklabels(): label.set_rotation(+90) Yes, that's what I was using, just wondered if there was a better way... Also, how would I get this kind of updating with bar charts or

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-28 Thread Matthias Michler
On Friday 28 March 2008 13:57, Chris Withers wrote: Matthias Michler wrote: I'm not sure it is the easiest way, but it works for me: for label in ax.xaxis.get_majorticklabels(): label.set_rotation(+90) Yes, that's what I was using, just wondered if there was a better way... At

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-28 Thread John Hunter
On Fri, Mar 28, 2008 at 8:20 AM, Matthias Michler [EMAIL PROTECTED] wrote: On Friday 28 March 2008 13:57, Chris Withers wrote: Matthias Michler wrote: I'm not sure it is the easiest way, but it works for me: for label in ax.xaxis.get_majorticklabels():

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-27 Thread Matthias Michler
On Wednesday 26 March 2008 19:39, Chris Withers wrote: Matthias Michler wrote: My x-axis is time, and as new points are plotted, even though I'm following the above recipe pretty closely, the x-tick spacing isn't getting sorted out, so I end up with just a jumble as the tick labels for

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-27 Thread Chris Withers
Matthias Michler wrote: the above script leads to a different behaviour on my system. What is that behaviour and what version of matplotlib are you using? I think it is the expected behaviour. The number of xtick is aproximately constant and some tick get sorted out, when the xlimits are

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-27 Thread Matthias Michler
Hello Chris, On Thursday 27 March 2008 12:22, Chris Withers wrote: Matthias Michler wrote: the above script leads to a different behaviour on my system. What is that behaviour and what version of matplotlib are you using? I think it is the expected behaviour. The number of xtick is

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-27 Thread Chris Withers
Matthias Michler wrote: I'm not sure that I understand you correctly. The code I refering is the one which I attached some mails ago. The following works for me: Ah, okay, to get the problem I was having, change your script as follows:

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-26 Thread Chris Withers
Matthias Michler wrote: My x-axis is time, and as new points are plotted, even though I'm following the above recipe pretty closely, the x-tick spacing isn't getting sorted out, so I end up with just a jumble as the tick labels for the x-axis. Do you know why this might be? I'm not sure I

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-21 Thread Chris Withers
Hey Matthias, Matthias Michler wrote: maybe something like the following helps you: - from pylab import * from time import sleep ion() # interactive mode 'on' figure() ax =

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-12 Thread Matthias Michler
Hello Chris, maybe I don't know exactly what you want to do - let me try once more: You try to plot a line where point need to be added, isn't it? My first idea was that there should be independent points. maybe something like the following helps you:

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-11 Thread Chris Withers
Matthias Michler wrote: plot([x1], [y1], bo, [x2], [y2], r+) This didn't work :-S - the first time I call show(), execution never comes back to my script so the code never gets to plot any further points - if I put the show after the plotting loop (which means I don't get the live plotting

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-11 Thread Alan G Isaac
On Tue, 11 Mar 2008, Chris Withers apparently wrote: the first time I call show() http://matplotlib.sourceforge.net/faq.html#SHOW hth, Alan Isaac - This SF.net email is sponsored by: Microsoft Defy all challenges.

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-11 Thread Chris Withers
Alan G Isaac wrote: On Tue, 11 Mar 2008, Chris Withers apparently wrote: the first time I call show() http://matplotlib.sourceforge.net/faq.html#SHOW Okay, that tells me that I prettymuch don't want to be using show(), but I don't think I want interactive mode either... What I'm trying to

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-11 Thread Chris Withers
Ryan May wrote: Right, the show() command starts the GUI's mainloop, which blocks execution of the script until you close the figure. What you probably want is something like the dynamic_demo.py example. ...which barfes for me: Traceback (most recent call last): File dynamic_demo.py,

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-11 Thread Chris Withers
Chris Withers wrote: Matthias Michler wrote: plot([x1], [y1], bo, [x2], [y2], r+) This didn't work :-S - the first time I call show(), execution never comes back to my script so the code never gets to plot any further points Okay, thanks to Ryan, I now have this point fixed, however,

Re: [Matplotlib-users] [newbie] live plots of multiple lines

2008-03-10 Thread Matthias Michler
Hello Chris, you may try something like plot([x1], [y1], bo, [x2], [y2], r+) or you have to iterate through your data. best regards Matthias On Friday 07 March 2008 10:11, Chris Withers wrote: Hi All, Apologies if I'm missing anything obvious... How do I plot lines point-by-point as

[Matplotlib-users] [newbie] live plots of multiple lines

2008-03-07 Thread Chris Withers
Hi All, Apologies if I'm missing anything obvious... How do I plot lines point-by-point as opposed to by passing arrays? I'm guessing something like: plot([x],[y]) ...but that feels a bit weird to me. In any case, using that, I don't know how to plot more than one line at a time, so thought