Re: [Matplotlib-users] Irregular Dates

2007-07-18 Thread John Hunter
On 7/18/07, Tom Haddon <[EMAIL PROTECTED]> wrote: > I think you mean it makes no assumption about the intervals between my > dates? If so, I must be missing something. How am I supposed to pass the > data to the plot_date function? If I pass it in as integers from epoch I > get an error saying "yea

Re: [Matplotlib-users] Irregular Dates

2007-07-18 Thread Tom Haddon
On Wed, 2007-07-18 at 18:37 -0500, John Hunter wrote: > On 7/18/07, Tom Haddon <[EMAIL PROTECTED]> wrote: > \> What I mean by this is that I'm not collecting the data at regular time > > intervals. So I'd like to plot this, and have found that the plot_date > > function seems to be designed for spe

Re: [Matplotlib-users] Irregular Dates

2007-07-18 Thread John Hunter
On 7/18/07, Tom Haddon <[EMAIL PROTECTED]> wrote: \> What I mean by this is that I'm not collecting the data at regular time > intervals. So I'd like to plot this, and have found that the plot_date > function seems to be designed for specific known time intervals. Instead Nope, it makes so assumpt

[Matplotlib-users] Irregular Dates

2007-07-18 Thread Tom Haddon
Hi Folks, Newbie question here... I have a question about plotting data with irregular dates. Here's a sample of my data (completely fabricated): 2007-06-29 20:22:03, 612 2007-07-18 09:07:03, 658 2007-07-19 11:07:05, 600 2007-07-19 15:12:07, 734 etc., etc., etc.. What I mean by this is that I'm

Re: [Matplotlib-users] savefig pdf doesn't work anymore

2007-07-18 Thread Jouni K . Seppänen
Lionel Roubeyrie <[EMAIL PROTECTED]> writes: > I've got a problem with saving plots in pdf format like you can see in the > following output. It seems encodings.cp1252 doesn't have a decoding_map > method (but a decoding_table one). > Is it a bug or a problem in my encodings file? It's a bug, f

Re: [Matplotlib-users] Patch to fix stale tex cache issues

2007-07-18 Thread Darren Dale
I just commited Alexander Schmolck's patch to make usetex respect changes to rc settings. TexManager used to configure its support for latex at load time, and ignored later changes to rc settings. Thank you Alexander for the patch. Alexander - I am sorry it took so long to commit this patch. I c

Re: [Matplotlib-users] Filtering plots

2007-07-18 Thread Eric Firing
Darren Dale wrote: > On Wednesday 18 July 2007 6:56:18 am Armando Serrano Lombillo wrote: >> Yes! >> matplotlib is beautiful. Thanks everybody for your help. > > Here is another way, with numpy arrays: > > data[data==0]=nan > > plot(data) Support for nan in input arrays in mpl is not uniform, t

Re: [Matplotlib-users] Filtering plots

2007-07-18 Thread Pierre GM
On Wednesday 18 July 2007 07:11:04 Darren Dale wrote: > Here is another way, with numpy arrays: > > data[data==0]=nan My 2c: That won't work if data is int_, as nan will be treated as 0. I'm fairly partial to masked arrays... ---

[Matplotlib-users] savefig pdf doesn't work anymore

2007-07-18 Thread Lionel Roubeyrie
Hi all, I've got a problem with saving plots in pdf format like you can see in the following output. It seems encodings.cp1252 doesn't have a decoding_map method (but a decoding_table one). Is it a bug or a problem in my encodings file? thanks |Diagrammes|[68]>matplo

Re: [Matplotlib-users] ImportError: matplotlib/ft2font.so: undefined symbol: PyUnicodeUCS4_GetSize

2007-07-18 Thread Michael Droettboom
mark starnes wrote: > Hi Mike, thanks for responding. > > I spent most of last night with this, re-installing Python using SuSE's > package manager, re-installing matplotlib the same way. No joy. I > tried downloading the matplotlib source and found that when I attempted > to install, setup.py cl

Re: [Matplotlib-users] ImportError: matplotlib/ft2font.so: undefined symbol: PyUnicodeUCS4_GetSize

2007-07-18 Thread mark starnes
Further to the last post, I've also noticed strange behavior when importing distutils. >>> import distutils as d >>> dir(d) ['__builtins__', '__doc__', '__file__', '__name__', '__path__', '__revision__', '__version__'] >>> d.__file__ '/usr/local/lib/python2.5/distutils/__init__.pyc' Maybe this i

Re: [Matplotlib-users] Difference in Axes.hlines / Axes.vlines

2007-07-18 Thread Ben North
Hi, I wrote: > I was wondering, though, whether there'd be any support for some work > which tidied up the near-duplicate code in axes.py. which produced a couple of replies. I think this is probably more of a matplotlib-devel topic than a -users one, so I'll post a reply over there. Ben.

Re: [Matplotlib-users] Filtering plots

2007-07-18 Thread Darren Dale
On Wednesday 18 July 2007 6:56:18 am Armando Serrano Lombillo wrote: > Yes! > matplotlib is beautiful. Thanks everybody for your help. Here is another way, with numpy arrays: data[data==0]=nan plot(data) > On 7/18/07, Angus McMorland <[EMAIL PROTECTED]> wrote: > > Hi Armando, > > > > On 18/07/

Re: [Matplotlib-users] ImportError: matplotlib/ft2font.so: undefined symbol: PyUnicodeUCS4_GetSize

2007-07-18 Thread mark starnes
Hi Mike, thanks for responding. I spent most of last night with this, re-installing Python using SuSE's package manager, re-installing matplotlib the same way. No joy. I tried downloading the matplotlib source and found that when I attempted to install, setup.py claimed I didn't have gtk availab

Re: [Matplotlib-users] Filtering plots

2007-07-18 Thread Armando Serrano Lombillo
Yes! matplotlib is beautiful. Thanks everybody for your help. On 7/18/07, Angus McMorland <[EMAIL PROTECTED]> wrote: Hi Armando, On 18/07/07, Armando Serrano Lombillo <[EMAIL PROTECTED]> wrote: > Hello, I have a question. > > Let's say I have the following data: > [1,3,6,1,2,0,0,0,0,1,4,7,9,4,

Re: [Matplotlib-users] Filtering plots

2007-07-18 Thread Angus McMorland
Hi Armando, On 18/07/07, Armando Serrano Lombillo <[EMAIL PROTECTED]> wrote: > Hello, I have a question. > > Let's say I have the following data: > [1,3,6,1,2,0,0,0,0,1,4,7,9,4,2,4,6,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,6,7,8] > which I want to plot, but I want to omit the zeros, so I would like to do >

Re: [Matplotlib-users] Filtering plots

2007-07-18 Thread Armando Serrano Lombillo
Hello thanks everybody for you fast replies, but unfortunately there's a problem with all the solutions you propose: they plot a line between each of the data sets. It is not the same to do: plot([1,2],[1,1]) plot([7,8],[1,1]) than to do plot([1,2,7,8],[1,1,1,1]) The first example plots two disjoi

Re: [Matplotlib-users] Filtering plots

2007-07-18 Thread Antonino Ingargiola
You can do it this way: data = array(data) x = arange(len(data)) plot(x[data!=0], data[data!=0]) Regards, ~ Antonio - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 expre

Re: [Matplotlib-users] Filtering plots

2007-07-18 Thread Angel Lopez
Even in only one line: plot([i+1 for i in range(len(data)) if data[i]>0], [i for i in data if i>0]) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of

Re: [Matplotlib-users] Filtering plots

2007-07-18 Thread Angel Lopez
Hola Alejandro, sure, I think this can do the job: write a function to calc your X values: def x(data): X=[] c=1 for i in data: if i>0: X.append(c) c+=1 return X then your data without zeros in a pythonic way: >>> my_y_data=[i for i in data if i>0] w

[Matplotlib-users] Filtering plots

2007-07-18 Thread Armando Serrano Lombillo
Hello, I have a question. Let's say I have the following data: [1,3,6,1,2,0,0,0,0,1,4,7,9,4,2,4,6,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,6,7,8] which I want to plot, but I want to omit the zeros, so I would like to do something like: plot(range(1,6), [1,3,6,1,2], 'b') plot(range(10,18), [1,4,7,9,4,2,4,6],