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: =?ISO-8859-1?B?UOl0ZXIgSnVo4XN6?= 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> References: 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 On Jun 14, 7:44=A0am, Zio Peppe wrote: > Dear gnuplot's guru > > I'm quite new with gnuplot, and my main trouble arises from a complex > format of =A0data. > > 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: =A0Data - time - level1 - level2 > > where "level*" are the most relevant data: > > Wed Jun =A01 03:00:01 2011 : level1 =3D =A054 %, level2 =3D -3159.0 > Thu Jun =A02 03:00:02 2011 : level1 =3D =A053 %, level2 =3D -3159.0 > Fri Jun =A03 03:00:03 2011 : level1 =3D =A053 %, level2 =3D -3159.0 > Sat Jun =A04 03:00:02 2011 : level1=3D =A052 %, level2 =3D -3159.0 > Sun Jun =A05 03:00:03 2011 : level1 =3D =A051 %, level2 =3D -3159.0 > Mon Jun =A06 03:00:03 2011 : level1 =3D =A049 %, level2 =3D -3159.0 > Tue Jun =A07 03:00:03 2011 : level1 =3D =A048 %, level2 =3D -3165.0 > Wed Jun =A08 03:00:02 2011 : level1 =3D 48 %, level2 =3D -3149.0 > Thu Jun =A09 03:00:03 2011 : level1 =3D 47 %, level2 =3D -3174.0 > Fri Jun 10 03:00:01 2011 : level1 =3D 47 %, level2 =3D -3173.0 > Sat Jun 11 03:00:02 2011 : level1 =3D 45 %, level2 =3D -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=E9ter Juh=E1sz