need some advice on x y plot

Grant Edwards grante at visi.com
Thu Oct 20 13:50:09 EDT 2005


On 2005-10-20, Grant Edwards <grante at visi.com> 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
>> observations each 10 minutes apart then one an hour later, you
>> will need to insert 5 empty observations in the list before
>> the last observation.
[...]
>
> That's completely unnecessary.  Just pass a set of time,value
> pairs and they'll get plotted as desired.

For example, here's how gnuplot plots the data

2 12
3 10
4 9
101 8
102 6
103 9



  20 ++----------+-----------+-----------+----------+-----------+----------++
     +           +           +           +          +      "foo.dat"   A    +
     |                                                                      |
     |                                                                      |
     |                                                                      |
  15 ++                                                                    ++
     |                                                                      |
     |                                                                      |
     |A                                                                     |
     |                                                                      |
  10 ++A                                                                   ++
     | A                                                          A         |
     |                                                           A          |
     |                                                                      |
     |                                                           A          |
   5 ++                                                                    ++
     |                                                                      |
     |                                                                      |
     |                                                                      |
     +           +           +           +          +           +           +
   0 ++----------+-----------+-----------+----------+-----------+----------++
     0           20          40          60         80         100         120


Isn't that what you're asking for?

-- 
Grant Edwards                   grante             Yow!  ... I have read the
                                  at               INSTRUCTIONS...
                               visi.com            



More information about the Python-list mailing list