Re: need some advice on x y plot

2005-10-25 Thread nephish
well, for what i tried, ticstrings just contained a list of times formatted like [10-21 09:15, 10-21 09:44, 10-21 09:59, and so on.] i did write mine a little different than the example that Grant gave me because its a little different application of time. i think i am having trouble knowing

Re: need some advice on x y plot

2005-10-25 Thread Grant Edwards
On 2005-10-24, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ok, i am stuck a bit here with this line gp('set xtics (%s)' % ','.join(ticstrings)) the error code says that it is looking for a closing parenthesis. Well, what is the value of ticstrings? Try passing the parameter debug=1 to

Re: need some advice on x y plot

2005-10-25 Thread Grant Edwards
On 2005-10-25, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: well, for what i tried, ticstrings just contained a list of times formatted like [10-21 09:15, 10-21 09:44, 10-21 09:59, and so on.] OK. What did ticstrings contain in the demo I wrote for you? [When somebody who is trying to help

Re: need some advice on x y plot

2005-10-25 Thread Frithiof Andreas Jensen
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If the x-axis is time, gnuplot will plot it correctly but it will connect *all* the datapoints and scale the x-axis so that everything will fit on the graph. Is it the autoscaling or conneting that what you think is wrong? Getting a

Re: need some advice on x y plot

2005-10-25 Thread nephish
Ok, first off, thanks for all the help guys, this part set xtics (label pos, label pos, label pos) is mainly what i was confused about. the 'pos' part. i think that the way i am writing this leaves this out. in fact, i am pretty sure. here is the code i am trying out. def draw_chart(self,

Re: need some advice on x y plot

2005-10-25 Thread Grant Edwards
On 2005-10-25, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Ok, first off, thanks for all the help guys, this part set xtics (label pos, label pos, label pos) is mainly what i was confused about. the 'pos' part. i think that the way i am writing this leaves this out. in fact, i am pretty

Re: need some advice on x y plot

2005-10-25 Thread Grant Edwards
On 2005-10-25, Grant Edwards [EMAIL PROTECTED] wrote: It looks like it. Though I've used custom tics in the past, it was never for time values. Based on the help from gnuplot, I suspect you can get what you want without doing custom tics, but rather using the commands set xdata time

Re: need some advice on x y plot

2005-10-25 Thread Grant Edwards
On 2005-10-25, Grant Edwards [EMAIL PROTECTED] wrote: It appears that the Gnuplot modules has coerced my data into single-precision -- thus throwing away most of the resolution on the x-axis. Passing Gnuplot.Data a Numeric array object is a good work-around. Otherwise, Gnuplot.Data will

Re: need some advice on x y plot

2005-10-25 Thread nephish
tics.append('%s %s' % (time.strftime(...), x)) # might need time.localtime(x) for that last term. ok, tried this and it worked. but the first plot is at the last plot of data back to that math mistake i mentioned earlier. so, thanks much, i will be back when i mess around with it some

Re: need some advice on x y plot

2005-10-25 Thread nephish
WE DID IT ! little more tinkering and correcting this diff = start_time - end_time (vrs the other way around) and its working. so many thanks gents, a lot ! -- http://mail.python.org/mailman/listinfo/python-list

Re: need some advice on x y plot

2005-10-24 Thread nephish
ok, i am stuck a bit here with this line gp('set xtics (%s)' % ','.join(ticstrings)) the error code says that it is looking for a closing parenthesis. that and i am kinda new enough not to really get what %s is all about. i know it formats a string. can you simply pass a list to 'set xtics' ?

Re: need some advice on x y plot

2005-10-21 Thread nephish
ok, i tried something similar to what you posted. a little simpler though. i am running a query on a database and making a list of time, value pairs kinda like this plot_points = ([time, value], [time, value], [time, value]) gnuplot complains that it needs a float for one of the values. i can plot

Re: need some advice on x y plot

2005-10-21 Thread Kent Johnson
[EMAIL PROTECTED] wrote: i am running a query on a database and making a list of time, value pairs kinda like this plot_points = ([time, value], [time, value], [time, value]) gnuplot complains that it needs a float for one of the values. i can plot just the value, and it shows up ( no x

Re: need some advice on x y plot

2005-10-21 Thread nephish
the time is DateTime.DateTime object from a mySQLdb query. the value is a number anywhere between 0 and 15. the datetime is formatted like 2005-10-20 08:40:34 i could strip it and make a timestamp out of it. but reading the number of seconds since january of 1970 doesn't make a neat chart. any

Re: need some advice on x y plot

2005-10-21 Thread William Park
[EMAIL PROTECTED] wrote: the time is DateTime.DateTime object from a mySQLdb query. the value is a number anywhere between 0 and 15. the datetime is formatted like 2005-10-20 08:40:34 i could strip it and make a timestamp out of it. but reading the number of seconds since january of 1970

Re: need some advice on x y plot

2005-10-21 Thread Grant Edwards
On 2005-10-21, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: the time is DateTime.DateTime object from a mySQLdb query. the value is a number anywhere between 0 and 15. the datetime is formatted like 2005-10-20 08:40:34 i could strip it and make a timestamp out of it. but reading the number of

Re: need some advice on x y plot

2005-10-21 Thread nephish
ok, i have a display, and its a work in progress. lemme get this straight. you used gp('set term png') is this an example of sending normal gnuplot commands? if so, are all of the gnuplot commands available ? thanks so much this is helping me out a lot here --

Re: need some advice on x y plot

2005-10-21 Thread Grant Edwards
On 2005-10-21, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: gp('set term png') is this an example of sending normal gnuplot commands? Yes. if so, are all of the gnuplot commands available ? Yes. -- Grant Edwards grante Yow! Do you like TENDER

Re: need some advice on x y plot

2005-10-21 Thread nephish
this is great, because the docs on gnuplots website are a bit easier for me to grasp. thanks so much for your time on this one. you really have helped me a lot. i will not get a change to work on this till monday. so i may have more questions then. This is sure a point in the right direction.

need some advice on x y plot

2005-10-20 Thread nephish
Hey there, i have tried about every graphing package for python i can get to work on my system. gnuplot, pychart, biggles, gdchart, etc.. (cant get matplot to work) so far, they all are working ok. I need to make an x y chart for some data that comes in from sensors at different times durring the

Re: need some advice on x y plot

2005-10-20 Thread Grant Edwards
On 2005-10-20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [...] I need to make an x y chart for some data that comes in from sensors at different times durring the day. i need it to show the value in the y and the time in the x . no problem so far. But what i cannot get to happen is to scale

Re: need some advice on x y plot

2005-10-20 Thread nephish
how ? i have tried to use unix timestamps, and i have also tried with DateTime objects do i need to use a scale that isn't linear (default in most) ? how do i putt this off ? thanks btw. sk -- http://mail.python.org/mailman/listinfo/python-list

Re: need some advice on x y plot

2005-10-20 Thread Larry Bates
I would try to live with time scale being fixed and insert None (or whatever value is used by charting package) for times where observations were not taken. This will mean that you have to preprocess your data by determining a time step step value that will fit your data. If you get 3

Re: need some advice on x y plot

2005-10-20 Thread nephish
i have thought about doing this, just a little different. i was going to list the value pairs. take the start time and end time and plot 100 empty plots between them. add the value pairs, sort by time, and then draw it. The only thing is it get kinda complicated when the times change a lot. they

Re: need some advice on x y plot

2005-10-20 Thread Grant Edwards
On 2005-10-20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i have tried to use unix timestamps, That has always worked for me. What happened? and i have also tried with DateTime objects Never tried that. do i need to use a scale that isn't linear (default in most) ? No. how do i putt

Re: need some advice on x y plot

2005-10-20 Thread Grant Edwards
On 2005-10-20, Larry Bates [EMAIL PROTECTED] wrote: I would try to live with time scale being fixed I don't understand what you mean by the time scale being fixed. It's not. If you just pass the time,value pairs to gnuplot, it does exactly what it should. and insert None (or whatever value

Re: need some advice on x y plot

2005-10-20 Thread Grant Edwards
On 2005-10-20, Grant Edwards [EMAIL PROTECTED] wrote: and insert None (or whatever value is used by charting package) for times where observations were not taken. This will mean that you have to preprocess your data by determining a time step step value that will fit your data. If you get 3

Re: need some advice on x y plot

2005-10-20 Thread Kent Johnson
[EMAIL PROTECTED] wrote: how ? i have tried to use unix timestamps, and i have also tried with DateTime objects do i need to use a scale that isn't linear (default in most) ? how do i putt this off ? Here is some code that works for me. It plots multiple datasets against time. The input

Re: need some advice on x y plot

2005-10-20 Thread nephish
ok, yeah, thats exactly what i am looking for. i will give it a go. thanks a whole lot. putt this off is a typo, pull this off is what i was meaning to type. this is cool. -- http://mail.python.org/mailman/listinfo/python-list