5406
|
1 ## Copyright (C) 2005 John W. Eaton |
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
|
6 ## under the terms of the GNU General Public License as published by |
|
7 ## the Free Software Foundation; either version 2, or (at your option) |
|
8 ## any later version. |
|
9 ## |
|
10 ## Octave is distributed in the hope that it will be useful, but |
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 ## General Public License for more details. |
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
|
16 ## along with Octave; see the file COPYING. If not, write to the Free |
|
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
18 ## 02110-1301, USA. |
|
19 |
|
20 ## This is a script file shared by __plt__ and __errplot__. |
|
21 |
5493
|
22 ## global variables to keep track of multiplot options |
|
23 |
|
24 global __multiplot_mode__ = 0; |
|
25 global __multiplot_xsize__; |
|
26 global __multiplot_ysize__; |
|
27 global __multiplot_xn__; |
|
28 global __multiplot_yn__; |
|
29 global __multiplot_xi__; |
|
30 global __multiplot_yi__; |
|
31 global __multiplot_scale__; |
|
32 |
|
33 if (isempty (__multiplot_scale__)) |
|
34 __multiplot_scale__ = [1, 1]; |
|
35 endif |
|
36 |
|
37 if (isempty (__multiplot_xi__)) |
|
38 __multiplot_xi__ = 1; |
|
39 endif |
|
40 |
|
41 if (isempty (__multiplot_yi__)) |
|
42 __multiplot_yi__ = 1; |
|
43 endif |
|
44 |
5406
|
45 global __current_figure__; |
|
46 global __plot_data_offset__; |
|
47 global __plot_command__; |
|
48 global __plot_command_sep__; |
|
49 global __plot_data__; |
|
50 |
|
51 if (isempty (__current_figure__)) |
|
52 __current_figure__ = 1; |
|
53 endif |
|
54 |
5493
|
55 if (length (__plot_data_offset__) < __current_figure__ |
|
56 || any (size (__plot_data_offset__{__current_figure__}) != [__multiplot_xi__, __multiplot_yi__])) |
5406
|
57 |
5493
|
58 __plot_data_offset__{__current_figure__}(__multiplot_xi__,__multiplot_yi__) = 1; |
5406
|
59 endif |
|
60 |
5493
|
61 if (length (__plot_command__) < __current_figure__ |
|
62 || any (size (__plot_command__{__current_figure__}) != [__multiplot_xi__, __multiplot_yi__])) |
|
63 __plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__} = ""; |
5406
|
64 endif |
5493
|
65 |
|
66 if (length (__plot_data__) < __current_figure__ |
|
67 || any (size (__plot_data__{__current_figure__}) != [__multiplot_xi__, __multiplot_yi__])) |
|
68 __plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__} = []; |
|
69 endif |