|
From: Thomas S. <t.s...@fz...> - 2014-03-22 10:32:33
|
BBands <bbands <at> gmail.com> writes: > > Ah, I take your point. For that I wrote a simple preprocessor that > notes the high and low values of the series > i wish to plot and creates the appropriate range, label and plot > commands. Someone posted a solution here using a dummy plot a while > back, but I never investigated it. > > Best, > > John > > On Fri, Mar 21, 2014 at 3:02 PM, Jon <devout1977 <at> gmail.com> wrote: > > Thanks, it seems it does return some information concerning the range of the > > plot. But I wonder how I can possibly save them as parameters to be used for > > my purpose. It seems the plot will not know the range until it finishes > > plotting the data, but after the data is finished plotting the label, key > > etc have been put on the plot. there is a bunch of gnuplot-defined variables GPVAL_* which contain the state of the recent plot. a simple solution would be to make a dummy plot, save the plot ranges, define the labels and then do the real plot: set terminal push set teminal dumb plot "filename" ... set xrange [GPVAL_X_MIN:GPVAL_X_MAX] set yrange [GPVAL_Y_MIN:GPVAL_Y_MAX] set label 1 sprintf("xmin: %f",GPVAL_X_MIN) at ... set label 2 sprintf("xmax: %f",GPVAL_X_MAX) at ... set terminal pop replot |