Mercurial > hg > octave-lyh
diff scripts/plot/scatter3.m @ 17412:5e552cd9315a
Overhaul scatter family of functions
* scripts/plot/module.mk: Remove unused function __color_str_rgb__.m from build.
* scripts/plot/private/__color_str_rgb__.m: Remove unnecessary function.
* scripts/plot/scatter.m: Put input validation first. Adjust indentation.
* scripts/plot/scatter3.m: Put input validation first. Adjust indentation.
Use htmp instead of tmp for temporary graphics handle.
* scripts/plot/private/__scatter__.m: Update "markeredgecolor" in child patch
objects when same property is updated in hggroup. Accept "fill" for "filled"
for Matlab compatibility. Remove call to __color_str_rgb__. Don't bother
saving graphics handle from __go_patch__ since it is never used. Use
cellfun instead of for loop for input processing.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 10 Sep 2013 16:31:34 -0700 |
parents | 68bcac3c043a |
children |
line wrap: on
line diff
--- a/scripts/plot/scatter3.m +++ b/scripts/plot/scatter3.m @@ -71,29 +71,29 @@ if (nargin < 2) print_usage (); - else + endif + oldfig = []; if (! isempty (hax)) oldfig = get (0, "currentfigure"); endif - unwind_protect - hax = newplot (hax); - - tmp = __scatter__ (hax, 3, "scatter3", varargin{:}); + unwind_protect + hax = newplot (hax); + + htmp = __scatter__ (hax, 3, "scatter3", varargin{:}); - if (! ishold (hax)) - set (hax, "view", [-37.5, 30], - "xgrid", "on", "ygrid", "on", "zgrid", "on"); - endif - unwind_protect_cleanup - if (! isempty (oldfig)) - set (0, "currentfigure", oldfig); - endif - end_unwind_protect - endif + if (! ishold (hax)) + set (hax, "view", [-37.5, 30], + "xgrid", "on", "ygrid", "on", "zgrid", "on"); + endif + unwind_protect_cleanup + if (! isempty (oldfig)) + set (0, "currentfigure", oldfig); + endif + end_unwind_protect if (nargout > 0) - retval = tmp; + retval = htmp; endif endfunction