comparison scripts/plot/subplot.m @ 5215:32c569794216

[project @ 2005-03-16 18:54:42 by jwe]
author jwe
date Wed, 16 Mar 2005 18:54:52 +0000
parents eecc24b92d97
children 3d9afb170a39
comparison
equal deleted inserted replaced
5214:eecc24b92d97 5215:32c569794216
22 ## @deftypefnx {Function File} {} subplot (@var{rcn}) 22 ## @deftypefnx {Function File} {} subplot (@var{rcn})
23 ## Sets @code{gnuplot} in multiplot mode and plots in location 23 ## Sets @code{gnuplot} in multiplot mode and plots in location
24 ## given by index (there are @var{cols} by @var{rows} subwindows). 24 ## given by index (there are @var{cols} by @var{rows} subwindows).
25 ## 25 ##
26 ## The global variable @var{__multiplot_scale__} should be used when the 26 ## The global variable @var{__multiplot_scale__} should be used when the
27 ## command @code{__gset__ size xsize, ysize} has been used prior to calling 27 ## command @code{__gnuplot_set__ size xsize, ysize} has been used prior to calling
28 ## @code{subplot}. 28 ## @code{subplot}.
29 ## 29 ##
30 ## The value of @var{__multiplot_scale__} should be a vector with two 30 ## The value of @var{__multiplot_scale__} should be a vector with two
31 ## elements, the first set equal to @var{xsize} and the second to 31 ## elements, the first set equal to @var{xsize} and the second to
32 ## @var{ysize}. 32 ## @var{ysize}.
155 __multiplot_xsize__ = __multiplot_scale__(1) ./ columns; 155 __multiplot_xsize__ = __multiplot_scale__(1) ./ columns;
156 __multiplot_ysize__ = __multiplot_scale__(2) ./ rows; 156 __multiplot_ysize__ = __multiplot_scale__(2) ./ rows;
157 157
158 gnuplot_command_replot = "cle;rep"; 158 gnuplot_command_replot = "cle;rep";
159 159
160 __gset__ multiplot; 160 __gnuplot_set__ multiplot;
161 161
162 eval (sprintf ("__gset__ size %g, %g", __multiplot_xsize__, 162 eval (sprintf ("__gnuplot_set__ size %g, %g", __multiplot_xsize__,
163 __multiplot_ysize__)); 163 __multiplot_ysize__));
164 endif 164 endif
165 165
166 ## get the sub plot location 166 ## get the sub plot location
167 167
173 ## set the origin 173 ## set the origin
174 174
175 xo = (xp - 1.0) * __multiplot_xsize__; 175 xo = (xp - 1.0) * __multiplot_xsize__;
176 yo = (rows - yp) * __multiplot_ysize__; 176 yo = (rows - yp) * __multiplot_ysize__;
177 177
178 eval (sprintf ("__gset__ origin %g, %g", xo, yo)); 178 eval (sprintf ("__gnuplot_set__ origin %g, %g", xo, yo));
179 179
180 endif 180 endif
181 181
182 endfunction 182 endfunction