gnuplot question:

gnuplot question:

Post by Chris Flori » Tue, 26 Jan 1999 04:00:00



Hi all!

I have a quick gnuplot question.  I have a data file that looks
something like this:

---------
00:00:41  23
00:01:05  34
00:01:29  53
00:01:54  11
----------

The first column is the time (HH:MM:SS) and the second is the data.
When I try to plot this in gnuplot, it arranges all of the data points
for the 0 hour on one line, all the data plots for the 1 hour on another
line and so on and so forth.

What I need is for gnuplot to recognize the first column as a time and
not arbitrary data.

Please help!!!

Thanks!!

Chris

 
 
 

gnuplot question:

Post by Olaf Rogalsk » Tue, 26 Jan 1999 04:00:00



> Hi all!

> I have a quick gnuplot question.  I have a data file that looks
> something like this:

> ---------
> 00:00:41  23
> 00:01:05  34
> 00:01:29  53
> 00:01:54  11
> ----------

> The first column is the time (HH:MM:SS) and the second is the data.
> When I try to plot this in gnuplot, it arranges all of the data points
> for the 0 hour on one line, all the data plots for the 1 hour on another
> line and so on and so forth.

> What I need is for gnuplot to recognize the first column as a time and
> not arbitrary data.

> Please help!!!

> Thanks!!

> Chris

Ok,
you asked for it:
plot "<tr -d : <file"

Olaf Rogalsky

--
                                  \\|//
                                  (. .)
+-----------------------------oOOo-(_)-oOOo----------------------------+
I Dipl. Phys. Olaf Rogalsky                 Institut f. Theo. Physik I I
I Tel.: 09131 8528440                       Univ. Erlangen-Nuernberg   I
I Fax.: 09131 8528444                       Staudtstrasse 7 B3         I

+----------------------------------------------------------------------+

 
 
 

gnuplot question:

Post by C.L. Hartin » Thu, 28 Jan 1999 04:00:00


OK, so now the pairs look like this:
 000041  23
 000105  34
 000129  53
 000154  11

But when you plot the data, you'll end up with big gaps between 000059 and
000100, 000159 and 000200, etc. because you haven't converted the minutes and
seconds to fractions.  That takes a little more work.
See "Creating Web Plots on Demand", Linux Journal, Issue #52, p. 68 for some
ideas (and Perl scripts) for plotting data vs. time using gnuplot.



> > Hi all!

> > I have a quick gnuplot question.  I have a data file that looks
> > something like this:

> > ---------
> > 00:00:41  23
> > 00:01:05  34
> > 00:01:29  53
> > 00:01:54  11
> > ----------

> > The first column is the time (HH:MM:SS) and the second is the data.
> > When I try to plot this in gnuplot, it arranges all of the data points
> > for the 0 hour on one line, all the data plots for the 1 hour on another
> > line and so on and so forth.

> > What I need is for gnuplot to recognize the first column as a time and
> > not arbitrary data.

> > Please help!!!

> > Thanks!!

> > Chris
> Ok,
> you asked for it:
> plot "<tr -d : <file"

> Olaf Rogalsky

> --
>                                   \\|//
>                                   (. .)
> +-----------------------------oOOo-(_)-oOOo----------------------------+
> I Dipl. Phys. Olaf Rogalsky                 Institut f. Theo. Physik I I
> I Tel.: 09131 8528440                       Univ. Erlangen-Nuernberg   I
> I Fax.: 09131 8528444                       Staudtstrasse 7 B3         I

> +----------------------------------------------------------------------+

--
C.L. Harting
"Familiarity (with UNIX) breeds contempt (for other operating systems)."
 
 
 

gnuplot question:

Post by Olaf Rogalsk » Fri, 29 Jan 1999 04:00:00


C.L Harting Wrote:
Quote:> OK, so now the pairs look like this:
>  000041  23
>  000105  34
>  000129  53
>  000154  11

> But when you plot the data, you'll end up with big gaps between 000059 and
> 000100, 000159 and 000200, etc. because you haven't converted the minutes and
> seconds to fractions.

Yes I know, this is only a quick hack. But with a recent Gnuplot version
(3.6beta) it is
easy to improve the the method. For example use this one to plot data
versus seconds:

plot "< tr : ' ' <file" u (3600*$1+60*$2+$3):4

Quote:> That takes a little more work.

As you can see very little.

Olaf Rogalsky
--
                                  \\|//
                                  (. .)
+-----------------------------oOOo-(_)-oOOo----------------------------+
I Dipl. Phys. Olaf Rogalsky                 Institut f. Theo. Physik I I
I Tel.: 09131 8528440                       Univ. Erlangen-Nuernberg   I
I Fax.: 09131 8528444                       Staudtstrasse 7 B3         I

+----------------------------------------------------------------------+

 
 
 

gnuplot question:

Post by Blaine Owen » Fri, 29 Jan 1999 04:00:00


Get - get the "time series" patch and apply it. Then you can use statements
like:
set timefmt "%H:%M:%S"
set xdata time
set format x "%H:%M:%S"

Blaine Owens



Quote:> Hi all!

> I have a quick gnuplot question.  I have a data file that looks
> something like this:

> ---------
> 00:00:41  23
> 00:01:05  34
> 00:01:29  53
> 00:01:54  11
> ----------

> The first column is the time (HH:MM:SS) and the second is the data.
> When I try to plot this in gnuplot, it arranges all of the data points
> for the 0 hour on one line, all the data plots for the 1 hour on another
> line and so on and so forth.

> What I need is for gnuplot to recognize the first column as a time and
> not arbitrary data.

> Please help!!!

> Thanks!!

> Chris

 
 
 

1. Help: octave/gnuplot on Linux problem.

I am sorry if this is the wrong group my server doesn't support
comp.graphics.apps.gnuplot

I am using gnuplot with octave.  Octave calls gnuplot to do its screen
plotting.  When a plot is displayed I am supposed to be able to press
enter when I am done viewing it and the display will return to text mode.  
This does not happen and I am forced to reboot.  I have looked at the faqs
and haven't found anything helpful.
--
=======================================================
Jack Walker Mathematician/Software Engineer

2. pbmplus for aix Summary

3. LaTeX and GNUPlot

4. Using more than 64MB under 2.2.1

5. gnuplot: Cannot open /dev/console

6. Adding apps to panel menu in Gnome (RH7)

7. Gnuplot 3.5 and Fudgit 2.33 on Linux 0.99.14

8. Can not remove directory - Solaris 7

9. Gnuplot and XWindows ?

10. terms for gnuplot

11. gnuplot:save commands

12. can gnuplot work under X/Linux

13. How to use gnuplot on SunOS 5.7 ?