Mercurial > octave-nkf
comparison scripts/plot/subplot.m @ 5493:b2e882e8b68b
[project @ 2005-10-13 17:51:19 by jwe]
author | jwe |
---|---|
date | Thu, 13 Oct 2005 17:51:19 +0000 |
parents | 4c8a2e4e0717 |
children | ace8d8d26933 |
comparison
equal
deleted
inserted
replaced
5492:179096e8e57f | 5493:b2e882e8b68b |
---|---|
80 ## Author: Vinayak Dutt <Dutt.Vinayak@mayo.EDU> | 80 ## Author: Vinayak Dutt <Dutt.Vinayak@mayo.EDU> |
81 ## Adapted-By: jwe | 81 ## Adapted-By: jwe |
82 | 82 |
83 function subplot (rows, columns, index) | 83 function subplot (rows, columns, index) |
84 | 84 |
85 ## global variables to keep track of multiplot options | 85 __plot_globals__; |
86 | |
87 global __multiplot_mode__ = 0; | |
88 global __multiplot_xsize__; | |
89 global __multiplot_ysize__; | |
90 global __multiplot_xn__; | |
91 global __multiplot_yn__; | |
92 global __multiplot_xi__; | |
93 global __multiplot_yi__; | |
94 global __multiplot_scale__; | |
95 | |
96 if (isempty (__multiplot_scale__)) | |
97 __multiplot_scale__ = [1, 1]; | |
98 endif | |
99 | 86 |
100 if (nargin != 3 && nargin != 1) | 87 if (nargin != 3 && nargin != 1) |
101 usage ("subplot (rows, columns, index) or subplot (rcn)"); | 88 usage ("subplot (rows, columns, index) or subplot (rcn)"); |
102 endif | 89 endif |
103 | 90 |
153 __multiplot_xn__ = columns; | 140 __multiplot_xn__ = columns; |
154 __multiplot_yn__ = rows; | 141 __multiplot_yn__ = rows; |
155 __multiplot_xsize__ = __multiplot_scale__(1) ./ columns; | 142 __multiplot_xsize__ = __multiplot_scale__(1) ./ columns; |
156 __multiplot_ysize__ = __multiplot_scale__(2) ./ rows; | 143 __multiplot_ysize__ = __multiplot_scale__(2) ./ rows; |
157 | 144 |
158 gnuplot_command_replot = "cle;rep"; | |
159 | |
160 __gnuplot_raw__ ("set multiplot;\n"); | 145 __gnuplot_raw__ ("set multiplot;\n"); |
161 | 146 |
162 __gnuplot_raw__ (sprintf ("set size %g, %g;\n", | 147 __gnuplot_raw__ (sprintf ("set size %g, %g;\n", |
163 __multiplot_xsize__, __multiplot_ysize__)); | 148 __multiplot_xsize__, __multiplot_ysize__)); |
164 endif | 149 endif |