|
From: Alan C. <ala...@gm...> - 2016-07-29 19:59:38
|
My data is data points contained in an input file. What I'd like to do is something like: set y2range [(1.8*GPVAL_Y_MIN)+32:(1.8*GPVAL_Y_MAX)+32] But GPVAL_Y_MIN and GPVAL_Y_MAX apparently aren't defined until the read is complete, and putting things like y2range or y2ticks after the read seems to have no effect. I tried refresh and replot after the y2 stuff, even a 2nd plot line. Is there a way to do a dummy read that just sets up the min/max stuff? reset set terminal gif size 1200,800 set output "2labc.gif" set xdata time set timefmt x "%s" set format x "%H:%M\n%D" set style data lines set xtics auto # GPVAL_Y_MIN etc aren't defined yet #set y2range [(1.8*GPVAL_Y_MIN)+32:(1.8*GPVAL_Y_MAX)+32] set y2label "Fahrenheit" plot "outvals.tab" using ($1-(4*3600)):2 notitle # These have no effect: #set y2range [(1.8*GPVAL_Y_MIN)+32:(1.8*GPVAL_Y_MAX)+32] #set y2tics auto #refresh -- Credit is the root of all evil. - AB1JX |
|
From: Ethan M. <eam...@gm...> - 2016-07-29 21:29:05
|
Use the "stats" command. If you only need to know the y value range, that
would be
stats "outvals.tab" using 2
On Fri, Jul 29, 2016 at 12:59 PM, Alan Corey <ala...@gm...> wrote:
> My data is data points contained in an input file. What I'd like to
> do is something like:
>
> set y2range [(1.8*GPVAL_Y_MIN)+32:(1.8*GPVAL_Y_MAX)+32]
>
> But GPVAL_Y_MIN and GPVAL_Y_MAX apparently aren't defined until the
> read is complete, and putting things like y2range or y2ticks after the
> read seems to have no effect. I tried refresh and replot after the y2
> stuff, even a 2nd plot line.
>
> Is there a way to do a dummy read that just sets up the min/max stuff?
>
> reset
> set terminal gif size 1200,800
> set output "2labc.gif"
> set xdata time
> set timefmt x "%s"
> set format x "%H:%M\n%D"
> set style data lines
> set xtics auto
> # GPVAL_Y_MIN etc aren't defined yet
> #set y2range [(1.8*GPVAL_Y_MIN)+32:(1.8*GPVAL_Y_MAX)+32]
> set y2label "Fahrenheit"
> plot "outvals.tab" using ($1-(4*3600)):2 notitle
> # These have no effect:
> #set y2range [(1.8*GPVAL_Y_MIN)+32:(1.8*GPVAL_Y_MAX)+32]
> #set y2tics auto
> #refresh
>
>
> --
> Credit is the root of all evil. - AB1JX
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via:
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
|
|
From: Alan C. <ala...@gm...> - 2016-07-30 03:07:36
|
On 7/29/16, Ethan Merritt <eam...@gm...> wrote: > Use the "stats" command. If you only need to know the y value range, that > would be > > stats "outvals.tab" using 2 Thank you, that's close. What it gets though are the min/max of the data rather than the limits of the plot. For example 17.6 - 31.9 rather than 16 - 32. I imagine there's a relatively simple formula that sets the plot limits to round numbers? I think those are what I should put through the * 1.8 + 32 conversion. I probably can't access the plot limits but I can derive them over again from the data limits if I know the formula. -- Credit is the root of all evil. - AB1JX |
|
From: Ethan A M. <EAM...@gm...> - 2016-07-30 03:53:53
|
On Friday, 29 July 2016 11:07:29 PM Alan Corey wrote: > On 7/29/16, Ethan Merritt <eam...@gm...> wrote: > > Use the "stats" command. If you only need to know the y value range, that > > would be > > > > stats "outvals.tab" using 2 > > Thank you, that's close. What it gets though are the min/max of the > data rather than the limits of the plot. For example 17.6 - 31.9 > rather than 16 - 32. I imagine there's a relatively simple formula > that sets the plot limits to round numbers? I think those are what I > should put through the * 1.8 + 32 conversion. I probably can't access > the plot limits but I can derive them over again from the data limits > if I know the formula. Not a formula. By default the axis range is extended to the next tic mark. What that is depends on "set ytics". If you do not want the axis range to extend beyond the actual data, you can use the keyword "noextend". I.e. set yrange [*:*] noextend In that case the axis range will exactly match the min/max of the data y coordinates,. See "help noextend" Ethan |
|
From: Alan C. <ala...@gm...> - 2017-03-14 19:57:00
|
My final outcome of that last summer: https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=175024&p=1130714#p1130714 Oh, noextend must need version 5, I'm using the 4.6 that's in Raspbian debs, good enough for now. On 7/29/16, Ethan A Merritt <EAM...@gm...> wrote: > On Friday, 29 July 2016 11:07:29 PM Alan Corey wrote: >> On 7/29/16, Ethan Merritt <eam...@gm...> wrote: >> > Use the "stats" command. If you only need to know the y value range, >> > that >> > would be >> > >> > stats "outvals.tab" using 2 >> >> Thank you, that's close. What it gets though are the min/max of the >> data rather than the limits of the plot. For example 17.6 - 31.9 >> rather than 16 - 32. I imagine there's a relatively simple formula >> that sets the plot limits to round numbers? I think those are what I >> should put through the * 1.8 + 32 conversion. I probably can't access >> the plot limits but I can derive them over again from the data limits >> if I know the formula. > > Not a formula. By default the axis range is extended to the next tic mark. > What that is depends on "set ytics". If you do not want the axis range > to extend beyond the actual data, you can use the keyword "noextend". > I.e. > set yrange [*:*] noextend > In that case the axis range will exactly match the min/max of the > data y coordinates,. > > See "help noextend" > > Ethan > -- ------------- No, I won't call it "climate change", do you have a "reality problem"? - AB1JX Impeach Impeach Impeach Impeach Impeach Impeach Impeach Impeach |
|
From: Ethan M. <eam...@gm...> - 2017-03-14 21:24:11
|
On Tue, Mar 14, 2017 at 12:56 PM, Alan Corey <ala...@gm...> wrote: > My final outcome of that last summer: > https://www.raspberrypi.org/forums/viewtopic.php?f=37&t= > 175024&p=1130714#p1130714 > > Oh, noextend must need version 5, I'm using the 4.6 that's in Raspbian > debs, good enough for now. > > In version 4.6 the equivalent command is set autoscale fix (totally non-obvious, which is why it got a less obscure equivalent in version 5) Ethan > On 7/29/16, Ethan A Merritt <EAM...@gm...> wrote: > > On Friday, 29 July 2016 11:07:29 PM Alan Corey wrote: > >> On 7/29/16, Ethan Merritt <eam...@gm...> wrote: > >> > Use the "stats" command. If you only need to know the y value range, > >> > that > >> > would be > >> > > >> > stats "outvals.tab" using 2 > >> > >> Thank you, that's close. What it gets though are the min/max of the > >> data rather than the limits of the plot. For example 17.6 - 31.9 > >> rather than 16 - 32. I imagine there's a relatively simple formula > >> that sets the plot limits to round numbers? I think those are what I > >> should put through the * 1.8 + 32 conversion. I probably can't access > >> the plot limits but I can derive them over again from the data limits > >> if I know the formula. > > > > Not a formula. By default the axis range is extended to the next tic > mark. > > What that is depends on "set ytics". If you do not want the axis range > > to extend beyond the actual data, you can use the keyword "noextend". > > I.e. > > set yrange [*:*] noextend > > In that case the axis range will exactly match the min/max of the > > data y coordinates,. > > > > See "help noextend" > > > > Ethan > > > > > -- > ------------- > No, I won't call it "climate change", do you have a "reality problem"? - > AB1JX > Impeach Impeach Impeach Impeach Impeach Impeach Impeach Impeach > |
|
From: Alan C. <ala...@gm...> - 2017-03-14 22:36:38
|
OK, yes, help autoscale finds that. I was trying to access the value in GPVAL_Y_MIN and GPVAL_Y_MAX to convert them for labeling the 2nd Y scale but couldn't, apparently they get defined by the plotting process. I didn't try labeling after plotting. I was setting my y2range based on values from stat but then I noticed they were a little off. About as I put a bad plot online as the first plot in that post. I knew the max temp was about 93 F but it looks more like 83. The only real change I made was in forcing yrange for the left axis. On 3/14/17, Ethan Merritt <eam...@gm...> wrote: > On Tue, Mar 14, 2017 at 12:56 PM, Alan Corey <ala...@gm...> wrote: > >> My final outcome of that last summer: >> https://www.raspberrypi.org/forums/viewtopic.php?f=37&t= >> 175024&p=1130714#p1130714 >> >> Oh, noextend must need version 5, I'm using the 4.6 that's in Raspbian >> debs, good enough for now. >> >> > In version 4.6 the equivalent command is > set autoscale fix > > (totally non-obvious, which is why it got a less obscure equivalent in > version 5) > > Ethan > > >> On 7/29/16, Ethan A Merritt <EAM...@gm...> wrote: >> > On Friday, 29 July 2016 11:07:29 PM Alan Corey wrote: >> >> On 7/29/16, Ethan Merritt <eam...@gm...> wrote: >> >> > Use the "stats" command. If you only need to know the y value >> >> > range, >> >> > that >> >> > would be >> >> > >> >> > stats "outvals.tab" using 2 >> >> >> >> Thank you, that's close. What it gets though are the min/max of the >> >> data rather than the limits of the plot. For example 17.6 - 31.9 >> >> rather than 16 - 32. I imagine there's a relatively simple formula >> >> that sets the plot limits to round numbers? I think those are what I >> >> should put through the * 1.8 + 32 conversion. I probably can't access >> >> the plot limits but I can derive them over again from the data limits >> >> if I know the formula. >> > >> > Not a formula. By default the axis range is extended to the next tic >> mark. >> > What that is depends on "set ytics". If you do not want the axis range >> > to extend beyond the actual data, you can use the keyword "noextend". >> > I.e. >> > set yrange [*:*] noextend >> > In that case the axis range will exactly match the min/max of the >> > data y coordinates,. >> > >> > See "help noextend" >> > >> > Ethan >> > >> >> >> -- >> ------------- >> No, I won't call it "climate change", do you have a "reality problem"? - >> AB1JX >> Impeach Impeach Impeach Impeach Impeach Impeach Impeach Impeach >> > -- ------------- No, I won't call it "climate change", do you have a "reality problem"? - AB1JX Impeach Impeach Impeach Impeach Impeach Impeach Impeach Impeach |