You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(2) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(3) |
Feb
(1) |
Mar
(2) |
Apr
(22) |
May
(52) |
Jun
(43) |
Jul
(36) |
Aug
(59) |
Sep
(37) |
Oct
(55) |
Nov
(39) |
Dec
(36) |
| 2005 |
Jan
(64) |
Feb
(40) |
Mar
(62) |
Apr
(58) |
May
(256) |
Jun
(77) |
Jul
(80) |
Aug
(39) |
Sep
(56) |
Oct
(36) |
Nov
(113) |
Dec
(68) |
| 2006 |
Jan
(43) |
Feb
(64) |
Mar
(69) |
Apr
(60) |
May
(71) |
Jun
(53) |
Jul
(63) |
Aug
(63) |
Sep
(76) |
Oct
(85) |
Nov
(82) |
Dec
(73) |
| 2007 |
Jan
(75) |
Feb
(82) |
Mar
(84) |
Apr
(104) |
May
(67) |
Jun
(101) |
Jul
(107) |
Aug
(138) |
Sep
(128) |
Oct
(106) |
Nov
(112) |
Dec
(112) |
| 2008 |
Jan
(94) |
Feb
(87) |
Mar
(146) |
Apr
(169) |
May
(75) |
Jun
(26) |
Jul
(26) |
Aug
(7) |
Sep
(18) |
Oct
(53) |
Nov
(42) |
Dec
(19) |
| 2009 |
Jan
(43) |
Feb
(39) |
Mar
(18) |
Apr
(45) |
May
(66) |
Jun
(87) |
Jul
(56) |
Aug
(41) |
Sep
(56) |
Oct
(139) |
Nov
(98) |
Dec
(88) |
| 2010 |
Jan
(81) |
Feb
(79) |
Mar
(83) |
Apr
(97) |
May
(124) |
Jun
(84) |
Jul
(53) |
Aug
(85) |
Sep
(89) |
Oct
(50) |
Nov
(98) |
Dec
(78) |
| 2011 |
Jan
(97) |
Feb
(74) |
Mar
(68) |
Apr
(54) |
May
(63) |
Jun
(59) |
Jul
(65) |
Aug
(58) |
Sep
(37) |
Oct
(40) |
Nov
(59) |
Dec
(35) |
| 2012 |
Jan
(16) |
Feb
(56) |
Mar
(63) |
Apr
(25) |
May
(48) |
Jun
(58) |
Jul
(20) |
Aug
(13) |
Sep
(43) |
Oct
(35) |
Nov
(20) |
Dec
(17) |
| 2013 |
Jan
(22) |
Feb
(11) |
Mar
(51) |
Apr
(34) |
May
(57) |
Jun
(27) |
Jul
(70) |
Aug
(30) |
Sep
(38) |
Oct
(53) |
Nov
(40) |
Dec
(25) |
| 2014 |
Jan
(26) |
Feb
(35) |
Mar
(60) |
Apr
(12) |
May
(17) |
Jun
(15) |
Jul
(9) |
Aug
(18) |
Sep
(46) |
Oct
(18) |
Nov
(19) |
Dec
(15) |
| 2015 |
Jan
(17) |
Feb
(28) |
Mar
(21) |
Apr
(54) |
May
(36) |
Jun
(8) |
Jul
(30) |
Aug
(13) |
Sep
(3) |
Oct
(28) |
Nov
(3) |
Dec
(3) |
| 2016 |
Jan
(11) |
Feb
(9) |
Mar
(29) |
Apr
(10) |
May
(8) |
Jun
(5) |
Jul
(50) |
Aug
(57) |
Sep
(13) |
Oct
(5) |
Nov
(17) |
Dec
(11) |
| 2017 |
Jan
(3) |
Feb
(23) |
Mar
(16) |
Apr
(7) |
May
(15) |
Jun
(12) |
Jul
(48) |
Aug
(15) |
Sep
(3) |
Oct
(20) |
Nov
(28) |
Dec
(21) |
| 2018 |
Jan
(13) |
Feb
(21) |
Mar
(21) |
Apr
(7) |
May
(3) |
Jun
(7) |
Jul
(27) |
Aug
(38) |
Sep
(4) |
Oct
(30) |
Nov
(22) |
Dec
|
| 2019 |
Jan
(5) |
Feb
(16) |
Mar
(1) |
Apr
(9) |
May
(7) |
Jun
(20) |
Jul
(13) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(2) |
Dec
(4) |
| 2020 |
Jan
(6) |
Feb
(11) |
Mar
(1) |
Apr
(18) |
May
(4) |
Jun
(5) |
Jul
(12) |
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(1) |
Dec
(17) |
| 2021 |
Jan
(1) |
Feb
(11) |
Mar
(16) |
Apr
(6) |
May
(5) |
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
(8) |
Oct
(10) |
Nov
(4) |
Dec
(4) |
| 2022 |
Jan
(9) |
Feb
(35) |
Mar
(4) |
Apr
|
May
(3) |
Jun
(49) |
Jul
(11) |
Aug
|
Sep
(5) |
Oct
(2) |
Nov
(16) |
Dec
(13) |
| 2023 |
Jan
|
Feb
(8) |
Mar
(3) |
Apr
|
May
(8) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2024 |
Jan
(6) |
Feb
(9) |
Mar
|
Apr
(26) |
May
(24) |
Jun
|
Jul
(4) |
Aug
(2) |
Sep
(1) |
Oct
(10) |
Nov
(9) |
Dec
|
| 2025 |
Jan
|
Feb
(22) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
|
From: rekha s. <rek...@gm...> - 2020-07-04 15:04:58
|
Dear GNUplot users,
I am plotting some data with some fitting function.
My code is
f(x) = (a0 + a1/x)
fit f(x) 'test.data' using 1:2 via a0,a1
plot 'test.data' using 1:2 w points pt 1 t , f(x) t sprintf("K_{fit} =
a_0 + a_1/T", a0)
fit f(x) 'test.data' using 1:3 via a0,a1
plot 'test.data' using 1:3 w points pt 1 t , f(x) t sprintf("K_{fit} =
a_0 + a_1/T", a0)
f(x) = (a0 + a1/x)
fit f(x) 'test.data' using 1:4 via a0,a1
plot 'test.data' using 1:4 w points pt 1 t , f(x) t sprintf("K_{fit} =
a_0 + a_1/T", a0)
f(x) = (a0 + a1/x)
fit f(x) 'test.data' using 1:5 via a0,a1
plot 'test.data' using 1:5 w points pt 1 t , f(x) t sprintf("K_{fit} =
a_0 + a_1/T", a0)
f(x) = (a0 + a1/x)
fit f(x) 'test.data' using 1:6 via a0,a1
plot 'test.data' using 1:6 w points pt 1 t , f(x) t sprintf("K_{fit} = a_0
+ a_1/T", a0)
f(x) = (a0 + a1/x)
fit f(x) 'test.data' using 1:7 via a0,a1
plot 'test.data' using 1:7 w points pt 1 t , f(x) t sprintf("K_{fit} =
a_0 + a_1/T", a0)
f(x) = (a0 + a1/x)
fit f(x) 'test.data' using 1:8 via a0,a1
plot 'test.data' using 1:8 w points pt 1 t , f(x) t sprintf("K_{fit} =
a_0 + a_1/T", a0)
f(x) = (a0 + a1/x)
fit f(x) 'test.data' using 1:9 via a0,a1
plot 'test.data' using 1:9 w points pt 1 t , f(x) t sprintf("K_{fit} =
a_0 + a_1/T", a0)
Using this code, I am getting a plot in eight boxes while I want to plot in
a single box.
Is there any workaround for this issue in gnuplot so that I can plot all
above in a single box?
Any help will be highly appreciated.
Regards
Rekha
--
|
|
From: Adam T. <ath...@at...> - 2020-06-29 20:22:42
|
On a "points" type plot, where I'm using "linecolor variable", I'm trying to construct a legend showing the different colors and their respective values. I have yet to successfully construct a plot command with multiple "keyentry" commands that works as expected - so far, all I ever get is a single additional item. The examples in the manual and in custom_key.dem are ... not helpful, in that I've been unable to generalize them. Help, please? Thanks, -Adam Thompson ath...@at... |
|
From: Jon <dev...@gm...> - 2020-06-24 08:00:29
|
Wow! This is likely the case. Thank you so much for your explanation.
Sincerely,
Jon
On 6/24/20, Ethan Merritt <eam...@gm...> wrote:
> On Tuesday, 23 June 2020 14:26:41 PDT Jon wrote:
>> Hi,
>>
>> I am trying to execute a script ssss.gn within gnuplot 5.2.2 in
>> linuxmint 18.2 including the following lines
>> pwdd="`pwd`"
>> do for [ dir in "4.1 4.15 4.2 4.25 4.3 "] {
>> print dir
>> cd dir."/right/here/waiting/"
>> ef=`head -n 1 DOSCAR | awk '{print $5}'`
>> print ef
>> cd pwdd
>> }
>>
>> but it complains
>
> I do not fully understand this myself, but I do know how avoid the problem.
> There is a subtle difference between
> foo = "`some command`"
> and
> foo = system("some command")
>
> in that the back-quote version is evaluated during command parsing,
> while the system() command is evaluated during execution.
> I am not sure why exactly that matters in your case but apparently it does.
>
> You can fix it by replacing the back-quotes with a system command
>
> pwdd = system("pwd")
> do for [ dir in "4.1 4.15 4.2 4.25 4.3 "] {
> print dir
> cd dir."/right/here/waiting/"
> ef = system("head -n 1 DOSCAR | awk '{print $5}'")
> print ef
> cd pwdd
> }
>
>> gnuplot> load "ssss.gn"
>> head: cannot open 'DOSCAR' for reading: No such file or directory
>> 4.1
>> line 5: constant expression required
>>
>> but the file does exist under the directory, why would it complain
>> file not existing
>>
>> Another confusing observation is the error concerning nonexistence of
>> DOSCAR comes before the print statement in the script. Why is that?
>
> It is a symptom of the back-quote evaluation occuring during an
> earlier stage of processing than the loop execution.
>
> Ethan
>
>
>>
>> Thanks,
>>
>> Sincerely,
>> Jon
>
>
>
>
|
|
From: Ethan M. <eam...@gm...> - 2020-06-24 05:04:53
|
On Tuesday, 23 June 2020 14:26:41 PDT Jon wrote:
> Hi,
>
> I am trying to execute a script ssss.gn within gnuplot 5.2.2 in
> linuxmint 18.2 including the following lines
> pwdd="`pwd`"
> do for [ dir in "4.1 4.15 4.2 4.25 4.3 "] {
> print dir
> cd dir."/right/here/waiting/"
> ef=`head -n 1 DOSCAR | awk '{print $5}'`
> print ef
> cd pwdd
> }
>
> but it complains
I do not fully understand this myself, but I do know how avoid the problem.
There is a subtle difference between
foo = "`some command`"
and
foo = system("some command")
in that the back-quote version is evaluated during command parsing,
while the system() command is evaluated during execution.
I am not sure why exactly that matters in your case but apparently it does.
You can fix it by replacing the back-quotes with a system command
pwdd = system("pwd")
do for [ dir in "4.1 4.15 4.2 4.25 4.3 "] {
print dir
cd dir."/right/here/waiting/"
ef = system("head -n 1 DOSCAR | awk '{print $5}'")
print ef
cd pwdd
}
> gnuplot> load "ssss.gn"
> head: cannot open 'DOSCAR' for reading: No such file or directory
> 4.1
> line 5: constant expression required
>
> but the file does exist under the directory, why would it complain
> file not existing
>
> Another confusing observation is the error concerning nonexistence of
> DOSCAR comes before the print statement in the script. Why is that?
It is a symptom of the back-quote evaluation occuring during an
earlier stage of processing than the loop execution.
Ethan
>
> Thanks,
>
> Sincerely,
> Jon
|
|
From: Jon <dev...@gm...> - 2020-06-23 21:26:52
|
Hi,
I am trying to execute a script ssss.gn within gnuplot 5.2.2 in
linuxmint 18.2 including the following lines
pwdd="`pwd`"
do for [ dir in "4.1 4.15 4.2 4.25 4.3 "] {
print dir
cd dir."/right/here/waiting/"
ef=`head -n 1 DOSCAR | awk '{print $5}'`
print ef
cd pwdd
}
but it complains
gnuplot> load "ssss.gn"
head: cannot open 'DOSCAR' for reading: No such file or directory
4.1
line 5: constant expression required
but the file does exist under the directory, why would it complain
file not existing
Another confusing observation is the error concerning nonexistence of
DOSCAR comes before the print statement in the script. Why is that?
Thanks,
Sincerely,
Jon
|
|
From: Robert D. <rob...@gm...> - 2020-06-01 03:15:23
|
Hi, thanks a lot for creating and maintaining Gnuplot, I have used it a lot for years. I am interested in adapting some of the examples shown on the demo pages, in particular: http://gnuplot.sourceforge.net/demo/complex_trig.html I wonder what is the license for the code samples, http://gnuplot.sourceforge.net/demo/complex_trig.1.gnu and so on. I looked around for a license statement but I didn't find one. I am working on creating some glue code in Maxima to output the commands needed to generate plots like that, and for that purpose I am thinking that I'll adapt some of the examples, and I'm wondering what I should say about those files in my work. Thank you for any guidance, I appreciate your help. best, Robert Dodier |
|
From: Kevin O. <rko...@gm...> - 2020-05-31 04:46:06
|
Thanks, Ethan. On to plan 'B'. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rko...@gm... PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 On Sat, May 30, 2020 at 7:11 PM Ethan Merritt <eam...@gm...> wrote: > On Saturday, 30 May 2020 17:59:18 PDT Kevin Oberman wrote: > > I wanted to pick a dashtype for a plot so tried "test" to see defaults. > > gnuplot> set term gif size 1024, 600 > > > > Terminal type is now 'gif' > > Options are 'nocrop enhanced size 1024,600 font "arial,12.0" ' > > gnuplot> set colors classic > > gnuplot> set output "test.gif > > gnuplot> test > > gnuplot> quit > > > > The dashtypes are all identical solid lines (gif attached but may not > make > > it through filters). > > > > v5.2p8 on FreeBSD 12.1. > > Is this a known issue? > > Yes. > The terminals based on libgd (gif/jpeg/png) do not support dashed lines. > That is a limitation of the library. > > Unfortunately if you need specifically gif there isn't another > direct output option in gnuplot. You would have to use e.g. > pngcairo and convert it to gif in a separate step. > > Ethan > > > > |
|
From: Ethan M. <eam...@gm...> - 2020-05-31 02:11:37
|
On Saturday, 30 May 2020 17:59:18 PDT Kevin Oberman wrote: > I wanted to pick a dashtype for a plot so tried "test" to see defaults. > gnuplot> set term gif size 1024, 600 > > Terminal type is now 'gif' > Options are 'nocrop enhanced size 1024,600 font "arial,12.0" ' > gnuplot> set colors classic > gnuplot> set output "test.gif > gnuplot> test > gnuplot> quit > > The dashtypes are all identical solid lines (gif attached but may not make > it through filters). > > v5.2p8 on FreeBSD 12.1. > Is this a known issue? Yes. The terminals based on libgd (gif/jpeg/png) do not support dashed lines. That is a limitation of the library. Unfortunately if you need specifically gif there isn't another direct output option in gnuplot. You would have to use e.g. pngcairo and convert it to gif in a separate step. Ethan |
|
From: Kevin O. <rko...@gm...> - 2020-05-31 00:59:42
|
I wanted to pick a dashtype for a plot so tried "test" to see defaults. gnuplot> set term gif size 1024, 600 Terminal type is now 'gif' Options are 'nocrop enhanced size 1024,600 font "arial,12.0" ' gnuplot> set colors classic gnuplot> set output "test.gif gnuplot> test gnuplot> quit The dashtypes are all identical solid lines (gif attached but may not make it through filters). v5.2p8 on FreeBSD 12.1. Is this a known issue? -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rko...@gm... PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 |
|
From: Giorgio C. <gio...@gm...> - 2020-05-01 10:27:09
|
In the "gnuplot links" page (http://gnuplot.sourceforge.net/links.html), "Programming interfaces" section, "Julia" list, there is a mispelled package name: "*gnuplot.jp (gcalderone)*" should rather be "*Gnuplot.jl (gcalderone)*". Is it possible to correct it? Also, many links in that page are now dead. It may be helpful to update or remove them. Thanks! Giorgio. |
|
From: Ethan M. <eam...@gm...> - 2020-04-21 22:27:45
|
On Tuesday, 21 April 2020 14:45:50 PDT Reginald Beardsley via gnuplot-info wrote: > What is the time epoch date for the time format data? > I want to do curve fits to time data, but have been unable to sort out what date and time is T-zero. In gnuplot version 4 the epoch date was 1 Jan 2000. In gnuplot 5 it was switched to 1 Jan 1970 to conform with unix standard date commands. You should be able to confirm this for your particular gnuplot by typing "help time". Starting with gnuplot version 5.2 there is also an option to use relative time formats %tH %tM %tS. These have no epoch date, they simply convert between a text string and an absolute number of seconds, positive or negative. For these formats T-zero is 0. Ethan |
|
From: Reginald B. <pul...@ya...> - 2020-04-21 21:46:03
|
What is the time epoch date for the time format data? I want to do curve fits to time data, but have been unable to sort out what date and time is T-zero. |
|
From: Ethan M. <eam...@gm...> - 2020-04-21 21:33:16
|
On Tuesday, 21 April 2020 13:33:03 PDT John L. Males wrote:
> Hello,
>
> I have had the data separator set to comma for few years as the
> data is a CSV file.
>
> The issue is the leading comma. It appears that the date
> format assumes the time information is in the first two fields
> of the data.
That has never been true. Aside from that, the introduction of
explicit time conversion functions strptime(), strftime(), and
timecolumn() decoupled the input (datafile columns) and output
(plot axes).
> Ergo the leading comma of the data has caused
> error messages to effect of invalid time from gnuplot which is
> why the data is pre-processed to remove the leading comma of
> the data before processed by gnuplot.
Could you provide an example of this?
I don't understand how you could get an error message about a
leading comma when you have told gnuplot that it is a comma-separated
csv file. Each field being parsed starts by definition _after_ the field
seperator, so it should not be possible for it to see a leading comma.
At worst you should be looking at a column too far to the right because
an extra comma caused it to skip ahead more than intended.
> The issue is not if I can plot the data of a CSV file.
This works here on your snippet of csv data. Season to taste.
set datafile sep comma
total_time(dummy) = strptime("%Y-%m-%d",strcol(2)) + strptime("%H:%M:%S", strcol(3))
plot 'data' using 4:(total_time(0))
If you want time format labels along x, add:
set xtics time format "%H:%M:%S"
and similarly for y
Ethan
> John L. Males
> Toronto, Ontario
> Canada
> 21 April 2020 16:33 -0400 EDT
>
>
>
> Message replied to:
>
> Date: Mon, 20 Apr 2020 22:17:35 +0200
> From: "t.sefzick" <t.s...@gm...>
> To: "John L. Males" <jl...@gm...>
> Cc: eam...@gm..., gnu...@li...,
> t.s...@gm... Subject: Re: [Gnuplot-info] columns with time
> format as "y"
>
>
> > The separator of your data is the comma, so
> >
> > set datafile separator comma
> >
> > splits your data into
> >
> > <empty> date time value1 value2
> >
> > Because of the empty first column you need to start
> > with column 2:
> >
> > set timefmt "%Y-%m-%d,%H:%M:%S"
> > plot "datafile.dat" using 2:4
> >
> > On Mon, Apr 20, 2020 at 08:00:02PM +0000, John L. Males wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > Hello,
> > >
> > > As follow on to the OP question I have data format of the
> > > form:
> > >
> > > ,2019-04-16,20:30:00,30522,5
> > > ,2019-04-16,20:31:00,30523,6
> > > ,2019-04-16,20:32:00,30524,7
> > > ,2019-04-16,20:33:00,30525,8
> > > ,2019-04-16,20:34:00,30526,9
> > > ,2019-04-16,20:35:00,30527,10
> > > ,2019-04-16,20:36:00,30528,11
> > > ,2019-04-16,20:37:00,30529,12
> > > ,2019-04-16,20:38:00,30530,13
> > > ,2019-04-16,20:39:00,30531,14
> > >
> > > Yes, the data lines start with "," for reasons I will skip
> > > other than to say this is the data by design.
> > >
> > > I had tried a:
> > >
> > > set timefmt ",%Y-%m-%d,%H:%M:%S"
> > >
> > > a few years ago and again a few months ago with no success.
> > > Just an error message to effect of invalid time format in
> > > data. I have had to add extra external step to filter the
> > > data. The issue is the data is very large so it adds a
> > > couple minutes to filter the data before I can input the
> > > date to gnuplot. I really would like to eliminate the data
> > > filter step that eliminates the leading comma of the data
> > > as this data is processed every 15 minutes for now as I
> > > cannot filter the data every 5 minutes due to the added
> > > filtering step that then uses:
> > >
> > > set timefmt "%Y-%m-%d,%H:%M:%S"
> > >
> > >
> > > John L. Males
> > > Toronto, Ontario
> > > Canada
> > > 20 April 2020 16:00 -0400 EDT
> > >
> > > Message replied to:
> > >
> > > Date: Mon, 20 Apr 2020 12:00:40 -0700
> > > From: Ethan Merritt <eam...@gm...>
> > > To: gnu...@li...
> > > Subject: Re: [Gnuplot-info] columns with time format as "y"
> > >
> > >
> > > > On Monday, 20 April 2020 11:30:03 PDT co...@tr...
> > > > wrote:
> > > > >
> > > > > Hello All,
> > > > >
> > > > > I need help with the following problem:
> > > > >
> > > > > Let's say my input data look like (columns delimited by
> > > > > \t):
> > > > >
> > > > > 2019-04-16 20:30:00 30522 5
> > > > > 2019-04-16 20:31:00 30523 6
> > > > > 2019-04-16 20:32:00 30524 7
> > > > > 2019-04-16 20:33:00 30525 8
> > > > > 2019-04-16 20:34:00 30526 9
> > > > > 2019-04-16 20:35:00 30527 10
> > > > > 2019-04-16 20:36:00 30528 11
> > > > > 2019-04-16 20:37:00 30529 12
> > > > > 2019-04-16 20:38:00 30530 13
> > > > > 2019-04-16 20:39:00 30531 14
> > > > >
> > > > > Column 1 & 2 (space separated) considered as date/time.
> > > > >
> > > > > Plotting Col. 3 or 4 against date/time works fine:
> > > > >
> > > > > set xdata time
> > > > > set timefmt "%Y-%m-%d\t%H:%M:%S"
> > > > > set format x "%d.%m. %H:%M"
> > > > > plot 'my_file.txt' using 1:3 title "col 3" axis x1y1
> > > > > with linespoints pt7 lc 4, '' using 1:4 title "col 4"
> > > > > axis x1y1 with linespoints pt7 lc 7
> > > > >
> > > > > Special feature: Although columns 1 and 2 *together*
> > > > > give the timestamp, only "1:..." is given for "using"
> > > > > statement. This method is often found in examples.
> > > > >
> > > > > But now I would like - don't ask me why - to plot the
> > > > > timestamp against column 3, i.e. column 3 as "x" and the
> > > > > timestamp (columns 1 & 2) as "y".
> > > > >
> > > > > I was trying:
> > > > >
> > > > > set ydata time "%Y-%m-%d\t%H:%M:%S"
> > > > > set timefmt "%Y-%m-%d\t%H:%M:%S"
> > > > > set format y "%d.%m. %H:%M"
> > > > > plot 'my_file.txt' using 3:1 title "col 3" axis x1y1
> > > > > with linespoints pt7 lc 4
> > > > >
> > > > > Result: only date is used for plotting "y", time
> > > > > ignored!
> > > >
> > > > Replace the tab with a space in timefmt:
> > > >
> > > > set timefmt "%Y-%m-%d %H:%M:%S"
> > > >
> > > > The space character in the format will match any
> > > > whitespace sequence, including <tab>.
> > > >
> > > > Ethan
|
|
From: t.sefzick <t.s...@gm...> - 2020-04-21 21:20:22
|
The date format takes the columns of the input data which you specify with the "using" option. For data likes these ,2019-04-16,20:30:00,30522,5 ,2019-04-16,20:31:00,30523,6 and the comma as separator, after the data have been read in by gnuplot the 1st field is empty, the date is in the 2nd one: <empty> 2019-04-16 20:30:00 30522 5 <empty> 2019-04-16 20:31:00 30523 6 So the plot command will use column 2 as x and e.g. column 4 as y: set timefmt "%Y-%m-%d,%H:%M:%S" plot "datafile.dat" using 2:4 On Tue, Apr 21, 2020 at 08:33:03PM +0000, John L. Males wrote: > > Hello, > > I have had the data separator set to comma for few years as the > data is a CSV file. > > The issue is the leading comma. It appears that the date > format assumes the time information is in the first two fields > of the data. Ergo the leading comma of the data has caused > error messages to effect of invalid time from gnuplot which is > why the data is pre-processed to remove the leading comma of > the data before processed by gnuplot. > > The issue is not if I can plot the data of a CSV file. I have > been plotting CSV files for a number of years. I have scripts > that run every 15 minutes creating over 20 plots from 5 > different CSV files for number of years. I like to eliminate > the extra external step that processes the CSV data to remove > the leading comma in the data. The data that is very large > really needs to be refreshed every 5 minutes, but cannot as the > data has to be passed over twice to plot the data with > gnuplot. If I did not have to have the external step to > remove the leading comma in the data then this very large data > could be plotted every 5 minutes. The smaller CSV files also > would plot much faster be eliminating the extra step to remove > the leading comma before gnuplot can process the CSV data. > > > John L. Males > Toronto, Ontario > Canada > 21 April 2020 16:33 -0400 EDT > > > Message replied to: > > Date: Mon, 20 Apr 2020 22:17:35 +0200 > From: "t.sefzick" <t.s...@gm...> > To: "John L. Males" <jl...@gm...> > Cc: eam...@gm..., gnu...@li..., > t.s...@gm... Subject: Re: [Gnuplot-info] columns with time > format as "y" > > > > The separator of your data is the comma, so > > > > set datafile separator comma > > > > splits your data into > > > > <empty> date time value1 value2 > > > > Because of the empty first column you need to start > > with column 2: > > > > set timefmt "%Y-%m-%d,%H:%M:%S" > > plot "datafile.dat" using 2:4 > > > > On Mon, Apr 20, 2020 at 08:00:02PM +0000, John L. Males wrote: > > > > > > Hello, > > > > > > As follow on to the OP question I have data format of the > > > form: > > > > > > ,2019-04-16,20:30:00,30522,5 > > > ,2019-04-16,20:31:00,30523,6 > > > ,2019-04-16,20:32:00,30524,7 > > > ,2019-04-16,20:33:00,30525,8 > > > ,2019-04-16,20:34:00,30526,9 > > > ,2019-04-16,20:35:00,30527,10 > > > ,2019-04-16,20:36:00,30528,11 > > > ,2019-04-16,20:37:00,30529,12 > > > ,2019-04-16,20:38:00,30530,13 > > > ,2019-04-16,20:39:00,30531,14 > > > > > > Yes, the data lines start with "," for reasons I will skip > > > other than to say this is the data by design. > > > > > > I had tried a: > > > > > > set timefmt ",%Y-%m-%d,%H:%M:%S" > > > > > > a few years ago and again a few months ago with no success. > > > Just an error message to effect of invalid time format in > > > data. I have had to add extra external step to filter the > > > data. The issue is the data is very large so it adds a > > > couple minutes to filter the data before I can input the > > > date to gnuplot. I really would like to eliminate the data > > > filter step that eliminates the leading comma of the data > > > as this data is processed every 15 minutes for now as I > > > cannot filter the data every 5 minutes due to the added > > > filtering step that then uses: > > > > > > set timefmt "%Y-%m-%d,%H:%M:%S" > > > > > > > > > John L. Males > > > Toronto, Ontario > > > Canada > > > 20 April 2020 16:00 -0400 EDT > > > > > > > > > Message replied to: > > > > > > Date: Mon, 20 Apr 2020 12:00:40 -0700 > > > From: Ethan Merritt <eam...@gm...> > > > To: gnu...@li... > > > Subject: Re: [Gnuplot-info] columns with time format as "y" > > > > > > > > > > On Monday, 20 April 2020 11:30:03 PDT co...@tr... > > > > wrote: > > > > > > > > > > Hello All, > > > > > > > > > > I need help with the following problem: > > > > > > > > > > Let's say my input data look like (columns delimited by > > > > > \t): > > > > > > > > > > 2019-04-16 20:30:00 30522 5 > > > > > 2019-04-16 20:31:00 30523 6 > > > > > 2019-04-16 20:32:00 30524 7 > > > > > 2019-04-16 20:33:00 30525 8 > > > > > 2019-04-16 20:34:00 30526 9 > > > > > 2019-04-16 20:35:00 30527 10 > > > > > 2019-04-16 20:36:00 30528 11 > > > > > 2019-04-16 20:37:00 30529 12 > > > > > 2019-04-16 20:38:00 30530 13 > > > > > 2019-04-16 20:39:00 30531 14 > > > > > > > > > > Column 1 & 2 (space separated) considered as date/time. > > > > > > > > > > Plotting Col. 3 or 4 against date/time works fine: > > > > > > > > > > set xdata time > > > > > set timefmt "%Y-%m-%d\t%H:%M:%S" > > > > > set format x "%d.%m. %H:%M" > > > > > plot 'my_file.txt' using 1:3 title "col 3" axis x1y1 > > > > > with linespoints pt7 lc 4, '' using 1:4 title "col 4" > > > > > axis x1y1 with linespoints pt7 lc 7 > > > > > > > > > > Special feature: Although columns 1 and 2 *together* > > > > > give the timestamp, only "1:..." is given for "using" > > > > > statement. This method is often found in examples. > > > > > > > > > > But now I would like - don't ask me why - to plot the > > > > > timestamp against column 3, i.e. column 3 as "x" and the > > > > > timestamp (columns 1 & 2) as "y". > > > > > > > > > > I was trying: > > > > > > > > > > set ydata time "%Y-%m-%d\t%H:%M:%S" > > > > > set timefmt "%Y-%m-%d\t%H:%M:%S" > > > > > set format y "%d.%m. %H:%M" > > > > > plot 'my_file.txt' using 3:1 title "col 3" axis x1y1 > > > > > with linespoints pt7 lc 4 > > > > > > > > > > Result: only date is used for plotting "y", time > > > > > ignored! > > > > > > > > Replace the tab with a space in timefmt: > > > > > > > > set timefmt "%Y-%m-%d %H:%M:%S" > > > > > > > > The space character in the format will match any > > > > whitespace sequence, including <tab>. > > > > > > > > Ethan |
|
From: John L. M. <jl...@gm...> - 2020-04-21 20:33:38
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I have had the data separator set to comma for few years as the
data is a CSV file.
The issue is the leading comma. It appears that the date
format assumes the time information is in the first two fields
of the data. Ergo the leading comma of the data has caused
error messages to effect of invalid time from gnuplot which is
why the data is pre-processed to remove the leading comma of
the data before processed by gnuplot.
The issue is not if I can plot the data of a CSV file. I have
been plotting CSV files for a number of years. I have scripts
that run every 15 minutes creating over 20 plots from 5
different CSV files for number of years. I like to eliminate
the extra external step that processes the CSV data to remove
the leading comma in the data. The data that is very large
really needs to be refreshed every 5 minutes, but cannot as the
data has to be passed over twice to plot the data with
gnuplot. If I did not have to have the external step to
remove the leading comma in the data then this very large data
could be plotted every 5 minutes. The smaller CSV files also
would plot much faster be eliminating the extra step to remove
the leading comma before gnuplot can process the CSV data.
John L. Males
Toronto, Ontario
Canada
21 April 2020 16:33 -0400 EDT
================================================================
2020-04-21 20:16:43+0000-UTC Time: 1587500203 PC/System time
21 Apr 20:16:43 ntpdate[34041]: ntpdate 4.2.8p12-a (1)
21 Apr 20:16:58 ntpdate[35558]: step time server 216.232.132.31
offset 0.001401 sec
FreeBSD 11.3-STABLE FreeBSD 11.3-STABLE #0 r349903: Thu Jul 11
16:13:47 UTC 2019
ro...@re...:/usr/obj/usr/src/sys/GENERIC
(Work in progress alternative to Linux Kernel of its own right,
Debian, and
other Linux based Kernel distributions determined.)
Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz
Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz (1396.86-MHz K8-class
CPU) Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz (1396.86-MHz
K8-class CPU) Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz
(1396.86-MHz K8-class CPU) Intel(R) Core(TM) i3-2367M CPU @
1.40GHz (1396.86-MHz K8-class CPU) Intel(R) Core(TM) i3-2367M
CPU @ 1.40GHz (1396.86-MHz K8-class CPU)
dev.cpu.0.temperature: 60.0C
dev.cpu.1.temperature: 60.0C
dev.cpu.2.temperature: 56.0C
dev.cpu.3.temperature: 56.0C
hw.acpi.thermal.tz0.temperature: 65.1C
vmstat -s:
618156 cpu context switches
67434 device interrupts
11717 software interrupts
408902 traps
53956889 system calls
27 kernel threads created
1727 fork() calls
335 vfork() calls
0 rfork() calls
0 swap pager pageins
0 swap pager pages paged in
0 swap pager pageouts
0 swap pager pages paged out
3773 vnode pager pageins
36603 vnode pager pages paged in
1 vnode pager pageouts
1 vnode pager pages paged out
0 page daemon wakeups
39220 pages examined by the page daemon
0 clean page reclamation shortfalls
0 pages reactivated by the page daemon
75655 copy-on-write faults
429 copy-on-write optimized faults
214323 zero fill pages zeroed
0 zero fill pages prezeroed
2 intransit blocking page faults
448906 total VM faults taken
3540 page faults requiring I/O
0 pages affected by kernel thread creation
68956 pages affected by fork()
11877 pages affected by vfork()
0 pages affected by rfork()
479243 pages freed
0 pages freed by daemon
117279 pages freed by exiting processes
52928 pages active
34022 pages inactive
0 pages in the laundry queue
103525 pages wired down
3862291 pages free
4096 bytes per page
226307 total name lookups
cache hits (86% pos + 6% neg) system 0% per-directory
deletions 0%, falsehits 0%, toolong 0%
Boot time : 1587499634
procs memory page disks
faults cpu0 cpu1 cpu2 cpu3 r b w avm
fre flt re pi po fr sr ad0 pa0 in sy cs us sy
id us sy id us sy id us sy id 0 0 0 2129420 15449104 769 0
6 0 821 67 0 0 115 92235 1057 3 6 91 4 6 90 4
6 91 3 6 90
memory info:
real memory = 17179869184 (16384 MB)
avail memory = 16495013888 (15730 MB)
last pid: 44946; load averages: 0.23, 0.33, 0.24 up
0+00:09:45 20:16:59 40 processes: 1 running, 39 sleeping
Mem: 207M Active, 133M Inact, 405M Wired, 77M Buf, 15G Free
Swap: 48G Total, 48G Free
hw.physmem: 17053859840
hw.usermem: 16629661696
hw.realmem: 17179869184
total used free shared
buffers cached Mem: 16210872 625800
15585072 0 0 0 Swap:
50331644 0 50331644
swapinfo:
Device 1K-blocks Used Avail Capacity
/dev/ada0s1b 50331644 0 50331644 0%
vmstat:
procs memory page disks
faults cpu r b w avm fre flt re pi po
fr sr ad0 pa0 in sy cs us sy id 0 0 0 2129484
15448752 773 0 6 0 824 67 0 0 116 92247 1060
4 6 90
Message replied to:
Date: Mon, 20 Apr 2020 22:17:35 +0200
From: "t.sefzick" <t.s...@gm...>
To: "John L. Males" <jl...@gm...>
Cc: eam...@gm..., gnu...@li...,
t.s...@gm... Subject: Re: [Gnuplot-info] columns with time
format as "y"
> The separator of your data is the comma, so
>
> set datafile separator comma
>
> splits your data into
>
> <empty> date time value1 value2
>
> Because of the empty first column you need to start
> with column 2:
>
> set timefmt "%Y-%m-%d,%H:%M:%S"
> plot "datafile.dat" using 2:4
>
> On Mon, Apr 20, 2020 at 08:00:02PM +0000, John L. Males wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hello,
> >
> > As follow on to the OP question I have data format of the
> > form:
> >
> > ,2019-04-16,20:30:00,30522,5
> > ,2019-04-16,20:31:00,30523,6
> > ,2019-04-16,20:32:00,30524,7
> > ,2019-04-16,20:33:00,30525,8
> > ,2019-04-16,20:34:00,30526,9
> > ,2019-04-16,20:35:00,30527,10
> > ,2019-04-16,20:36:00,30528,11
> > ,2019-04-16,20:37:00,30529,12
> > ,2019-04-16,20:38:00,30530,13
> > ,2019-04-16,20:39:00,30531,14
> >
> > Yes, the data lines start with "," for reasons I will skip
> > other than to say this is the data by design.
> >
> > I had tried a:
> >
> > set timefmt ",%Y-%m-%d,%H:%M:%S"
> >
> > a few years ago and again a few months ago with no success.
> > Just an error message to effect of invalid time format in
> > data. I have had to add extra external step to filter the
> > data. The issue is the data is very large so it adds a
> > couple minutes to filter the data before I can input the
> > date to gnuplot. I really would like to eliminate the data
> > filter step that eliminates the leading comma of the data
> > as this data is processed every 15 minutes for now as I
> > cannot filter the data every 5 minutes due to the added
> > filtering step that then uses:
> >
> > set timefmt "%Y-%m-%d,%H:%M:%S"
> >
> >
> > John L. Males
> > Toronto, Ontario
> > Canada
> > 20 April 2020 16:00 -0400 EDT
> >
> >
> > ================================================================
> >
> > 2020-04-20 19:45:51+0000-UTC Time: 1587411951 PC/System time
> >
> > 20 Apr 19:45:51 ntpdate[64207]: ntpdate 4.2.8p12-a (1)
> >
> > 20 Apr 19:46:06 ntpdate[65654]: step time server
> > 128.100.100.128 offset 0.003394 sec
> >
> > FreeBSD 11.3-STABLE FreeBSD 11.3-STABLE #0 r349903: Thu Jul
> > 11 16:13:47 UTC 2019
> > ro...@re...:/usr/obj/usr/src/sys/GENERIC
> >
> > (Work in progress alternative to Linux Kernel of its own
> > right, Debian, and
> > other Linux based Kernel distributions determined.)
> >
> > Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz
> > Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz (1396.86-MHz
> > K8-class CPU) Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz
> > (1396.86-MHz K8-class CPU) Intel(R) Core(TM) i3-2367M CPU @
> > 1.40GHz (1396.86-MHz K8-class CPU) Intel(R) Core(TM)
> > i3-2367M CPU @ 1.40GHz (1396.86-MHz K8-class CPU) Intel(R)
> > Core(TM) i3-2367M CPU @ 1.40GHz (1396.86-MHz K8-class CPU)
> >
> > dev.cpu.0.temperature: 73.0C
> > dev.cpu.1.temperature: 73.0C
> > dev.cpu.2.temperature: 69.0C
> > dev.cpu.3.temperature: 69.0C
> > hw.acpi.thermal.tz0.temperature: 75.1C
> >
> > vmstat -s:
> >
> > 83430749 cpu context switches
> > 1277504 device interrupts
> > 368458 software interrupts
> > 31639133 traps
> > 264899647 system calls
> > 27 kernel threads created
> > 1920 fork() calls
> > 596 vfork() calls
> > 0 rfork() calls
> > 0 swap pager pageins
> > 0 swap pager pages paged in
> > 0 swap pager pageouts
> > 0 swap pager pages paged out
> > 6321 vnode pager pageins
> > 73954 vnode pager pages paged in
> > 107 vnode pager pageouts
> > 107 vnode pager pages paged out
> > 0 page daemon wakeups
> > 12090933 pages examined by the page daemon
> > 0 clean page reclamation shortfalls
> > 0 pages reactivated by the page daemon
> > 113093 copy-on-write faults
> > 463 copy-on-write optimized faults
> > 28402363 zero fill pages zeroed
> > 0 zero fill pages prezeroed
> > 48 intransit blocking page faults
> > 32157102 total VM faults taken
> > 6075 page faults requiring I/O
> > 0 pages affected by kernel thread creation
> > 93134 pages affected by fork()
> > 20968 pages affected by vfork()
> > 0 pages affected by rfork()
> > 29860181 pages freed
> > 0 pages freed by daemon
> > 14599509 pages freed by exiting processes
> > 344499 pages active
> > 1010164 pages inactive
> > 76679 pages in the laundry queue
> > 262762 pages wired down
> > 2358662 pages free
> > 4096 bytes per page
> > 4907338 total name lookups
> > cache hits (96% pos + 1% neg) system 0%
> > per-directory deletions 0%, falsehits 0%, toolong 0%
> >
> > Boot time : 1587398332
> >
> > procs memory page disks
> > faults cpu0 cpu1 cpu2 cpu3 r b w avm
> > fre flt re pi po fr sr ad0 pa0 in sy cs us
> > sy id us sy id us sy id us sy id 0 0 0 30655696 9434572
> > 2359 0 0 0 2190 887 0 0 94 19431 6120 13 4 83
> > 13 4 83 13 4 83 13 4 83
> >
> > memory info:
> >
> > real memory = 17179869184 (16384 MB)
> > avail memory = 16495013888 (15730 MB)
> >
> > last pid: 71600; load averages: 0.53, 0.79, 0.81 up
> > 0+03:47:14 19:46:06 53 processes: 1 running, 52 sleeping
> >
> > Mem: 1346M Active, 3946M Inact, 300M Laundry, 1027M Wired,
> > 442M Buf, 9213M Free Swap: 48G Total, 48G Free
> >
> > hw.physmem: 17053859840
> > hw.usermem: 15977410560
> > hw.realmem: 17179869184
> >
> > total used free shared
> > buffers cached Mem: 16210872 2735676
> > 13475196 0 0 0 Swap:
> > 50331644 0 50331644
> >
> > swapinfo:
> >
> > Device 1K-blocks Used Avail Capacity
> > /dev/ada0s1b 50331644 0 50331644 0%
> >
> > vmstat:
> >
> > procs memory page disks
> > faults cpu r b w avm fre flt re pi po
> > fr sr ad0 pa0 in sy cs us sy id 0 0 0 30655696
> > 9434576 2359 0 0 0 2190 887 0 0 94 19430 6120
> > 13 4 83
> >
> >
> > Message replied to:
> >
> > Date: Mon, 20 Apr 2020 12:00:40 -0700
> > From: Ethan Merritt <eam...@gm...>
> > To: gnu...@li...
> > Subject: Re: [Gnuplot-info] columns with time format as "y"
> >
> >
> > > On Monday, 20 April 2020 11:30:03 PDT co...@tr...
> > > wrote:
> > > >
> > > > Hello All,
> > > >
> > > > I need help with the following problem:
> > > >
> > > > Let's say my input data look like (columns delimited by
> > > > \t):
> > > >
> > > > 2019-04-16 20:30:00 30522 5
> > > > 2019-04-16 20:31:00 30523 6
> > > > 2019-04-16 20:32:00 30524 7
> > > > 2019-04-16 20:33:00 30525 8
> > > > 2019-04-16 20:34:00 30526 9
> > > > 2019-04-16 20:35:00 30527 10
> > > > 2019-04-16 20:36:00 30528 11
> > > > 2019-04-16 20:37:00 30529 12
> > > > 2019-04-16 20:38:00 30530 13
> > > > 2019-04-16 20:39:00 30531 14
> > > >
> > > > Column 1 & 2 (space separated) considered as date/time.
> > > >
> > > > Plotting Col. 3 or 4 against date/time works fine:
> > > >
> > > > set xdata time
> > > > set timefmt "%Y-%m-%d\t%H:%M:%S"
> > > > set format x "%d.%m. %H:%M"
> > > > plot 'my_file.txt' using 1:3 title "col 3" axis x1y1
> > > > with linespoints pt7 lc 4, '' using 1:4 title "col 4"
> > > > axis x1y1 with linespoints pt7 lc 7
> > > >
> > > > Special feature: Although columns 1 and 2 *together*
> > > > give the timestamp, only "1:..." is given for "using"
> > > > statement. This method is often found in examples.
> > > >
> > > > But now I would like - don't ask me why - to plot the
> > > > timestamp against column 3, i.e. column 3 as "x" and the
> > > > timestamp (columns 1 & 2) as "y".
> > > >
> > > > I was trying:
> > > >
> > > > set ydata time "%Y-%m-%d\t%H:%M:%S"
> > > > set timefmt "%Y-%m-%d\t%H:%M:%S"
> > > > set format y "%d.%m. %H:%M"
> > > > plot 'my_file.txt' using 3:1 title "col 3" axis x1y1
> > > > with linespoints pt7 lc 4
> > > >
> > > > Result: only date is used for plotting "y", time
> > > > ignored!
> > >
> > > Replace the tab with a space in timefmt:
> > >
> > > set timefmt "%Y-%m-%d %H:%M:%S"
> > >
> > > The space character in the format will match any
> > > whitespace sequence, including <tab>.
> > >
> > > Ethan
> > >
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > gnuplot-info mailing list
> > > gnu...@li...
> > > Membership management via:
> > > https://lists.sourceforge.net/lists/listinfo/gnuplot-info
> > -----BEGIN PGP SIGNATURE-----
> >
> > iF0EARECAB0WIQQxRId2q5JPHFiozTr5X9dS0HpoEAUCXp3/QwAKCRD5X9dS0Hpo
> > EAx0AJ464SqTe0oieSwe8My/Yc6XCKHS7ACg2wPr2cEnr89Hg1SLbwB+LfpUVUE=
> > =czcZ
> > -----END PGP SIGNATURE-----
> >
> >
> > _______________________________________________
> > gnuplot-info mailing list
> > gnu...@li...
> > Membership management via:
> > https://lists.sourceforge.net/lists/listinfo/gnuplot-info
-----BEGIN PGP SIGNATURE-----
iF0EARECAB0WIQQxRId2q5JPHFiozTr5X9dS0HpoEAUCXp9YgAAKCRD5X9dS0Hpo
EIAXAJ9lX26pI9z+B+dAWYLNTDVfNl3XJwCePEYcozQnzh3X9na5UWxnLsRjfc4=
=OaJE
-----END PGP SIGNATURE-----
|
|
From: t.sefzick <t.s...@gm...> - 2020-04-20 20:18:00
|
The separator of your data is the comma, so set datafile separator comma splits your data into <empty> date time value1 value2 Because of the empty first column you need to start with column 2: set timefmt "%Y-%m-%d,%H:%M:%S" plot "datafile.dat" using 2:4 On Mon, Apr 20, 2020 at 08:00:02PM +0000, John L. Males wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > As follow on to the OP question I have data format of the form: > > ,2019-04-16,20:30:00,30522,5 > ,2019-04-16,20:31:00,30523,6 > ,2019-04-16,20:32:00,30524,7 > ,2019-04-16,20:33:00,30525,8 > ,2019-04-16,20:34:00,30526,9 > ,2019-04-16,20:35:00,30527,10 > ,2019-04-16,20:36:00,30528,11 > ,2019-04-16,20:37:00,30529,12 > ,2019-04-16,20:38:00,30530,13 > ,2019-04-16,20:39:00,30531,14 > > Yes, the data lines start with "," for reasons I will skip > other than to say this is the data by design. > > I had tried a: > > set timefmt ",%Y-%m-%d,%H:%M:%S" > > a few years ago and again a few months ago with no success. > Just an error message to effect of invalid time format in > data. I have had to add extra external step to filter the > data. The issue is the data is very large so it adds a couple > minutes to filter the data before I can input the date to > gnuplot. I really would like to eliminate the data filter step > that eliminates the leading comma of the data as this data is > processed every 15 minutes for now as I cannot filter the data > every 5 minutes due to the added filtering step that then uses: > > set timefmt "%Y-%m-%d,%H:%M:%S" > > > John L. Males > Toronto, Ontario > Canada > 20 April 2020 16:00 -0400 EDT > > > ================================================================ > > 2020-04-20 19:45:51+0000-UTC Time: 1587411951 PC/System time > > 20 Apr 19:45:51 ntpdate[64207]: ntpdate 4.2.8p12-a (1) > > 20 Apr 19:46:06 ntpdate[65654]: step time server > 128.100.100.128 offset 0.003394 sec > > FreeBSD 11.3-STABLE FreeBSD 11.3-STABLE #0 r349903: Thu Jul 11 > 16:13:47 UTC 2019 > ro...@re...:/usr/obj/usr/src/sys/GENERIC > > (Work in progress alternative to Linux Kernel of its own right, > Debian, and > other Linux based Kernel distributions determined.) > > Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz > Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz (1396.86-MHz K8-class > CPU) Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz (1396.86-MHz > K8-class CPU) Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz > (1396.86-MHz K8-class CPU) Intel(R) Core(TM) i3-2367M CPU @ > 1.40GHz (1396.86-MHz K8-class CPU) Intel(R) Core(TM) i3-2367M > CPU @ 1.40GHz (1396.86-MHz K8-class CPU) > > dev.cpu.0.temperature: 73.0C > dev.cpu.1.temperature: 73.0C > dev.cpu.2.temperature: 69.0C > dev.cpu.3.temperature: 69.0C > hw.acpi.thermal.tz0.temperature: 75.1C > > vmstat -s: > > 83430749 cpu context switches > 1277504 device interrupts > 368458 software interrupts > 31639133 traps > 264899647 system calls > 27 kernel threads created > 1920 fork() calls > 596 vfork() calls > 0 rfork() calls > 0 swap pager pageins > 0 swap pager pages paged in > 0 swap pager pageouts > 0 swap pager pages paged out > 6321 vnode pager pageins > 73954 vnode pager pages paged in > 107 vnode pager pageouts > 107 vnode pager pages paged out > 0 page daemon wakeups > 12090933 pages examined by the page daemon > 0 clean page reclamation shortfalls > 0 pages reactivated by the page daemon > 113093 copy-on-write faults > 463 copy-on-write optimized faults > 28402363 zero fill pages zeroed > 0 zero fill pages prezeroed > 48 intransit blocking page faults > 32157102 total VM faults taken > 6075 page faults requiring I/O > 0 pages affected by kernel thread creation > 93134 pages affected by fork() > 20968 pages affected by vfork() > 0 pages affected by rfork() > 29860181 pages freed > 0 pages freed by daemon > 14599509 pages freed by exiting processes > 344499 pages active > 1010164 pages inactive > 76679 pages in the laundry queue > 262762 pages wired down > 2358662 pages free > 4096 bytes per page > 4907338 total name lookups > cache hits (96% pos + 1% neg) system 0% per-directory > deletions 0%, falsehits 0%, toolong 0% > > Boot time : 1587398332 > > procs memory page disks > faults cpu0 cpu1 cpu2 cpu3 r b w avm > fre flt re pi po fr sr ad0 pa0 in sy cs us sy > id us sy id us sy id us sy id 0 0 0 30655696 9434572 2359 0 > 0 0 2190 887 0 0 94 19431 6120 13 4 83 13 4 83 13 > 4 83 13 4 83 > > memory info: > > real memory = 17179869184 (16384 MB) > avail memory = 16495013888 (15730 MB) > > last pid: 71600; load averages: 0.53, 0.79, 0.81 up > 0+03:47:14 19:46:06 53 processes: 1 running, 52 sleeping > > Mem: 1346M Active, 3946M Inact, 300M Laundry, 1027M Wired, 442M > Buf, 9213M Free Swap: 48G Total, 48G Free > > hw.physmem: 17053859840 > hw.usermem: 15977410560 > hw.realmem: 17179869184 > > total used free shared > buffers cached Mem: 16210872 2735676 > 13475196 0 0 0 Swap: > 50331644 0 50331644 > > swapinfo: > > Device 1K-blocks Used Avail Capacity > /dev/ada0s1b 50331644 0 50331644 0% > > vmstat: > > procs memory page disks > faults cpu r b w avm fre flt re pi po > fr sr ad0 pa0 in sy cs us sy id 0 0 0 30655696 > 9434576 2359 0 0 0 2190 887 0 0 94 19430 6120 > 13 4 83 > > > Message replied to: > > Date: Mon, 20 Apr 2020 12:00:40 -0700 > From: Ethan Merritt <eam...@gm...> > To: gnu...@li... > Subject: Re: [Gnuplot-info] columns with time format as "y" > > > > On Monday, 20 April 2020 11:30:03 PDT co...@tr... wrote: > > > > > > Hello All, > > > > > > I need help with the following problem: > > > > > > Let's say my input data look like (columns delimited by \t): > > > > > > 2019-04-16 20:30:00 30522 5 > > > 2019-04-16 20:31:00 30523 6 > > > 2019-04-16 20:32:00 30524 7 > > > 2019-04-16 20:33:00 30525 8 > > > 2019-04-16 20:34:00 30526 9 > > > 2019-04-16 20:35:00 30527 10 > > > 2019-04-16 20:36:00 30528 11 > > > 2019-04-16 20:37:00 30529 12 > > > 2019-04-16 20:38:00 30530 13 > > > 2019-04-16 20:39:00 30531 14 > > > > > > Column 1 & 2 (space separated) considered as date/time. > > > > > > Plotting Col. 3 or 4 against date/time works fine: > > > > > > set xdata time > > > set timefmt "%Y-%m-%d\t%H:%M:%S" > > > set format x "%d.%m. %H:%M" > > > plot 'my_file.txt' using 1:3 title "col 3" axis x1y1 > > > with linespoints pt7 lc 4, '' using 1:4 title "col 4" axis > > > x1y1 with linespoints pt7 lc 7 > > > > > > Special feature: Although columns 1 and 2 *together* give > > > the timestamp, only "1:..." is given for "using" statement. > > > This method is often found in examples. > > > > > > But now I would like - don't ask me why - to plot the > > > timestamp against column 3, i.e. column 3 as "x" and the > > > timestamp (columns 1 & 2) as "y". > > > > > > I was trying: > > > > > > set ydata time "%Y-%m-%d\t%H:%M:%S" > > > set timefmt "%Y-%m-%d\t%H:%M:%S" > > > set format y "%d.%m. %H:%M" > > > plot 'my_file.txt' using 3:1 title "col 3" axis x1y1 with > > > linespoints pt7 lc 4 > > > > > > Result: only date is used for plotting "y", time ignored! > > > > Replace the tab with a space in timefmt: > > > > set timefmt "%Y-%m-%d %H:%M:%S" > > > > The space character in the format will match any whitespace > > sequence, including <tab>. > > > > Ethan > > > > > > > > > > > > > > _______________________________________________ > > gnuplot-info mailing list > > gnu...@li... > > Membership management via: > > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > -----BEGIN PGP SIGNATURE----- > > iF0EARECAB0WIQQxRId2q5JPHFiozTr5X9dS0HpoEAUCXp3/QwAKCRD5X9dS0Hpo > EAx0AJ464SqTe0oieSwe8My/Yc6XCKHS7ACg2wPr2cEnr89Hg1SLbwB+LfpUVUE= > =czcZ > -----END PGP SIGNATURE----- > > > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: John L. M. <jl...@gm...> - 2020-04-20 20:00:34
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
As follow on to the OP question I have data format of the form:
,2019-04-16,20:30:00,30522,5
,2019-04-16,20:31:00,30523,6
,2019-04-16,20:32:00,30524,7
,2019-04-16,20:33:00,30525,8
,2019-04-16,20:34:00,30526,9
,2019-04-16,20:35:00,30527,10
,2019-04-16,20:36:00,30528,11
,2019-04-16,20:37:00,30529,12
,2019-04-16,20:38:00,30530,13
,2019-04-16,20:39:00,30531,14
Yes, the data lines start with "," for reasons I will skip
other than to say this is the data by design.
I had tried a:
set timefmt ",%Y-%m-%d,%H:%M:%S"
a few years ago and again a few months ago with no success.
Just an error message to effect of invalid time format in
data. I have had to add extra external step to filter the
data. The issue is the data is very large so it adds a couple
minutes to filter the data before I can input the date to
gnuplot. I really would like to eliminate the data filter step
that eliminates the leading comma of the data as this data is
processed every 15 minutes for now as I cannot filter the data
every 5 minutes due to the added filtering step that then uses:
set timefmt "%Y-%m-%d,%H:%M:%S"
John L. Males
Toronto, Ontario
Canada
20 April 2020 16:00 -0400 EDT
================================================================
2020-04-20 19:45:51+0000-UTC Time: 1587411951 PC/System time
20 Apr 19:45:51 ntpdate[64207]: ntpdate 4.2.8p12-a (1)
20 Apr 19:46:06 ntpdate[65654]: step time server
128.100.100.128 offset 0.003394 sec
FreeBSD 11.3-STABLE FreeBSD 11.3-STABLE #0 r349903: Thu Jul 11
16:13:47 UTC 2019
ro...@re...:/usr/obj/usr/src/sys/GENERIC
(Work in progress alternative to Linux Kernel of its own right,
Debian, and
other Linux based Kernel distributions determined.)
Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz
Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz (1396.86-MHz K8-class
CPU) Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz (1396.86-MHz
K8-class CPU) Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz
(1396.86-MHz K8-class CPU) Intel(R) Core(TM) i3-2367M CPU @
1.40GHz (1396.86-MHz K8-class CPU) Intel(R) Core(TM) i3-2367M
CPU @ 1.40GHz (1396.86-MHz K8-class CPU)
dev.cpu.0.temperature: 73.0C
dev.cpu.1.temperature: 73.0C
dev.cpu.2.temperature: 69.0C
dev.cpu.3.temperature: 69.0C
hw.acpi.thermal.tz0.temperature: 75.1C
vmstat -s:
83430749 cpu context switches
1277504 device interrupts
368458 software interrupts
31639133 traps
264899647 system calls
27 kernel threads created
1920 fork() calls
596 vfork() calls
0 rfork() calls
0 swap pager pageins
0 swap pager pages paged in
0 swap pager pageouts
0 swap pager pages paged out
6321 vnode pager pageins
73954 vnode pager pages paged in
107 vnode pager pageouts
107 vnode pager pages paged out
0 page daemon wakeups
12090933 pages examined by the page daemon
0 clean page reclamation shortfalls
0 pages reactivated by the page daemon
113093 copy-on-write faults
463 copy-on-write optimized faults
28402363 zero fill pages zeroed
0 zero fill pages prezeroed
48 intransit blocking page faults
32157102 total VM faults taken
6075 page faults requiring I/O
0 pages affected by kernel thread creation
93134 pages affected by fork()
20968 pages affected by vfork()
0 pages affected by rfork()
29860181 pages freed
0 pages freed by daemon
14599509 pages freed by exiting processes
344499 pages active
1010164 pages inactive
76679 pages in the laundry queue
262762 pages wired down
2358662 pages free
4096 bytes per page
4907338 total name lookups
cache hits (96% pos + 1% neg) system 0% per-directory
deletions 0%, falsehits 0%, toolong 0%
Boot time : 1587398332
procs memory page disks
faults cpu0 cpu1 cpu2 cpu3 r b w avm
fre flt re pi po fr sr ad0 pa0 in sy cs us sy
id us sy id us sy id us sy id 0 0 0 30655696 9434572 2359 0
0 0 2190 887 0 0 94 19431 6120 13 4 83 13 4 83 13
4 83 13 4 83
memory info:
real memory = 17179869184 (16384 MB)
avail memory = 16495013888 (15730 MB)
last pid: 71600; load averages: 0.53, 0.79, 0.81 up
0+03:47:14 19:46:06 53 processes: 1 running, 52 sleeping
Mem: 1346M Active, 3946M Inact, 300M Laundry, 1027M Wired, 442M
Buf, 9213M Free Swap: 48G Total, 48G Free
hw.physmem: 17053859840
hw.usermem: 15977410560
hw.realmem: 17179869184
total used free shared
buffers cached Mem: 16210872 2735676
13475196 0 0 0 Swap:
50331644 0 50331644
swapinfo:
Device 1K-blocks Used Avail Capacity
/dev/ada0s1b 50331644 0 50331644 0%
vmstat:
procs memory page disks
faults cpu r b w avm fre flt re pi po
fr sr ad0 pa0 in sy cs us sy id 0 0 0 30655696
9434576 2359 0 0 0 2190 887 0 0 94 19430 6120
13 4 83
Message replied to:
Date: Mon, 20 Apr 2020 12:00:40 -0700
From: Ethan Merritt <eam...@gm...>
To: gnu...@li...
Subject: Re: [Gnuplot-info] columns with time format as "y"
> On Monday, 20 April 2020 11:30:03 PDT co...@tr... wrote:
> >
> > Hello All,
> >
> > I need help with the following problem:
> >
> > Let's say my input data look like (columns delimited by \t):
> >
> > 2019-04-16 20:30:00 30522 5
> > 2019-04-16 20:31:00 30523 6
> > 2019-04-16 20:32:00 30524 7
> > 2019-04-16 20:33:00 30525 8
> > 2019-04-16 20:34:00 30526 9
> > 2019-04-16 20:35:00 30527 10
> > 2019-04-16 20:36:00 30528 11
> > 2019-04-16 20:37:00 30529 12
> > 2019-04-16 20:38:00 30530 13
> > 2019-04-16 20:39:00 30531 14
> >
> > Column 1 & 2 (space separated) considered as date/time.
> >
> > Plotting Col. 3 or 4 against date/time works fine:
> >
> > set xdata time
> > set timefmt "%Y-%m-%d\t%H:%M:%S"
> > set format x "%d.%m. %H:%M"
> > plot 'my_file.txt' using 1:3 title "col 3" axis x1y1
> > with linespoints pt7 lc 4, '' using 1:4 title "col 4" axis
> > x1y1 with linespoints pt7 lc 7
> >
> > Special feature: Although columns 1 and 2 *together* give
> > the timestamp, only "1:..." is given for "using" statement.
> > This method is often found in examples.
> >
> > But now I would like - don't ask me why - to plot the
> > timestamp against column 3, i.e. column 3 as "x" and the
> > timestamp (columns 1 & 2) as "y".
> >
> > I was trying:
> >
> > set ydata time "%Y-%m-%d\t%H:%M:%S"
> > set timefmt "%Y-%m-%d\t%H:%M:%S"
> > set format y "%d.%m. %H:%M"
> > plot 'my_file.txt' using 3:1 title "col 3" axis x1y1 with
> > linespoints pt7 lc 4
> >
> > Result: only date is used for plotting "y", time ignored!
>
> Replace the tab with a space in timefmt:
>
> set timefmt "%Y-%m-%d %H:%M:%S"
>
> The space character in the format will match any whitespace
> sequence, including <tab>.
>
> Ethan
>
>
>
>
>
>
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via:
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
-----BEGIN PGP SIGNATURE-----
iF0EARECAB0WIQQxRId2q5JPHFiozTr5X9dS0HpoEAUCXp3/QwAKCRD5X9dS0Hpo
EAx0AJ464SqTe0oieSwe8My/Yc6XCKHS7ACg2wPr2cEnr89Hg1SLbwB+LfpUVUE=
=czcZ
-----END PGP SIGNATURE-----
|
|
From: Ethan M. <eam...@gm...> - 2020-04-20 19:00:54
|
On Monday, 20 April 2020 11:30:03 PDT co...@tr... wrote:
>
> Hello All,
>
> I need help with the following problem:
>
> Let's say my input data look like (columns delimited by \t):
>
> 2019-04-16 20:30:00 30522 5
> 2019-04-16 20:31:00 30523 6
> 2019-04-16 20:32:00 30524 7
> 2019-04-16 20:33:00 30525 8
> 2019-04-16 20:34:00 30526 9
> 2019-04-16 20:35:00 30527 10
> 2019-04-16 20:36:00 30528 11
> 2019-04-16 20:37:00 30529 12
> 2019-04-16 20:38:00 30530 13
> 2019-04-16 20:39:00 30531 14
>
> Column 1 & 2 (space separated) considered as date/time.
>
> Plotting Col. 3 or 4 against date/time works fine:
>
> set xdata time
> set timefmt "%Y-%m-%d\t%H:%M:%S"
> set format x "%d.%m. %H:%M"
> plot 'my_file.txt' using 1:3 title "col 3" axis x1y1 with linespoints
> pt7 lc 4, '' using 1:4 title "col 4" axis x1y1 with linespoints
> pt7 lc 7
>
> Special feature: Although columns 1 and 2 *together* give the timestamp,
> only "1:..." is given for "using" statement. This method is often found
> in examples.
>
> But now I would like - don't ask me why - to plot the timestamp against
> column 3, i.e. column 3 as "x" and the timestamp (columns 1 & 2) as "y".
>
> I was trying:
>
> set ydata time "%Y-%m-%d\t%H:%M:%S"
> set timefmt "%Y-%m-%d\t%H:%M:%S"
> set format y "%d.%m. %H:%M"
> plot 'my_file.txt' using 3:1 title "col 3" axis x1y1 with
> linespoints pt7 lc 4
>
> Result: only date is used for plotting "y", time ignored!
Replace the tab with a space in timefmt:
set timefmt "%Y-%m-%d %H:%M:%S"
The space character in the format will match any whitespace sequence,
including <tab>.
Ethan
|
|
From: <co...@tr...> - 2020-04-20 18:43:27
|
Hello All,
I need help with the following problem:
Let's say my input data look like (columns delimited by \t):
2019-04-16 20:30:00 30522 5
2019-04-16 20:31:00 30523 6
2019-04-16 20:32:00 30524 7
2019-04-16 20:33:00 30525 8
2019-04-16 20:34:00 30526 9
2019-04-16 20:35:00 30527 10
2019-04-16 20:36:00 30528 11
2019-04-16 20:37:00 30529 12
2019-04-16 20:38:00 30530 13
2019-04-16 20:39:00 30531 14
Column 1 & 2 (space separated) considered as date/time.
Plotting Col. 3 or 4 against date/time works fine:
set xdata time
set timefmt "%Y-%m-%d\t%H:%M:%S"
set format x "%d.%m. %H:%M"
plot 'my_file.txt' using 1:3 title "col 3" axis x1y1 with linespoints
pt7 lc 4, '' using 1:4 title "col 4" axis x1y1 with linespoints
pt7 lc 7
Special feature: Although columns 1 and 2 *together* give the timestamp,
only "1:..." is given for "using" statement. This method is often found
in examples.
But now I would like - don't ask me why - to plot the timestamp against
column 3, i.e. column 3 as "x" and the timestamp (columns 1 & 2) as "y".
I was trying:
set ydata time
set timefmt "%Y-%m-%d\t%H:%M:%S"
set format y "%d.%m. %H:%M"
plot 'my_file.txt' using 3:1 title "col 3" axis x1y1 with
linespoints pt7 lc 4
Result: only date is used for plotting "y", time ignored!
Another trial:
plot 'my_file.txt' using 3:($1+$2) title "col 3" axis x1y1 with
linespoints pt7 lc 4
That didn't work either: this time the time was used for the plot as
"y", but the date was set to 1.1. and the true date from column 1 was
ignored.
What am I doing wrong? Unfortunately, you won't find an example of a
timestamp consisting of two columns as a "y" value anywhere. Admittedly,
this is rarely of use.
Thanks!
Best,
Thomas
|
|
From: Ethan M. <eam...@gm...> - 2020-04-20 16:39:10
|
On Monday, 20 April 2020 02:05:19 PDT Georg-Johann Lay wrote: > Hi, I am new in Gnuplot and am still struggling with it... > > Usually I am running it as a script from the command line like > > > gnuplot -persist x.gplot > > However, the persist option is not working properly, for example with > the following x.gplot: > > plot [0:1] atan(x) > plot [0:1] cos(x) > quit > > What I want: > > Show plot #1 until I close that window, then > Show plot #2 until I close that window, then > Quit after the last window is closed. plot [0:1] atan(x) pause mouse close plot [0:1] cos(x) pause mouse close The "persist" option is not what you want here, although it doesn't hurt. Ethan > However, what happens is: > > 1) The 1st plot is shown but immediately closed after a fraction of a > second. > > 2) The 2nd plot is shown persistently as desired. > > 3) After closing that window, Gnuplot does NOT quit, i.e. ignores the > final "quit" command. > > I am sure this question must have been asked 100 times before, but > neither the manual nor the FAQ are addressing this. > > Gnuplot version is v4.4.4 > > Thanks, > > Johann > > > > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info > |
|
From: Georg-Johann L. <av...@gj...> - 2020-04-20 09:16:43
|
Hi, I am new in Gnuplot and am still struggling with it... Usually I am running it as a script from the command line like > gnuplot -persist x.gplot However, the persist option is not working properly, for example with the following x.gplot: plot [0:1] atan(x) plot [0:1] cos(x) quit What I want: Show plot #1 until I close that window, then Show plot #2 until I close that window, then Quit after the last window is closed. However, what happens is: 1) The 1st plot is shown but immediately closed after a fraction of a second. 2) The 2nd plot is shown persistently as desired. 3) After closing that window, Gnuplot does NOT quit, i.e. ignores the final "quit" command. I am sure this question must have been asked 100 times before, but neither the manual nor the FAQ are addressing this. Gnuplot version is v4.4.4 Thanks, Johann |
|
From: daniloassis <dan...@ut...> - 2020-04-08 16:12:05
|
Hi I would like to know if it is possible to create 3D graphics but using boxes as in the example gallery of version 5.5. Is there a patch for version 5.2? I needed these graphics urgently Something like this:http://www.gnuplot.info/demo_5.3/3dboxes.html -- Danilo Renato de Assis Departamento de Infra-Estrutura e Serviços - Bloco H Técnico em Tecnologia da Informação. UTFPR - Reitoria (41) 3310-4826 |
|
From: Sergei N. <vo...@ra...> - 2020-04-04 10:10:31
|
В письме от пятница, 3 апреля 2020 г. 22:35:31 MSK пользователь Hans-Bernhard Bröker написал: > That would not improve anything because that's exactly what the existing > code already does behind the scenes (except that it works in seconds,not > hours). The actual syntax for that is either (old-style) True. And according to https://sourceforge.net/p/gnuplot/bugs/2245/ this particular bug for a timecolumn is fixed already. However, when I was writing about a formatted reading I meant something of a more general nature when ANY column could be read through a format, not necessarily a time column. This of course raises a somewhat philosophical question on whether this should be done in Gnuplot and not through a standard awk/sed/whatever machinery... Thanks, Sergei |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2020-04-03 19:35:46
|
Am 02.04.2020 um 20:31 schrieb Sergei Naumov via gnuplot-info: > Well, this whole mess comes from the fact that gnuplot, it seems, can not read > A COLUMN in an arbitrary formatted way. No, that's not what this comes from. > But it would be cool to make a formatted reading available: > > set xdata format "%tH:%tM:%tS" > set ydata format "%tH:%tM:%tS" > plot 'datafile' using ($1.1+$1.2/60+$1.3/3600):($2.1+$2.2/60+$2.3/3600) That would not improve anything because that's exactly what the existing code already does behind the scenes (except that it works in seconds,not hours). The actual syntax for that is either (old-style) set xdata time set ydata time set timefmt'%tH:%tM:%tS' plot 'datafile' using 1:2 or (new-style) plot 'datafile' using (timecolumn(1,"%tH:%tM:%tS")):(timecolumn(2,"%tH:%tM:%tS")) So spelling it out in user-land instead of letting the internal machinery handle it will not yield any different result. |
|
From: theozh <th...@gm...> - 2020-04-03 16:25:46
|
a suggestion for a possible workaround (still to be optimized for all possible cases):
### handling negative times
$Data <<EOD
1 00:01:00
2 -00:01:00
EOD
myTimeFmt = "%tH:%tM:%tS"
myTimeSigned(fmt,s) = s[1:1] eq '-' && strptime("%tH",s)==0 && strptime(fmt,s)>0 ? \
-strptime(fmt,s[2:]) : strptime(fmt,s)
myTime(n,fmt) = myTimeSigned(fmt,strcol(n))
set table $Test
plot $Data u 1:(myTime(2,myTimeFmt)) w table
unset table
print $Test
### end of code
Result:
1 60
2 -60
see more details: https://stackoverflow.com/a/61005915/7295599
Theo.
|