Mercurial > octave-nkf
comparison scripts/plot/draw/meshc.m @ 18930:4d75bda5df80
mesh, meshc, surfc: Allow user provided properties to override defaults.
* mesh.m, meshc.m, surfc.m: Call underlying graphic primitive with default
properties first followed by any user properties second so that they will
override the defaults.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 04 Jul 2014 15:37:42 -0700 |
parents | 7bbe3658c5ef |
children | 0e1f5a750d00 |
comparison
equal
deleted
inserted
replaced
18929:b8934a57e13e | 18930:4d75bda5df80 |
---|---|
66 oldfig = get (0, "currentfigure"); | 66 oldfig = get (0, "currentfigure"); |
67 endif | 67 endif |
68 unwind_protect | 68 unwind_protect |
69 hax = newplot (hax); | 69 hax = newplot (hax); |
70 | 70 |
71 htmp = surface (varargin{:}); | |
72 | |
73 ## FIXME: gnuplot does not support a filled surface and a | 71 ## FIXME: gnuplot does not support a filled surface and a |
74 ## non-filled contour. 3D filled patches are also not supported. | 72 ## non-filled contour. 3D filled patches are also not supported. |
75 ## Thus, the facecolor will be transparent for the gnuplot backend. | 73 ## Thus, the facecolor will be transparent for the gnuplot backend. |
76 set (htmp, "facecolor", "w"); | 74 mesh_props = {"facecolor", "w", "edgecolor", "flat"}; |
77 set (htmp, "edgecolor", "flat"); | 75 chararg = find (cellfun ("isclass", varargin, "char"), 1); |
76 if (isempty (chararg)) | |
77 htmp = surface (varargin{:}, mesh_props{:}); | |
78 else | |
79 htmp = surface (varargin{1:chararg-1}, mesh_props{:}, | |
80 varargin{chararg:end}); | |
81 endif | |
82 | |
78 if (! ishold ()) | 83 if (! ishold ()) |
79 set (hax, "view", [-37.5, 30], | 84 set (hax, "view", [-37.5, 30], |
80 "xgrid", "on", "ygrid", "on", "zgrid", "on", | 85 "xgrid", "on", "ygrid", "on", "zgrid", "on", |
81 "xlimmode", "manual", "ylimmode", "manual"); | 86 "xlimmode", "manual", "ylimmode", "manual"); |
82 endif | 87 endif |