GNUPlot Manual
GNUPlot Manual
GNUPlot Manual
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
36 SET-SHOW gnuplot 4.0 133<br />
set origin x01,y01<br />
set size xs,ys<br />
plot ...<br />
...<br />
set origin x02,y02<br />
plot ...<br />
set nomultiplot<br />
See set multiplot (p. 78) for further information.<br />
The second version is the [x,y] option for the driver itself. The advantage of this implementation is that<br />
everything is scaled and placed automatically without the need for setting origins and sizes; the graphs<br />
keep their natural x/y proportions of 3/2 (or whatever is fixed by set size).<br />
If both multiplot methods are selected, the standard method is chosen and a warning message is given.<br />
Examples of single plots (or standard multiplot):<br />
set terminal tgif<br />
# defaults<br />
set terminal tgif "Times-Roman" 24<br />
set terminal tgif landscape<br />
set terminal tgif landscape solid<br />
Examples using the built-in multiplot mechanism:<br />
set terminal tgif portrait [2,4] # portrait; 2 plots in the x-<br />
# and 4 in the y-direction<br />
set terminal tgif [1,2] # portrait; 1 plot in the x-<br />
# and 2 in the y-direction<br />
set terminal tgif landscape [3,3] # landscape; 3 plots in both<br />
# directions<br />
36.59.69 Tkcanvas<br />
This terminal driver generates Tk canvas widget commands based on Tcl/Tk (default) or Perl. To use<br />
it, rebuild gnuplot (after uncommenting or inserting the appropriate line in "term.h"), then<br />
gnuplot> set term tkcanvas {perltk} {interactive}<br />
gnuplot> set output ’plot.file’<br />
After invoking "wish", execute the following sequence of Tcl/Tk commands:<br />
% source plot.file<br />
% canvas .c<br />
% pack .c<br />
% gnuplot .c<br />
Or, for Perl/Tk use a program like this:<br />
use Tk;<br />
my $top = MainWindow->new;<br />
my $c = $top->Canvas->pack;<br />
my $gnuplot = do "plot.pl";<br />
$gnuplot->($c);<br />
MainLoop;<br />
The code generated by gnuplot creates a procedure called "gnuplot" that takes the name of a canvas as<br />
its argument. When the procedure is called, it clears the canvas, finds the size of the canvas and draws<br />
the plot in it, scaled to fit.<br />
For 2-dimensional plotting (plot) two additional procedures are defined: "gnuplot plotarea" will return<br />
a list containing the borders of the plotting area "xleft, xright, ytop, ybot" in canvas screen coordinates,<br />
while the ranges of the two axes "x1min, x1max, y1min, y1max, x2min, x2max, y2min, y2max" in