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
(4) |
| 2026 |
Jan
|
Feb
(24) |
Mar
(20) |
Apr
(14) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Eduardo L. de Sa <ed...@uf...> - 2021-03-24 23:59:37
|
Dear Eliezer Sorry by top-posting (I couldn´t fix this in my Microsoft email provider). So, I think that certainly, you are a member now because you could send a question to the list. My suggestion is that you retry to send your original email (where your problem is described in detail) because there are very kind people offering support. My best wishes Eduardo Eduardo Lemos de Sá Professor Titular Departamento de Química (http://www.quimica.ufpr.br/paginas/edulsa) Universidade Federal do Paraná R. Cel Francisco H. dos Santos, s/n Centro Politécnico - Cx. Postal 19032 Jardim das Américas - CEP: 81531-980-Curitiba - PR -Brasil fone: +55(41)3361-3300 fax: +55(41)3361-3186 ________________________________________ From: Eliezer Richmond <eli...@gm...> Sent: Wednesday, March 24, 2021 8:02 PM To: Eduardo Lemos de Sa Subject: RE: [Gnuplot-info] How do I become a member of gnuplot Eduardo, I sent a detailed question to the email address, gnu...@li..., regarding a problem that I am having installing gnuplot-5.4.1. The response was that only members could address questions to this email address. Consequently, I wanted to investigate how to become a member. Your response, therefore, has me in a quandary. Does gnuplot have a resource for getting problems with gnuplot answered? Yours truly, Eliezer -----Original Message----- From: Eduardo Lemos de Sa <ed...@uf...> Sent: Wednesday, March 24, 2021 6:23 PM To: Eliezer Richmond <eli...@gm...> Subject: Re: [Gnuplot-info] How do I become a member of gnuplot Dear Eliezer Sorry, but what are you meaning about "become a member"? If you are referring to gnuplot users list, I think that you got it: you were able to send an email for. My best wishes Eduardo Eduardo Lemos de Sá Professor Titular Departamento de Química (http://www.quimica.ufpr.br/paginas/edulsa) Universidade Federal do Paraná R. Cel Francisco H. dos Santos, s/n Centro Politécnico - Cx. Postal 19032 Jardim das Américas - CEP: 81531-980-Curitiba - PR -Brasil fone: +55(41)3361-3300 fax: +55(41)3361-3186 ________________________________________ From: Eliezer Richmond <eli...@gm...> Sent: Wednesday, March 24, 2021 5:57 PM To: gnu...@li... Subject: [Gnuplot-info] How do I become a member of gnuplot How do I become a member of gnuplot? Eliezer Richmond _______________________________________________ gnuplot-info mailing list gnu...@li... Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: Eliezer R. <eli...@gm...> - 2021-03-24 20:57:43
|
How do I become a member of gnuplot? Eliezer Richmond |
|
From: Ethan M. <eam...@gm...> - 2021-03-17 16:48:58
|
On Tuesday, 16 March 2021 06:34:49 PDT Roderick Stewart wrote:
> Ethan,
>
> We have a number of active volcanoes here, and some potentially-active. Keeps us busy. We actually work with the USGS, who are based in Vancouver, Washington.
Oh well, "potentially active" is another story.
We have Mt Rainier, and Mt St Helens, and I suppose Mt Hood for that matter.
I was at school back East when St Helens last blew, but I have seen
a small jokulhaups at Rainier.
> Can I ask one more gnuplot favour?
>
> The attached plot is what I am doing using the attached script.
>
> The top two plots are histograms of data that ends today.
>
> The bottom plot is the time series data for the whole year that you helped me with.
>
> I want to make the time-series plot end at the same time as the middle histogram plot, ie xrange should finish at the end of today.
today = strftime("%d-%b-%Y", time(0))
almost_midnight = " 23:59"
t_max = strptime("%d-%b-%Y %H:%M", today.almost_midnight)
set xrange [t_min : t_max]
cheers,
Ethan
>
> How do I do that?
>
> Rod
>
>
>
>
> --
> Roderick Stewart
> Research Fellow (Volcano-Seismology), Montserrat Volcano Observatory
> www.mvo.ms <http://www.mvo.ms/>
> email: ro...@mv... <mailto:ro...@mv...>, rod...@gm... <mailto:rod...@gm...>, rst...@my... <mailto:rst...@my...>
>
> phone: (+1-664) 491-5647
> fax: (+1-664) 491-2423
> direct line: (+1-664) 491-5726
> mobile: (+1-664) 495-0743
> home: (+1-664) 491-3139
> roaming: +44 7452 023889
> trinidad: +1 (868) 780-4296
>
>
>
>
>
>
>
> > On 17 Mar 2021, at 03:06, Ethan Merritt <eam...@gm...> wrote:
> >
> > On Tuesday, 16 March 2021 06:43:08 PDT Roderick Stewart wrote:
> >> Ethan,
> >>
> >> This is fantastic and has saved me a lot of time.
> >>
> >> I’m currently in St Vincent trying to set up a real-time volcano monitoring system
> >
> > Lucky you!
> > I'm stuck here in cold and rainy Seattle, still in Covid lock-down so no travel escape.
> >
> >> on Windows, and I have very little experience in Windows.
> >>
> >> I would like to offer you a Montserrat Volcano Observatory T-shirt in thanks for your help.
> >
> > You are very kind, and I appreciate your offer.
> > But my T-shirt draw is totally overflowing, mostly due to 30 years of support
> > for the Northwest Folklife Festival, so I won't impose on your kindness.
> >
> > I have to admit that before this I did not know there was an active volcano
> > in the Caribbean.
> >
> > best regards,
> >
> > Ethan
> >
> >
> >
> >> Just give me your size, an approximate colour you want, and an address that a courier can deliver to. I can send it next week when I get back, but have no idea how long it takes to deliver in these Covid times.
> >>
> >>
> >> Rod
> >>
> >>
> >>
> >>
> >> --
> >> Roderick Stewart
> >> Research Fellow (Volcano-Seismology), Montserrat Volcano Observatory
> >> www.mvo.ms <http://www.mvo.ms/>
> >> email: ro...@mv... <mailto:ro...@mv...>, rod...@gm... <mailto:rod...@gm...>, rst...@my... <mailto:rst...@my...>
> >>
> >> phone: (+1-664) 491-5647
> >> fax: (+1-664) 491-2423
> >> direct line: (+1-664) 491-5726
> >> mobile: (+1-664) 495-0743
> >> home: (+1-664) 491-3139
> >> roaming: +44 7452 023889
> >> trinidad: +1 (868) 780-4296
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>> On 15 Mar 2021, at 18:10, Ethan Merritt <eam...@gm...> wrote:
> >>>
> >>> On Monday, 15 March 2021 13:20:14 PDT Roderick Stewart wrote:
> >>>> I’m new to gnuplot (love it!) but can’t work out how to plot time series data from a file when the file contains no time information, just equally-spaced data values.
> >>>>
> >>>> I have a binary file which has one year’s worth of data at 1-minute intervals.
> >>>>
> >>>> I can plot it using:
> >>>>
> >>>> plot ‘2021.dat’ binary format=“%int32” using 0:1
> >>>>
> >>>> But I want the X axis to be a date axis so I can, for example, set xrange.
> >>>>
> >>>> How do I get the timestamps into the plot?
> >>>
> >>> The units of time in gnuplot are seconds.
> >>> A date corresponds to the number of seconds elapsed since the start of the
> >>> epoch (1 Jan 1970).
> >>>
> >>> Each record in your data adds 60 seconds to the date.
> >>> So the task is
> >>> 1) Determine the canonical date (number of seconds since 1970) of the start time.
> >>> 2) Add 60 seconds for each data point
> >>>
> >>> Suppose your data starts with the first minute of 2021.
> >>>
> >>> timefmt = "%d-%b-%Y"
> >>> time0 = strptime( timefmt, "01-Jan-2021" )
> >>>
> >>> # the xrange and tic placement will use the timefmt we just set
> >>> set xdata time
> >>> set xrange [time0 : *]
> >>> set xtics ("01-Jan-2021", "01-Feb-2021", "01-Mar-2021")
> >>>
> >>> # the actual tic labels will only use the month name
> >>> set xtics format "%b" # Only the month names
> >>>
> >>> plot '2021.dat' binary format=%int32" using (time0 + $0 * 60.) : 1 with lines
> >>>
> >>>
> >>> Ethan
> >>>
> >>>
> >>>>
> >>>> Thanks in advance.
> >>>> Roderick Stewart
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> >
> >
>
>
|
|
From: Roderick S. <rod...@gm...> - 2021-03-16 13:35:03
|
thanks to all for your help. Ethan’s suggestion works great. Rod -- Roderick Stewart Research Fellow (Volcano-Seismology), Montserrat Volcano Observatory www.mvo.ms <http://www.mvo.ms/> email: ro...@mv... <mailto:ro...@mv...>, rod...@gm... <mailto:rod...@gm...>, rst...@my... <mailto:rst...@my...> phone: (+1-664) 491-5647 fax: (+1-664) 491-2423 direct line: (+1-664) 491-5726 mobile: (+1-664) 495-0743 home: (+1-664) 491-3139 roaming: +44 7452 023889 trinidad: +1 (868) 780-4296 > On 15 Mar 2021, at 18:10, Ethan Merritt <eam...@gm...> wrote: > > On Monday, 15 March 2021 13:20:14 PDT Roderick Stewart wrote: >> I’m new to gnuplot (love it!) but can’t work out how to plot time series data from a file when the file contains no time information, just equally-spaced data values. >> >> I have a binary file which has one year’s worth of data at 1-minute intervals. >> >> I can plot it using: >> >> plot ‘2021.dat’ binary format=“%int32” using 0:1 >> >> But I want the X axis to be a date axis so I can, for example, set xrange. >> >> How do I get the timestamps into the plot? > > The units of time in gnuplot are seconds. > A date corresponds to the number of seconds elapsed since the start of the > epoch (1 Jan 1970). > > Each record in your data adds 60 seconds to the date. > So the task is > 1) Determine the canonical date (number of seconds since 1970) of the start time. > 2) Add 60 seconds for each data point > > Suppose your data starts with the first minute of 2021. > > timefmt = "%d-%b-%Y" > time0 = strptime( timefmt, "01-Jan-2021" ) > > # the xrange and tic placement will use the timefmt we just set > set xdata time > set xrange [time0 : *] > set xtics ("01-Jan-2021", "01-Feb-2021", "01-Mar-2021") > > # the actual tic labels will only use the month name > set xtics format "%b" # Only the month names > > plot '2021.dat' binary format=%int32" using (time0 + $0 * 60.) : 1 with lines > > > Ethan > > >> >> Thanks in advance. >> Roderick Stewart > > > |
|
From: Ethan M. <eam...@gm...> - 2021-03-15 23:45:08
|
On Monday, 15 March 2021 15:14:39 PDT Craig DeForest wrote:
> Careful with long intervals and seconds-counting. UNIX time, somewhat notoriously, is a transfer standard only! It follows UTC but ignores leap seconds, so after every leap second times in the past shift by one second. So the current UNIX epoch occurred on 1970-01-01 12:00:27 UTC, and in another couple of years it will have occurred later.
Not relevant here.
The only time information in the data is "number of minutes since start of series",
which comes from the line number.
The calendar/clock time at the start of the series comes from external knowledge.
Ethan
>
> > On Mar 15, 2021, at 4:10 PM, Ethan Merritt <eam...@gm...> wrote:
> >
> > On Monday, 15 March 2021 13:20:14 PDT Roderick Stewart wrote:
> >> I’m new to gnuplot (love it!) but can’t work out how to plot time series data from a file when the file contains no time information, just equally-spaced data values.
> >>
> >> I have a binary file which has one year’s worth of data at 1-minute intervals.
> >>
> >> I can plot it using:
> >>
> >> plot ‘2021.dat’ binary format=“%int32” using 0:1
> >>
> >> But I want the X axis to be a date axis so I can, for example, set xrange.
> >>
> >> How do I get the timestamps into the plot?
> >
> > The units of time in gnuplot are seconds.
> > A date corresponds to the number of seconds elapsed since the start of the
> > epoch (1 Jan 1970).
> >
> > Each record in your data adds 60 seconds to the date.
> > So the task is
> > 1) Determine the canonical date (number of seconds since 1970) of the start time.
> > 2) Add 60 seconds for each data point
> >
> > Suppose your data starts with the first minute of 2021.
> >
> > timefmt = "%d-%b-%Y"
> > time0 = strptime( timefmt, "01-Jan-2021" )
> >
> > # the xrange and tic placement will use the timefmt we just set
> > set xdata time
> > set xrange [time0 : *]
> > set xtics ("01-Jan-2021", "01-Feb-2021", "01-Mar-2021")
> >
> > # the actual tic labels will only use the month name
> > set xtics format "%b" # Only the month names
> >
> > plot '2021.dat' binary format=%int32" using (time0 + $0 * 60.) : 1 with lines
> >
> >
> > Ethan
> >
> >
> >>
> >> Thanks in advance.
> >> Roderick Stewart
> >
> >
> >
> >
> >
> > _______________________________________________
> > gnuplot-info mailing list
> > gnu...@li...
> > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
> >
>
>
|
|
From: Craig D. <def...@bo...> - 2021-03-15 22:14:56
|
Careful with long intervals and seconds-counting. UNIX time, somewhat notoriously, is a transfer standard only! It follows UTC but ignores leap seconds, so after every leap second times in the past shift by one second. So the current UNIX epoch occurred on 1970-01-01 12:00:27 UTC, and in another couple of years it will have occurred later.
> On Mar 15, 2021, at 4:10 PM, Ethan Merritt <eam...@gm...> wrote:
>
> On Monday, 15 March 2021 13:20:14 PDT Roderick Stewart wrote:
>> I’m new to gnuplot (love it!) but can’t work out how to plot time series data from a file when the file contains no time information, just equally-spaced data values.
>>
>> I have a binary file which has one year’s worth of data at 1-minute intervals.
>>
>> I can plot it using:
>>
>> plot ‘2021.dat’ binary format=“%int32” using 0:1
>>
>> But I want the X axis to be a date axis so I can, for example, set xrange.
>>
>> How do I get the timestamps into the plot?
>
> The units of time in gnuplot are seconds.
> A date corresponds to the number of seconds elapsed since the start of the
> epoch (1 Jan 1970).
>
> Each record in your data adds 60 seconds to the date.
> So the task is
> 1) Determine the canonical date (number of seconds since 1970) of the start time.
> 2) Add 60 seconds for each data point
>
> Suppose your data starts with the first minute of 2021.
>
> timefmt = "%d-%b-%Y"
> time0 = strptime( timefmt, "01-Jan-2021" )
>
> # the xrange and tic placement will use the timefmt we just set
> set xdata time
> set xrange [time0 : *]
> set xtics ("01-Jan-2021", "01-Feb-2021", "01-Mar-2021")
>
> # the actual tic labels will only use the month name
> set xtics format "%b" # Only the month names
>
> plot '2021.dat' binary format=%int32" using (time0 + $0 * 60.) : 1 with lines
>
>
> Ethan
>
>
>>
>> Thanks in advance.
>> Roderick Stewart
>
>
>
>
>
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
|
|
From: Ethan M. <eam...@gm...> - 2021-03-15 22:10:23
|
On Monday, 15 March 2021 13:20:14 PDT Roderick Stewart wrote:
> I’m new to gnuplot (love it!) but can’t work out how to plot time series data from a file when the file contains no time information, just equally-spaced data values.
>
> I have a binary file which has one year’s worth of data at 1-minute intervals.
>
> I can plot it using:
>
> plot ‘2021.dat’ binary format=“%int32” using 0:1
>
> But I want the X axis to be a date axis so I can, for example, set xrange.
>
> How do I get the timestamps into the plot?
The units of time in gnuplot are seconds.
A date corresponds to the number of seconds elapsed since the start of the
epoch (1 Jan 1970).
Each record in your data adds 60 seconds to the date.
So the task is
1) Determine the canonical date (number of seconds since 1970) of the start time.
2) Add 60 seconds for each data point
Suppose your data starts with the first minute of 2021.
timefmt = "%d-%b-%Y"
time0 = strptime( timefmt, "01-Jan-2021" )
# the xrange and tic placement will use the timefmt we just set
set xdata time
set xrange [time0 : *]
set xtics ("01-Jan-2021", "01-Feb-2021", "01-Mar-2021")
# the actual tic labels will only use the month name
set xtics format "%b" # Only the month names
plot '2021.dat' binary format=%int32" using (time0 + $0 * 60.) : 1 with lines
Ethan
>
> Thanks in advance.
> Roderick Stewart
|
|
From: Roderick S. <rod...@gm...> - 2021-03-15 20:20:35
|
I’m new to gnuplot (love it!) but can’t work out how to plot time series data from a file when the file contains no time information, just equally-spaced data values. I have a binary file which has one year’s worth of data at 1-minute intervals. I can plot it using: plot ‘2021.dat’ binary format=“%int32” using 0:1 But I want the X axis to be a date axis so I can, for example, set xrange. How do I get the timestamps into the plot? Thanks in advance. -- Roderick Stewart Research Fellow (Volcano-Seismology), Montserrat Volcano Observatory www.mvo.ms <http://www.mvo.ms/> email: ro...@mv... <mailto:ro...@mv...>, rod...@gm... <mailto:rod...@gm...>, rst...@my... <mailto:rst...@my...> phone: (+1-664) 491-5647 fax: (+1-664) 491-2423 direct line: (+1-664) 491-5726 mobile: (+1-664) 495-0743 home: (+1-664) 491-3139 roaming: +44 7452 023889 trinidad: +1 (868) 780-4296 |
|
From: Alan C. <ala...@gm...> - 2021-03-12 12:34:49
|
Absolutely, I've never used the GUI. I had used some scientific
plotting packages in the 1980s and Gnuplot reminds me a little of
those. Full docs on their web site, there's even a PDF which is
searchable.
I use rxvt as a terminal and Joe as an editor, just to show that you
can use about anything. You learn to make little files like this.
You call them like gnuplot somefile and the output goes into the file
you specify inside it.
I'm not happy with this multiplot layout but it's an example here.
----
# blood pressure plotting format for manually recorded (on paper) points
# this (bpp) does pulse via multiplot too
# columns are date, time, systolic, diastolic, pulse
reset
set xdata time
set terminal gif giant size 1024,768
set output "bpp_1024.gif"
set multiplot layout 2,1
# This is the format in the input file, not the output:
set timefmt "%m/%d/%Y\t%H:%M"
set style data linespoints
set xtics auto
set xrange ['11/1/2020':]
plot '2020.tab' using 1:3 lt -1 title 'Systolic', \
'2020.tab' using 1:4 lt -1 title 'Diastolic'
plot '2020.tab' using 1:5 lt -1 title 'Pulse'
On 3/12/21, Aleksey Tsalolikhin <ats...@gm...> wrote:
> Hi Eduardo,
>
> Gnuplot is a command-line utility. See http://www.gnuplot.info/ which
> starts with, "Gnuplot is a portable command-line driven graphing utility".
>
> Are you using it on the command-line? I've only ever used it on UNIX and
> Linux systems...
>
> I use the "pngcairo" terminal, as per
> https://stackoverflow.com/questions/9080832/output-png-from-gnuplot-is-not-as-good-as-the-figure-from-prompt-shell
>
> Hope this helps!
>
> Best,
> Aleksey
>
> On Mon, Nov 30, 2020 at 12:51 AM edulsa <ed...@qu...> wrote:
>
>> Dear
>>
>> I have used Gnuplot (win and BSD versions) in my Physical Chemistry
>> classes since January. I have learned a lot about it and I got
>> encouraged my students to use this beautiful free program.
>> However, I have a problem with my interface that I couldn´t solve even
>> reading tutorials and manuals: I start a document, inserting constants,
>> writing functions and plotting graphs without problems. I save the
>> document (.plt document type) and close Gnuplot. But, when I reopened
>> the same document (loading in a clean start), only the last plot save is
>> showed. I would like to reopen the document to show to my students line
>> by line, how to insert constants, define functions and not get only the
>> last graph. Of course, I always can edit it using vim or another editor
>> but I think that it should be a more cleaver way to do this directly in
>> Gnuplot plot.
>>
>> My terminal is wxt. Is this caused by the terminal type that I choose?
>> Please, could you give suggestions?
>>
>> I wish to thank you in advance for your attention
>>
>> My best regards
>>
>> Eduardo
>>
>> --
>> Eduardo Lemos de Sa
>> Professor Titular
>> Dep. Quimica da Universidade Federal do Paraná
>> fone: +55(41)3361-3300
>> fax: +55(41)3361-3186
>> Voip Number 10531185
>>
>>
>> _______________________________________________
>> gnuplot-info mailing list
>> gnu...@li...
>> Membership management via:
>> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>>
>
>
> --
> Achieve real learning. Email tra...@ve....
>
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via:
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
--
-------------
Education is contagious.
|
|
From: Aleksey T. <ats...@gm...> - 2021-03-12 11:00:51
|
Hi Eduardo, Gnuplot is a command-line utility. See http://www.gnuplot.info/ which starts with, "Gnuplot is a portable command-line driven graphing utility". Are you using it on the command-line? I've only ever used it on UNIX and Linux systems... I use the "pngcairo" terminal, as per https://stackoverflow.com/questions/9080832/output-png-from-gnuplot-is-not-as-good-as-the-figure-from-prompt-shell Hope this helps! Best, Aleksey On Mon, Nov 30, 2020 at 12:51 AM edulsa <ed...@qu...> wrote: > Dear > > I have used Gnuplot (win and BSD versions) in my Physical Chemistry > classes since January. I have learned a lot about it and I got > encouraged my students to use this beautiful free program. > However, I have a problem with my interface that I couldn´t solve even > reading tutorials and manuals: I start a document, inserting constants, > writing functions and plotting graphs without problems. I save the > document (.plt document type) and close Gnuplot. But, when I reopened > the same document (loading in a clean start), only the last plot save is > showed. I would like to reopen the document to show to my students line > by line, how to insert constants, define functions and not get only the > last graph. Of course, I always can edit it using vim or another editor > but I think that it should be a more cleaver way to do this directly in > Gnuplot plot. > > My terminal is wxt. Is this caused by the terminal type that I choose? > Please, could you give suggestions? > > I wish to thank you in advance for your attention > > My best regards > > Eduardo > > -- > Eduardo Lemos de Sa > Professor Titular > Dep. Quimica da Universidade Federal do Paraná > fone: +55(41)3361-3300 > fax: +55(41)3361-3186 > Voip Number 10531185 > > > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > -- Achieve real learning. Email tra...@ve.... |
|
From: Norwid B. <nb...@ya...> - 2021-02-26 14:16:04
|
Sorry, I thought the question was answered because NASA does document CDF and offers tools around this format. Subsequent communication with the OP indeed pointed to NASA, e.g. to map magnetic data. For example, at the MMS Science Data Center https://lasp.colorado.edu/mms/sdc/public/about/how-to/ the second of the three examples "Download a single science file" mentions this format with https://lasp.colorado.edu/mms/sdc/public/files/api/v1/download/science?file=mms2_scm_fast_l1a_scf_20150410_v3.2.0.cdf A random walk along the tree-like structure of the database conveys the perception these data are the result of an established protocol to process recorded data; e.g. https://lasp.colorado.edu/mms/sdc/public/data/mms1/epd-eis/srvy/l2/electronenergy/2020/12/ Since then, I did not follow up this thread because I assumed the OP was able to established a contact with NASA to either a) obtain the data in a format suitable for him (maybe as low level as .csv), possibly just by the addition of a few lines of code in the processing protocol by NASA. Or b), potentially for the benefit of Gnuplot .or. Gnuplot users, identify programmatic access to the content of the files (e.g., modern Fortran, Julia; Python). vim reveals some of the file's content is clear text (space mission, instruments), including this piece of information ---- 8>< ---- begin snippet Common Data Format (CDF) (C) Copyright 1990-2016 NASA/GSFC Space Physics Data Facility NASA/Goddard Space Flight Center Greenbelt, Maryland 20771 USA (Internet -- GSF...@LI...) --- 8>< ---- end snippet which indeed (eventually) leads to the file's documentation and APIs offered by NASA at https://cdf.gsfc.nasa.gov/html/cdf_docs.html |
|
From: Dan H. <dan...@ph...> - 2021-02-26 13:03:11
|
On Wed, 17 Feb 2021, Norwid Behrnd via gnuplot-info wrote: > If your refer to CDF format is about "Computable Document Format" by > Wolfram Research, chances gnuplot will adopt this as an output format > will be low. According to Wikipedia's entry, it is not an open > format (contrast to, e.g., .pdf or .png): On the other hand, OP might mean NASA's Common Data Format (or one of its descendants like NetCDF). If so, I'm mildly interested in the answer. |
|
From: Grant E. <gra...@gm...> - 2021-02-25 18:50:15
|
I have a graph were I do
set offset graph 0.1, graph 0.1, graph 0.1, graph 0.1;
and then plot two columns of a file: one x1y1, one x1y2. The offset
doesn't seem to be applied to the y2 axis. How do I set offset for the
secondary y axis? The manual implies this is not possible:
Offsets
Offsets provide a mechanism to put an empty boundary around the
data inside an autoscaled graph. The offsets only affect the x1
and y1 axes, and only in 2D plot commands.
Is there really no way to set offsets for secondary axes?
|
|
From: Juanjo M. <mel...@un...> - 2021-02-22 12:03:16
|
Hi all I am running gnuplot (5.0 patchlevel 1) on MacOS with Catalina. In other machines, gnuplot displays coordinates at the bottom-left corner as the mouses moves, but I cannot get the same on my Mac. I tried with the “format” and “mouseformat” options, but I did not succeed so far. Apart from that, gnuplot seems to be correctly installed. Could you help me, please? Thanks in advance Juan J. Meléndez Martínez Departamento de Física Universidad de Extremadura Avda. de Elvas, s/n 06006 Badajoz Teléfono: 924 28 96 55 Fax: 924 28 96 51 Email: mel...@un... <mailto:mel...@un...> Web: materiales.unex.es/miembros/personal/jj-melendez/Index.html |
|
From: Norwid B. <nb...@ya...> - 2021-02-17 11:56:06
|
If your refer to CDF format is about "Computable Document Format" by Wolfram Research, chances gnuplot will adopt this as an output format will be low. According to Wikipedia's entry, it is not an open format (contrast to, e.g., .pdf or .png): https://en.wikipedia.org/wiki/Computable_Document_Format If you refer to an other format than the one mentioned above, you are welcome to add additional details pointing to a typical creator program known to you, public standards about this format, etc. This eases recognition of the file type, and maybe triggers its implementation as permanent record written by future versions of Gnuplot. |
|
From: Mohammed B. <moh...@gm...> - 2021-02-17 11:28:39
|
Hello Sir/Madam I am a master student using gnuplot for plotting my data in txt format. How can i plot data in CDF format ? |
|
From: Dave H. <da...@ho...> - 2021-02-03 02:05:23
|
On Tue, 2 Feb 2021, Ethan Merritt wrote: > I do not understand how the script could ever have worked correctly > without either "set link y2" or "set y2range [min:max]". Well, stuffed if I know how it managed to work since 2013 when I first wrote it (with minor tweaks); I think we can safely file this under "H" for "Heisenbug" :-) Explicitly setting "y2range [0:160]" (the same as "yrange" because it happened to be the same scale) fixed it; there's probably a better way but I like to spell things out (I might want to change the scale(s) one day), and it may have something to do with different captions. Many thanks! I dunno how I missed that, or how it even worked at all... -- Dave |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2021-02-02 23:08:41
|
Am 02.02.2021 um 23:17 schrieb Dave Horsfall: > The error: > > gnuplot> load 'health.gp' > "health.gp" line 99: warning: y2 axis range undefined or overflow That warning message appears justified, because there's a bug in the plot script (at least the one you showed). It doesn't really make much sense to request ticks on the y2 axis, but nothing else: no data on the y2 axis itself, nor any stated relation between y1 and y2 axis, FWIW, I suspect adding set link y2 should reinstate the behaviour of older versions of gnuplot for you. OTOH, if you were actually going to use the second y axis, there should be 'axis x1y2' options on the applicable datasets (Sys, Dia). |
|
From: Dave H. <da...@ho...> - 2021-02-02 22:52:52
|
On Tue, 2 Feb 2021, Ethan Merritt wrote: >> gnuplot> load 'health.gp' >> "health.gp" line 99: warning: y2 axis range undefined or overflow > > Since your script never sets a range for y2 at all that error message is > evidently correct. > > I do not understand how the script could ever have worked correctly > without either "set link y2" or "set y2range [min:max]". That's the bit that had me confused; it had been working for ages... > Could the script have gotten borked? Not according to the modification time unless it was some weird corruption. Anyway I'll explicitly set the y2range as you suggested. Thanks. -- Dave |
|
From: Ethan M. <eam...@gm...> - 2021-02-02 22:41:40
|
On Tuesday, 2 February 2021 14:17:59 PST Dave Horsfall wrote: > Gnuplot 5.4 patchlevel 1 on MacBook Pro Sierra 10.12.6 (updated each > week). > > On 1st February (I don't know whether the date is significant) my daily > health plot suddenly lost its R/H axis. I didn't do nuffink... > > Well, there was a MacPorts update that morning, but I didn't see Gnuplot > in the list; I guess it's possible that something got borked, but just the > R/H axis? Gnuplot was last updated on 25th Jan, and worked up until now. > > As it was on 31st Jan: http://www.horsfall.org/health.pdf.old (no HTTPS > yet). > > Now: http://www.horsfall.org/health.pdf > > Well, all I did was to add an entry for 1st Feb: > > # Date Time Wgt Gth Sys Dia HR > > 30/1/21 1800 89.9 109 115 72 77 > 31/1/21 1730 88.6 109 118 72 95 > ==> 1/2/21 1830 88.6 109 115 67 82 > 2/2/21 1730 90.3 109 118 60 69 > > The error: > > gnuplot> load 'health.gp' > "health.gp" line 99: warning: y2 axis range undefined or overflow Since your script never sets a range for y2 at all that error message is evidently correct. I do not understand how the script could ever have worked correctly without either "set link y2" or "set y2range [min:max]". Could the script have gotten borked? Ethan > > Note that line 99 is actually the last continued line of the "plot" > command, which I certainly had not changed: > > mackie:health dave$ ls -l *.gp > -rw-r--r-- 1 dave staff 5511 Sep 27 2019 health.gp > > (Note that the one I attached has potentially sensitive comments removed; > it's my personal information, after all, but I'm willing to share the lot > with an individual, not the entire list.) > > It's worth noting that the plot has probably saved my life a few times, as > I suffer from hypertension (with medication)... > > The script itself is attached (I trust that it's within the guidelines). > > Thanks. > > -- Dave |
|
From: Dave H. <da...@ho...> - 2021-02-02 22:34:31
|
Gnuplot 5.4 patchlevel 1 on MacBook Pro Sierra 10.12.6 (updated each week). On 1st February (I don't know whether the date is significant) my daily health plot suddenly lost its R/H axis. I didn't do nuffink... Well, there was a MacPorts update that morning, but I didn't see Gnuplot in the list; I guess it's possible that something got borked, but just the R/H axis? Gnuplot was last updated on 25th Jan, and worked up until now. As it was on 31st Jan: http://www.horsfall.org/health.pdf.old (no HTTPS yet). Now: http://www.horsfall.org/health.pdf Well, all I did was to add an entry for 1st Feb: # Date Time Wgt Gth Sys Dia HR 30/1/21 1800 89.9 109 115 72 77 31/1/21 1730 88.6 109 118 72 95 ==> 1/2/21 1830 88.6 109 115 67 82 2/2/21 1730 90.3 109 118 60 69 The error: gnuplot> load 'health.gp' "health.gp" line 99: warning: y2 axis range undefined or overflow Note that line 99 is actually the last continued line of the "plot" command, which I certainly had not changed: mackie:health dave$ ls -l *.gp -rw-r--r-- 1 dave staff 5511 Sep 27 2019 health.gp (Note that the one I attached has potentially sensitive comments removed; it's my personal information, after all, but I'm willing to share the lot with an individual, not the entire list.) It's worth noting that the plot has probably saved my life a few times, as I suffer from hypertension (with medication)... The script itself is attached (I trust that it's within the guidelines). Thanks. -- Dave |
|
From: Marco <li...@ho...> - 2021-01-01 18:07:41
|
Hi,
I have a rather simple data file which is arranged in columns.
However, gnuplot prefers the data in rows and I don't know if
there's a way to plot the data without preprocessing (which I'd like
to avoid).
Here's the sample data:
Time;10;20;30;40;50
Mag;100;200;400;750;950
Att;120;280;550;790;350
Sol;210;820;550;970;530
It's easy to plot it if it would be laid out in rows:
set datafile separator ";"
set key autotitle columnheader
$DATA << EOD
Time;Mag;Att;Sol
10;100;120;210
20;200;280;820
30;400;550;550
40;750;790;970
50;950;350;530
EOD
plot $DATA using 1:2 w l, \
'' using 1:3 w l, \
'' using 1:4 w l
Is there a way gnuplot can handle the data file laid out in columns?
I tried using matrix but couldn't get the expected result. Any tips
appreciated.
Marco
|
|
From: <qin...@st...> - 2020-12-30 16:41:37
|
I added the command system("chmod +x myscript.sh ") in gnuplot script.
It indeed makes myscript.sh become executable.
But the variable passing (index of loop k) is still not successful. And I have another worry that $1 in awk command means the first column of data file.
The gnuplot script is
system("chmod +x myscript.sh ")
system("bash -c ./myscript.sh ".sprintf("%.1f", k))
plot for [k= 1: 20: 1] "< bash ./myscript.sh" u 1:2
the myscript.sh is
paste <(cat Q_byE_i*.txt) <(cat Q_byM_i*.txt)|awk -v vtime=$1 ' {if($1==vtime*1.0) { e[$3] += $4; m[$3] += $9}} END { for ( i in e) { print i , e[i], m[i], vtime}}' h is
For your convenience to test. I share some data file with you through the OneDrive link as follow.
https://stkyotouac-my.sharepoint.com/:u:/g/personal/qin_zhihao_87m_st_kyoto-u_ac_jp/EbyAJ0_82mlMu_4bnTYK0m4B2fl1Yw7UIPju3tOVsQq_9Q?e=VJcgTW
****************************************************
秦志豪
京都大学大学院 エネルギー科学研究科
エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
岸本研究室
E-mail : qin...@st...
****************************************************
?件人: Andrew Rasmussen<mailto:an...@gm...>
?送??: 2020年12月30日 22:51
收件人: qin...@st...<mailto:qin...@st...>
抄送: gnu...@li...<mailto:gnu...@li...>
主?: Re: 回?: 回?: 回?: [Gnuplot-info] system command in gnuplot
Without testing (I might have time later), there are two things that look like they need to be fixed:
1. in order for "./myscript.sh" not to have the 'Permission denied' error, it needs to be executable. You can do this on the command line with> chmod +x myscript.sh
2. When a bash script takes command line arguments, they have the names $1, $2, etc. So, you might have to change $k to $1.
Andy
On Wed, Dec 30, 2020 at 2:29 AM qin...@st...<mailto:qin...@st...> <qin...@st...<mailto:qin...@st...>> wrote:
Thanks for your answer.
But there are some other problems.
When I do
>system("bash -c ./myscript.sh ".sprintf("%.1f", k))
An error appears : nan: ./myscript.sh: : Permission denied
I modified the command as system("/bin/bash combine.sh ".sprintf("%.1f", k))
The script is executed. However, not only passing the variable k, the whole script is executed.
What I want is that executing the
plot for [k= 1: 20: 1] "< bash ./myscript.sh" u 1:2
the index of loop k can be paased into the script as a variable (the red parameter as follow).
The code in the script is
paste <(cat Q_byE_i*.txt) <(cat Q_byM_i*.txt)|awk -v vtime=$k ' {if($1==vtime*1.0) { e[$3] += $4; m[$3] += $9}} END { for ( i in e) { print i , e[i], m[i], vtime}}'
For your convenience to test, I send you some data files。
****************************************************
秦志豪
京都大学大学院 エネルギー科学研究科
エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
岸本研究室
E-mail : qin...@st...<mailto:qin...@st...>
****************************************************
?件人: Andrew Rasmussen<mailto:an...@gm...>
?送??: 2020年12月30日 5:32
收件人: qin...@st...<mailto:qin...@st...>
抄送: gnu...@li...<mailto:gnu...@li...>
主?: Re: 回?: 回?: [Gnuplot-info] system command in gnuplot
You can definitely pass arguments to a bash script. In the script, you use the arguments as variables $1, $2, etc. (Reference example: https://www.golinuxcloud.com/beginners-guide-to-use-script-arguments-in-bash-with-examples/).
It will take some fiddling to construct the command in gnuplot, but if the variables are var1 and var2 for example, you can do it like this:
> system("bash -c ./myscript.sh ".var1." ".var2)
The '.' concatenates the string variables. If var1 or var2 is a number like 16.0 instead of a string "16.0", you might have to do something like the below with sprintf to get it to turn into a string correctly:
> system("bash -c ./myscript.sh ".var1." ".sprintf("%.1f", var2))
Andy
On Tue, Dec 29, 2020 at 12:48 AM qin...@st...<mailto:qin...@st...> <qin...@st...<mailto:qin...@st...>> wrote:
Dear Andy
As your advice, we can reduce syntax / escape errors by put the paste / awk script in a separate file ("myscript.sh").
Then call it from inside gnuplot as plot "< bash ./myscript.sh"
But if the data file name (Q_byE_i*.txt) is a string variable and “16.0” of “if($1==16.0” in awk part is also a variable,
How can I pass these variables from gnuplot into myscript.sh.
Because I'm not very familiar with linux, my questions might be very basic or stupid.
please forgive me.
****************************************************
秦志豪
京都大学大学院 エネルギー科学研究科
エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
岸本研究室
E-mail : qin...@st...<mailto:qin...@st...>
****************************************************
?件人: Andrew Rasmussen<mailto:an...@gm...>
?送??: 2020年12月29日 1:13
收件人: qin...@st...<mailto:qin...@st...>
抄送: gnu...@li...<mailto:gnu...@li...>
主?: Re: 回?: [Gnuplot-info] system command in gnuplot
Yes, you should be able to make a similar modification, something like:
plot "< bash -c 'paste <(cat Q_byE_i*.txt) <(cat Q_byM_i*.txt)|awk \'{if($1==16.0) { e[$3] += $4 }}END { for ( i in e) { print i , e[i]}}\''"
I can't test it out, so you might have to escape some additional characters (* etc.).
When you are using a command that is this complicated, a way to simplify things and reduce syntax / escape errors is to put the paste / awk script in a separate file ("myscript.sh") and call that script from inside gnuplot:
plot "< bash ./myscript.sh"
Andy
On Mon, Dec 28, 2020 at 9:31 AM qin...@st...<mailto:qin...@st...> <qin...@st...<mailto:qin...@st...>> wrote:
Dear Andy
Thank you very much.
It worked. But I have another question.
In fact, I tried to merge some data files, then plot a graph.
The code is
plot "< paste <(cat Q_byE_i*.txt) <(cat Q_byM_i*.txt)|awk '{if($1==16.0) { e[$3] += $4 }}END { for ( i in e) { print i , e[i]}}'" u 1:2
The latter part of code about ‘awk’, I think there is no problem. Could I modify the code as the system("bash -c 'paste <(ls Q*) <(ls F*)'")?
Qin
****************************************************
秦志豪
京都大学大学院 エネルギー科学研究科
エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
岸本研究室
E-mail : qin...@st...<mailto:qin...@st...>
****************************************************
?件人: Andrew Rasmussen<mailto:an...@gm...>
?送??: 2020年12月28日 23:57
收件人: qin...@st...<mailto:qin...@st...>
抄送: gnu...@li...<mailto:gnu...@li...>
主?: Re: [Gnuplot-info] system command in gnuplot
Hello,
Your error comes from the fact that gnuplot is running the system command using the sh shell instead of bash (or whatever your usual shell is). You can get the command to be interpreted by bash like this:
system("bash -c 'paste <(ls Q*) <(ls F*)'")
Andy
On Mon, Dec 28, 2020 at 4:11 AM qin...@st...<mailto:qin...@st...> <qin...@st...<mailto:qin...@st...>> wrote:
Hello
Now I am using gnuplot (Version 5.2 patchlevel 6) on a Linux system.
The information of operating system as follow
Linux version 4.4.162-94.72-default (geeko@buildhost) (gcc version 4.8.5 (SUSE Linux) )
LSB Version: n/a
Distributor ID: SUSE
Description: SUSE Linux Enterprise Server 12 SP3
Release: 12.3
Codename: n/a
My question:
I am trying to launch a system command in gnuplot like
Terminal type is now 'qt'
gnuplot> system(" paste <(ls Q*) <(ls F*)")
show me the error message as
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: ` paste <(ls Q*) <(ls F*)'
But if I exit the gnuplot and run the command, it can work.
qin@csc1:~/qin /txt> paste <(ls Q*) <(ls F*)
any help would be much appreciated
have a nice day
****************************************************
秦志豪
京都大学大学院 エネルギー科学研究科
エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
岸本研究室
E-mail : qin...@st...<mailto:qin...@st...>
****************************************************
_______________________________________________
gnuplot-info mailing list
gnu...@li...<mailto:gnu...@li...>
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
|
|
From: Andrew R. <an...@gm...> - 2020-12-30 13:51:35
|
Without testing (I might have time later), there are two things that look
like they need to be fixed:
1. in order for "./myscript.sh" not to have the 'Permission denied' error,
it needs to be executable. You can do this on the command line with>
chmod +x myscript.sh
2. When a bash script takes command line arguments, they have the names $1,
$2, etc. So, you might have to change $k to $1.
Andy
On Wed, Dec 30, 2020 at 2:29 AM qin...@st... <
qin...@st...> wrote:
> Thanks for your answer.
>
> But there are some other problems.
>
> When I do
>
> >system("bash -c ./myscript.sh ".sprintf("%.1f", k))
>
> An error appears : nan: ./myscript.sh: : Permission denied
>
>
>
> I modified the command as system("/bin/bash combine.sh ".sprintf("%.1f",
> k))
>
> The script is executed. However, not only passing the variable k, the
> whole script is executed.
>
>
>
> What I want is that executing the
>
> plot for [k= 1: 20: 1] "< bash ./myscript.sh" u 1:2
>
> the index of loop k can be paased into the script as a variable (the red
> parameter as follow).
>
>
>
> The code in the script is
>
> paste <(cat Q_byE_i*.txt) <(cat Q_byM_i*.txt)|awk -v vtime=$k '
> {if($1==vtime*1.0) { e[$3] += $4; m[$3] += $9}} END { for ( i in e) { print
> i , e[i], m[i], vtime}}'
>
>
>
> For your convenience to test, I send you some data files。
>
>
>
> ****************************************************
> 秦志豪
> 京都大学大学院 エネルギー科学研究科
> エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
> 岸本研究室
> E-mail : qin...@st...
> ****************************************************
>
>
>
> *发件人: *Andrew Rasmussen <an...@gm...>
> *发送时间: *2020年12月30日 5:32
> *收件人: *qin...@st...
> *抄送: *gnu...@li...
> *主题: *Re: 回?: 回?: [Gnuplot-info] system command in gnuplot
>
>
>
> You can definitely pass arguments to a bash script. In the script, you use
> the arguments as variables $1, $2, etc. (Reference example:
> https://www.golinuxcloud.com/beginners-guide-to-use-script-arguments-in-bash-with-examples/
> ).
>
>
>
> It will take some fiddling to construct the command in gnuplot, but if the
> variables are var1 and var2 for example, you can do it like this:
>
>
>
> > system("bash -c ./myscript.sh ".var1." ".var2)
>
>
>
> The '.' concatenates the string variables. If var1 or var2 is a number
> like 16.0 instead of a string "16.0", you might have to do something like
> the below with sprintf to get it to turn into a string correctly:
>
>
>
> > system("bash -c ./myscript.sh ".var1." ".sprintf("%.1f", var2))
>
>
>
> Andy
>
>
>
> On Tue, Dec 29, 2020 at 12:48 AM qin...@st... <
> qin...@st...> wrote:
>
> Dear Andy
>
> As your advice, we can reduce syntax / escape errors by put the paste /
> awk script in a separate file ("myscript.sh").
>
> Then call it from inside gnuplot as plot "< bash ./myscript.sh"
>
> But if the data file name (Q_byE_i*.txt) is a string variable and “16.0” of
> “if($1==16.0” in awk part is also a variable,
>
> How can I pass these variables from gnuplot into myscript.sh.
>
>
>
> Because I'm not very familiar with linux, my questions might be very basic
> or stupid.
>
> please forgive me.
>
> ****************************************************
> 秦志豪
> 京都大学大学院 エネルギー科学研究科
> エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
> 岸本研究室
> E-mail : qin...@st...
> ****************************************************
>
>
>
> *发件人: *Andrew Rasmussen <an...@gm...>
> *发送时间: *2020年12月29日 1:13
> *收件人: *qin...@st...
> *抄送: *gnu...@li...
> *主题: *Re: 回?: [Gnuplot-info] system command in gnuplot
>
>
>
> Yes, you should be able to make a similar modification, something like:
>
>
>
> plot "< bash -c 'paste <(cat Q_byE_i*.txt) <(cat Q_byM_i*.txt)|awk
> \'{if($1==16.0) { e[$3] += $4 }}END { for ( i in e) { print i , e[i]}}\''"
>
>
>
> I can't test it out, so you might have to escape some additional
> characters (* etc.).
>
>
>
> When you are using a command that is this complicated, a way to simplify
> things and reduce syntax / escape errors is to put the paste / awk script
> in a separate file ("myscript.sh") and call that script from inside gnuplot:
>
>
>
> plot "< bash ./myscript.sh"
>
>
>
> Andy
>
>
>
> On Mon, Dec 28, 2020 at 9:31 AM qin...@st... <
> qin...@st...> wrote:
>
> Dear Andy
>
>
>
> Thank you very much.
>
> It worked. But I have another question.
>
> In fact, I tried to merge some data files, then plot a graph.
>
> The code is
>
> plot "< paste <(cat Q_byE_i*.txt) <(cat Q_byM_i*.txt)|awk '{if($1==16.0)
> { e[$3] += $4 }}END { for ( i in e) { print i , e[i]}}'" u 1:2
>
>
>
> The latter part of code about ‘awk’, I think there is no problem. Could I
> modify the code as the system("bash -c 'paste <(ls Q*) <(ls F*)'")?
>
>
>
> Qin
>
>
>
> ****************************************************
> 秦志豪
> 京都大学大学院 エネルギー科学研究科
> エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
> 岸本研究室
> E-mail : qin...@st...
> ****************************************************
>
>
>
> *发件人: *Andrew Rasmussen <an...@gm...>
> *发送时间: *2020年12月28日 23:57
> *收件人: *qin...@st...
> *抄送: *gnu...@li...
> *主题: *Re: [Gnuplot-info] system command in gnuplot
>
>
>
> Hello,
>
>
>
> Your error comes from the fact that gnuplot is running the system command
> using the sh shell instead of bash (or whatever your usual shell is). You
> can get the command to be interpreted by bash like this:
>
>
>
> system("bash -c 'paste <(ls Q*) <(ls F*)'")
>
>
>
> Andy
>
>
>
> On Mon, Dec 28, 2020 at 4:11 AM qin...@st... <
> qin...@st...> wrote:
>
> Hello
>
> Now I am using gnuplot (Version 5.2 patchlevel 6) on a Linux system.
> The information of operating system as follow
> Linux version 4.4.162-94.72-default (geeko@buildhost) (gcc version 4.8.5
> (SUSE Linux) )
> LSB Version: n/a
> Distributor ID: SUSE
> Description: SUSE Linux Enterprise Server 12 SP3
> Release: 12.3
> Codename: n/a
>
> My question:
> I am trying to launch a system command in gnuplot like
> Terminal type is now 'qt'
> gnuplot> system(" paste <(ls Q*) <(ls F*)")
>
> show me the error message as
> sh: -c: line 0: syntax error near unexpected token `('
> sh: -c: line 0: ` paste <(ls Q*) <(ls F*)'
>
> But if I exit the gnuplot and run the command, it can work.
> qin@csc1:~/qin /txt> paste <(ls Q*) <(ls F*)
>
> any help would be much appreciated
> have a nice day
>
> ****************************************************
> 秦志豪
> 京都大学大学院 エネルギー科学研究科
> エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
> 岸本研究室
> E-mail : qin...@st...
> ****************************************************
>
>
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via:
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
>
>
>
>
>
|
|
From: <qin...@st...> - 2020-12-30 08:47:39
|
Thanks for your answer.
But there are some other problems.
When I do
>system("bash -c ./myscript.sh ".sprintf("%.1f", k))
An error appears : nan: ./myscript.sh: : Permission denied
I modified the command as system("/bin/bash combine.sh ".sprintf("%.1f", k))
The script is executed. However, not only passing the variable k, the whole script is executed.
What I want is that executing the
plot for [k= 1: 20: 1] "< bash ./myscript.sh" u 1:2
the index of loop k can be paased into the script as a variable (the red parameter as follow).
The code in the script is
paste <(cat Q_byE_i*.txt) <(cat Q_byM_i*.txt)|awk -v vtime=$k ' {if($1==vtime*1.0) { e[$3] += $4; m[$3] += $9}} END { for ( i in e) { print i , e[i], m[i], vtime}}'
****************************************************
秦志豪
京都大学大学院 エネルギー科学研究科
エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
岸本研究室
E-mail : qin...@st...
****************************************************
?件人: Andrew Rasmussen<mailto:an...@gm...>
?送??: 2020年12月30日 5:32
收件人: qin...@st...<mailto:qin...@st...>
抄送: gnu...@li...<mailto:gnu...@li...>
主?: Re: 回?: 回?: [Gnuplot-info] system command in gnuplot
You can definitely pass arguments to a bash script. In the script, you use the arguments as variables $1, $2, etc. (Reference example: https://www.golinuxcloud.com/beginners-guide-to-use-script-arguments-in-bash-with-examples/).
It will take some fiddling to construct the command in gnuplot, but if the variables are var1 and var2 for example, you can do it like this:
> system("bash -c ./myscript.sh ".var1." ".var2)
The '.' concatenates the string variables. If var1 or var2 is a number like 16.0 instead of a string "16.0", you might have to do something like the below with sprintf to get it to turn into a string correctly:
> system("bash -c ./myscript.sh ".var1." ".sprintf("%.1f", var2))
Andy
On Tue, Dec 29, 2020 at 12:48 AM qin...@st...<mailto:qin...@st...> <qin...@st...<mailto:qin...@st...>> wrote:
Dear Andy
As your advice, we can reduce syntax / escape errors by put the paste / awk script in a separate file ("myscript.sh").
Then call it from inside gnuplot as plot "< bash ./myscript.sh"
But if the data file name (Q_byE_i*.txt) is a string variable and “16.0” of “if($1==16.0” in awk part is also a variable,
How can I pass these variables from gnuplot into myscript.sh.
Because I'm not very familiar with linux, my questions might be very basic or stupid.
please forgive me.
****************************************************
秦志豪
京都大学大学院 エネルギー科学研究科
エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
岸本研究室
E-mail : qin...@st...<mailto:qin...@st...>
****************************************************
?件人: Andrew Rasmussen<mailto:an...@gm...>
?送??: 2020年12月29日 1:13
收件人: qin...@st...<mailto:qin...@st...>
抄送: gnu...@li...<mailto:gnu...@li...>
主?: Re: 回?: [Gnuplot-info] system command in gnuplot
Yes, you should be able to make a similar modification, something like:
plot "< bash -c 'paste <(cat Q_byE_i*.txt) <(cat Q_byM_i*.txt)|awk \'{if($1==16.0) { e[$3] += $4 }}END { for ( i in e) { print i , e[i]}}\''"
I can't test it out, so you might have to escape some additional characters (* etc.).
When you are using a command that is this complicated, a way to simplify things and reduce syntax / escape errors is to put the paste / awk script in a separate file ("myscript.sh") and call that script from inside gnuplot:
plot "< bash ./myscript.sh"
Andy
On Mon, Dec 28, 2020 at 9:31 AM qin...@st...<mailto:qin...@st...> <qin...@st...<mailto:qin...@st...>> wrote:
Dear Andy
Thank you very much.
It worked. But I have another question.
In fact, I tried to merge some data files, then plot a graph.
The code is
plot "< paste <(cat Q_byE_i*.txt) <(cat Q_byM_i*.txt)|awk '{if($1==16.0) { e[$3] += $4 }}END { for ( i in e) { print i , e[i]}}'" u 1:2
The latter part of code about ‘awk’, I think there is no problem. Could I modify the code as the system("bash -c 'paste <(ls Q*) <(ls F*)'")?
Qin
****************************************************
秦志豪
京都大学大学院 エネルギー科学研究科
エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
岸本研究室
E-mail : qin...@st...<mailto:qin...@st...>
****************************************************
?件人: Andrew Rasmussen<mailto:an...@gm...>
?送??: 2020年12月28日 23:57
收件人: qin...@st...<mailto:qin...@st...>
抄送: gnu...@li...<mailto:gnu...@li...>
主?: Re: [Gnuplot-info] system command in gnuplot
Hello,
Your error comes from the fact that gnuplot is running the system command using the sh shell instead of bash (or whatever your usual shell is). You can get the command to be interpreted by bash like this:
system("bash -c 'paste <(ls Q*) <(ls F*)'")
Andy
On Mon, Dec 28, 2020 at 4:11 AM qin...@st...<mailto:qin...@st...> <qin...@st...<mailto:qin...@st...>> wrote:
Hello
Now I am using gnuplot (Version 5.2 patchlevel 6) on a Linux system.
The information of operating system as follow
Linux version 4.4.162-94.72-default (geeko@buildhost) (gcc version 4.8.5 (SUSE Linux) )
LSB Version: n/a
Distributor ID: SUSE
Description: SUSE Linux Enterprise Server 12 SP3
Release: 12.3
Codename: n/a
My question:
I am trying to launch a system command in gnuplot like
Terminal type is now 'qt'
gnuplot> system(" paste <(ls Q*) <(ls F*)")
show me the error message as
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: ` paste <(ls Q*) <(ls F*)'
But if I exit the gnuplot and run the command, it can work.
qin@csc1:~/qin /txt> paste <(ls Q*) <(ls F*)
any help would be much appreciated
have a nice day
****************************************************
秦志豪
京都大学大学院 エネルギー科学研究科
エネルギー基礎科学専攻 プラズマ・核融合基礎学分野
岸本研究室
E-mail : qin...@st...<mailto:qin...@st...>
****************************************************
_______________________________________________
gnuplot-info mailing list
gnu...@li...<mailto:gnu...@li...>
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
|