5837
|
1 ## Copyright (C) 1996 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 ## -*- texinfo -*- |
|
21 ## @deftypefn {Function File} {} __plt3__ (@var{x}, @var{y}, @var{z}, @var{fmt}) |
|
22 ## @end deftypefn |
|
23 |
|
24 ## Author: Paul Kienzle <kienzle.powernet.co.uk> |
|
25 ## 2001-04-06 Paul Kienzle <kienzle.powernet.co.uk> |
|
26 ## * __gnuplot_set__ nohidden3d; vector X,Y, matrix Z => meshgrid(X,Y) |
|
27 |
|
28 ## Modified to use new gnuplot interface in octave > 2.9.0 |
|
29 ## Dmitri A. Sergatskov <dasergatskov@gmail.com> |
|
30 ## April 18, 2005 |
|
31 ## Modified to use NaN as seperator for gnuplot, so multiple calls |
|
32 ## aren't needed. |
|
33 ## David Bateman <dbateman@free.fr> |
|
34 ## May 25, 2006 |
|
35 |
6172
|
36 function __plt3__ (x, parametric, usingstr, fmtstr, keystr, withstr) |
5837
|
37 |
6004
|
38 if (nargin < 2) |
6172
|
39 parametric = false; |
|
40 endif |
|
41 if (nargin < 3) |
6075
|
42 have_usingstr = false; |
6004
|
43 usingstr = ""; |
6076
|
44 else |
|
45 have_usingstr = true; |
6004
|
46 endif |
6172
|
47 if (nargin < 4) |
6004
|
48 fmtstr = ""; |
|
49 endif |
6172
|
50 if (nargin < 5) |
6146
|
51 keystr = ""; |
|
52 endif |
6172
|
53 if (nargin < 6) |
6004
|
54 withstr = ""; |
5837
|
55 endif |
|
56 |
6004
|
57 __plot_globals__; |
|
58 |
6146
|
59 cf = __current_figure__; |
6163
|
60 mxi = __multiplot_xi__(cf); |
|
61 myi = __multiplot_yi__(cf); |
6146
|
62 |
6172
|
63 __setup_plot__ ("splot"); |
6004
|
64 |
6146
|
65 j = __plot_data_offset__{cf}(mxi,myi); |
6004
|
66 |
6172
|
67 __plot_data__{cf}{mxi,myi}{j}{1} = x; |
|
68 __plot_data_type__{cf}{mxi,myi}(j) = 3; |
|
69 __plot_data_parametric__{cf}{mxi,myi}{j}{1} = parametric; |
|
70 __plot_key_labels__{cf}{mxi,myi}{j}{1} = keystr; |
5837
|
71 |
6172
|
72 __plot_fmtstr__{cf}{mxi,myi}{j}{1} = fmtstr; |
|
73 if (have_usingstr) |
|
74 __plot_usingstr__{cf}{mxi,myi}{j}{1} = usingstr; |
|
75 else |
|
76 __plot_usingstr__{cf}{mxi,myi}{j}{1} = __make_using_clause__(x); |
|
77 endif |
|
78 __plot_withstr__{cf}{mxi,myi}{j}{1} = withstr; |
6146
|
79 |
6172
|
80 __plot_data_offset__{cf}(mxi,myi) = ++j; |
5837
|
81 |
6172
|
82 __render_plot__ (); |
5837
|
83 |
|
84 endfunction |