plot - How do gnuplot margins work in multiplot mode? -
i bit confused gnuplot margins. first of have no idea units these things pointing to. pointing canvas coordinates or fraction of canvas coordinates. behave same in gnuplot mode , multiplot mode?
my problem arises when plotting data in multiplot mode. plotting screen (wtx terminal). let's bungling things badly - plots off canvas, or small unreadable plots.
without margins first plot flush against top of canvas, naturally want push down bit.
can explain how gnuplot margins work , if behave same in multiplot mode.
yes, margins behave similar in "normal" plotting mode , in multiplot mode. basically, margins can have 3 different "modes":
- automatic, default.
- setting each margin specific size,
set lmargin 2. unit character widths (or character heightstmargin,bmargin). - setting specific position of border relative whole canvas,
set lmargin @ screen 0.1, sets left plot border @ 10% of total canvas width.
the difference of multiplot mode is, reference margins in 1. , 2. given sites determined layout option:
set multiplot layout 2,2 this subdivides whole canvas in 4 rectangles of equal size. now, using
set lmargin 1 set rmargin 1 set tmargin 1 set bmargin 1 leaves margin of 1 character width or height on each side of each subplot respect smaller rectangles:
set multiplot layout 2,2 set lmargin 0 set rmargin 0 set tmargin 0 set bmargin 0 set format '' plot x plot x**2 plot x**3 plot x**4 unset multiplot 
set multiplot layout 2,2 set lmargin 1 set rmargin 1 set tmargin 1 set bmargin 1 set format '' plot x plot x**2 plot x**3 plot x**4 unset multiplot 
if want set absolute positions of each border, becomes more cumbersome, because have set 4 margins each plot (the layout options doesn't have effect in case):
set multiplot set lmargin @ screen 0.1 set rmargin @ screen 0.47 set tmargin @ screen 0.97 set bmargin @ screen 0.6 plot x ... gnuplot version 5 offers quite flexible way produce equal rectangles, see answer removing blank gap in gnuplot multiplot
Comments
Post a Comment