[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info-beta
Subject:    Re: [Q] gp 3.7.x - ?range [] writeback to variables ?
From:       crawford richard <u600256 () gamma ! lanl ! gov>
Date:       1999-06-15 18:53:32
[Download RAW message or body]

On Tue, 15 Jun 1999 Stefan A. Deutscher <stefand@ferrari.lcam.u-psud.fr> wrote:

[snip]
> This is already neat, but what I really had hoped to do with the writeback
> option doesn't seem to be possible (yet?):
> 
>        set xrange [-10:10]
>        set yrange [ymin:ymax] writeback
>        plot sin(x)
>        set arrow 1 from 0, ymin to 0, 0.99*ymin
>        replot
> 
> Which, I had hoped, would essentially set the variables ymin/ymax to the
> values found in the data file and then allow one to use them afterwards
> as if they had been set by hand. This would make my batch plots of data
[snip]

I think this is a specific application of a more general feature -- the
ability to access internal variables such as autoscaled ranges.  If, for
instance, we choose the syntax \ymin\ to denote the minimum value of the
plotted y's, then SAD's example could be done with
    set yrange [*:*] writeback
    plot sin(x)
    YMIN=\ymin\
    set arrow 1 from 0,YMIN to 0,0.99*YMIN
    replot
or maybe even
    set yrange [*:*] writeback
    plot sin(x)
    set arrow 1 from 0,\ymin\ to 0,0.99*\ymin\
    replot
... and "writeback" might not be needed ...

Dick Crawford, aka rccrawford@lanl.gov

[[[[ unsubscribe from info-gnuplot-beta via majordomo@dartmouth.edu ]]]]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic