|
From: seb_kramm <seb...@ya...> - 2008-03-03 14:28:05
|
Hello, gnuplot users,
I have a problem related with multiplot / key.
I am plotting the same function 3 times on a multiplot.
These 3 functions have 2 parameters, besides x, so each plot has, say, 3 curves. (see
example below)
Now, all this is fine, if there is no key ("set key off").
My problem is, I want a key, so I can identify on each plot which one is related to
the 'a' value. If I enable the key ("set key left right") then I get it 3 times (on
each plot)
What I'd like, of course, is having a unique key for all of these 3 plots (as the
values for parameter 'a' are the same each time). So I tried issuing a "set key
outside" before the first plot, and "set key off" after the first plot, but it
doesn't do it : the automatic scaling of the multiplot shrinks the first plot, and
leaves the 2 others OK.
I suppose I could play around with scale and offset option, but it is labourious.
Does anybody know how to do this more easily ?
Thank you all
--------------------------------------------------------
set multiplot layout 1,3 title "global title"
set title "b = 0"
b=0
plot [x=0:1] \
a=0, foo(a,b,x) title 'a=0', \
a=1, foo(a,b,x) title 'a=1', \
a=2, foo(a,b,x) title 'a=2'
set title "b = 1"
b=1
plot [x=0:1] \
a=0, foo(a,b,x) title 'a=0', \
a=1, foo(a,b,x) title 'a=1', \
a=2, foo(a,b,x) title 'a=2'
set title "b = 2"
b=2
plot [x=0:1] \
a=0, foo(a,b,x) title 'a=0', \
a=1, foo(a,b,x) title 'a=1', \
a=2, foo(a,b,x) title 'a=2'
unset multiplot
pause -1 "fin"
--------------------------------------------------------
|