Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #379

Re: graph of complex data and timfmt settings

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!74.125.46.80.MISMATCH!postnews.google.com!a7g2000vby.googlegroups.com!not-for-mail
From Péter Juhász <peter.juhasz83@gmail.com>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: graph of complex data and timfmt settings
Date Tue, 14 Jun 2011 02:14:48 -0700 (PDT)
Organization http://groups.google.com
Lines 64
Message-ID <1e6d3cc2-ff33-41fc-b331-2959afb517cd@a7g2000vby.googlegroups.com> (permalink)
References <d3a4d558-79b0-4ec4-a285-cf86988e6480@w4g2000yqm.googlegroups.com>
NNTP-Posting-Host 193.225.144.95
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1308042888 16822 127.0.0.1 (14 Jun 2011 09:14:48 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Tue, 14 Jun 2011 09:14:48 +0000 (UTC)
Complaints-To groups-abuse@google.com
Injection-Info a7g2000vby.googlegroups.com; posting-host=193.225.144.95; posting-account=zDLjuQoAAAC_blU_eX_4MHabi0k_sknv
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-Header-Order HUALESNKRC
X-HTTP-UserAgent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110422 Ubuntu/10.04 (lucid) Firefox/3.6.17,gzip(gfe)
Xref x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:379

Show key headers only | View raw


On Jun 14, 7:44 am, Zio Peppe <zipe...@gmail.com> wrote:
> Dear gnuplot's guru
>
> I'm quite new with gnuplot, and my main trouble arises from a complex
> format of  data.
>
> I'd like to plot data coming daily from a set of digital sensors when
> they are stored on disk.
>
> This is the format of the log:  Data - time - level1 - level2
>
> where "level*" are the most relevant data:
>
> Wed Jun  1 03:00:01 2011 : level1 =  54 %, level2 = -3159.0
> Thu Jun  2 03:00:02 2011 : level1 =  53 %, level2 = -3159.0
> Fri Jun  3 03:00:03 2011 : level1 =  53 %, level2 = -3159.0
> Sat Jun  4 03:00:02 2011 : level1=  52 %, level2 = -3159.0
> Sun Jun  5 03:00:03 2011 : level1 =  51 %, level2 = -3159.0
> Mon Jun  6 03:00:03 2011 : level1 =  49 %, level2 = -3159.0
> Tue Jun  7 03:00:03 2011 : level1 =  48 %, level2 = -3165.0
> Wed Jun  8 03:00:02 2011 : level1 = 48 %, level2 = -3149.0
> Thu Jun  9 03:00:03 2011 : level1 = 47 %, level2 = -3174.0
> Fri Jun 10 03:00:01 2011 : level1 = 47 %, level2 = -3173.0
> Sat Jun 11 03:00:02 2011 : level1 = 45 %, level2 = -3173.0
>
> I have tried with the following set timefmt command, but it did not
> work:
>
> set timefmt "%a %b %d %T %Y"
>
> The ideal would be to have on X-axis the data (the time is not
> relevant) and both "levels" on Y-axis with their own scale.
>
> Each plot should graph one week or one month of data.
>
> Could you give to me some help?
>
> Many thanks
> ZPP

There are two different things to set when you want to plot time-
related data: one specifies how the data are read in from the file,
the other sets how they are displayed on the graph.

"set timefmt" sets the input format, however, "help time_spec" tells
you that the %T specifier only works on output, so you have to use %H:
%M:%S instead. Additionally, the day of the week is redundant, so I'd
recommend omitting it from the format specification.

By default, the data format for output includes time, which you don't
want, so you have to "set format x" too.

Putting it together:

set xdata time
set timefmt x "%b %d %H:%M:%S %Y"
set format x "%b %d"
set y2tics
set ytics nomirror
set ylabel "%"
plot "datafile" u 2:9 axes x1y1 title "level1", '' u 2:13 axes x1y2
title "level2"

Péter Juhász

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Find similar


Thread

graph of complex data and timfmt settings Zio Peppe <zipeppe@gmail.com> - 2011-06-13 22:44 -0700
  Re: graph of complex data and timfmt settings Péter Juhász <peter.juhasz83@gmail.com> - 2011-06-14 02:14 -0700

csiph-web