a small example (tested with the 'x11' terminal):
data.dat:
1 1
2 4
3 2
4 1
5 5
6 3
7 4
8 2
9 1
10 5
main.plt:
reset
set macro
set xrange [0:11]
set yrange [0:6]
i=1
n=5
load 'loop.plt'
loop.plt:
temp = "call 'plot.plt' 'data.dat' ".i." ".n
print temp
@temp
pause mouse keypress
if (MOUSE_KEY == 43) i=i+1
if (MOUSE_KEY == 45) i=(i>1?i-1:1)
print MOUSE_KEY
reread
plot.plt:
plot '< tail +$1 $0 | head -$2' with linespoints
start with loading 'main.plt' and use the '+' or '-' key when the
mouse pointer is in the plot window.
babelproofreader wrote:
>
> I am plotting a multi-plot plot which has 3 separate plots on the screen
> and which is called thus, using the head/tail syntax
>
> call 'all_plots' $gc 150 5000 11 1
>
> which plots 150 points of the file, ending at line 5000 (and where 11 and
> 1 indicate which columns of the file to plot via if/else statements). At
> the moment to scroll through the file I am manually changing the line
> ending input (e.g. 5000) but this is laborious. Is there some way I can
> rewrite the script so that I can scroll by, for example, hitting a
> designated key such as the space bar, to scroll through one line at a
> time?
>
--
View this message in context: http://old.nabble.com/Multiplot-horizontal-scrolling-tp32412377p32414781.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|