plotting 2 timeseries data files on one plot with pre3.6/pl273

plotting 2 timeseries data files on one plot with pre3.6/pl273

Post by Madhavan Srinivasa » Wed, 15 May 1996 04:00:00



I'm using gnuplot pre 3.6/pl 273 to plot 2 data files containing
time series data on the same plot.  Both data files have a simple
2 column format - column 1 has the date as mm/dd/yy, and column 2
has a value as n.nnn.

I would like only the y axis marked for the first data file, and
only the y2 axis marked for the second data file (the x data is
identical in both files.)  I tried the following:

 set xdata time
 set timefmt "%m/%d/%y"
 set ytics nomirror
 set y2tics
 plot "t1.dat" using 1:2 with linespoint, second, \
  "t2.dat" using 1:2 with linespoint

The plot axes are marked perfectly, but only the first data file
is plotted correctly.  The second plot is incorrectly drawn as
a vertical line right in the middle, with the following error
message: Warning: empty x range [1:1], adjusting to [0.9:1.1]

Here is some sample data that produces the above error:
t1.dat                  t2.dat
1/15/95 38.000          1/15/95 3.000
1/16/95 37.375          1/16/95 4.375
1/17/95 36.938          1/17/95 5.938
1/18/95 36.750          1/18/95 6.750
1/19/95 37.250          1/19/95 7.250

Note that the second plot is drawn correctly if I change the
xdata to plain data instead of time.  Clues anyone ?
--

Goldman, Sachs & Co. [NYP/46]    Phone: +1 212 357 1346

 
 
 

plotting 2 timeseries data files on one plot with pre3.6/pl273

Post by David Denho » Thu, 16 May 1996 04:00:00



> I'm using gnuplot pre 3.6/pl 273 to plot 2 data files containing
> time series data on the same plot.  Both data files have a simple
> 2 column format - column 1 has the date as mm/dd/yy, and column 2
> has a value as n.nnn.
> I would like only the y axis marked for the first data file, and
> only the y2 axis marked for the second data file (the x data is
> identical in both files.)  I tried the following:
>  set xdata time
>  set timefmt "%m/%d/%y"
>  set ytics nomirror
>  set y2tics
>  plot "t1.dat" using 1:2 with linespoint, second, \
>   "t2.dat" using 1:2 with linespoint
> The plot axes are marked perfectly, but only the first data file
> is plotted correctly.  The second plot is incorrectly drawn as
> a vertical line right in the middle, with the following error
> message: Warning: empty x range [1:1], adjusting to [0.9:1.1]

The 'second' keyword might get dropped from 3.6 : it is an alias for
x2y2

So you are plotting the second data set on the x2 axis, which has not
been set for time.

I recommend you use   x1y2  in place of second

dd
--

Tel (01494) 453376 (work)    (01494) 459742  (home)

 
 
 

plotting 2 timeseries data files on one plot with pre3.6/pl273

Post by Madhavan Srinivasa » Thu, 16 May 1996 04:00:00




> The 'second' keyword might get dropped from 3.6 : it is an alias for
> x2y2

> So you are plotting the second data set on the x2 axis, which has not
> been set for time.

> I recommend you use   x1y2  in place of second

Works perfectly - my fault for not reading the help file carefully
on what "second" really means.  Thanks for your help!
--

Goldman, Sachs & Co. [NYP/46]    Phone: +1 212 357 1346
 
 
 

1. Don't plot missing data in a timeseries line plot

Hello,

I have timeseries data from Jan 1 - Jan 31, one observation per day.
There are 6-7 days of no data, but in a line plot of the data, gnuplot
merrily extrapolates across those days of missing data to the next day
which contains data.

I would prefer that the line plot have NO LINES across days of missing
data, and that the lines simply begin again where the data are valid.

Can this be done?

--
Andrew Loughe =====================================================

325 Broadway             |  wwweb: www-ad.fsl.noaa.gov/users/loughe
Boulder, CO  80305-3328  |  phone: 303-497-6211   fax: 303-497-6301

2. Dot gain curves, bug in greyscale conversion?

3. plotting multiple graph from nultiple data set within one data file

4. Flash help

5. plotting two files in one plot?

6. 7500 video in: PAL/NTSC, S-Video

7. multiple plots from one data file

8. plotting datafiles with pre3.6

9. Labeling data plotted from data files

10. variable data file names in plot file

11. Data on one plot with 2 x-axes

12. data on one plot w./ 2 scales