comparison scripts/plot/rectangle.m @ 12698:fb93b94dfc82 stable

Add rectangle to new functions list in NEWS. * NEWS: Add rectangle to new functions list in NEWS. * unimplemented.m: Remove rectangle from list. * rectangle.m: Use double spaces for sentence breaks in Texinfo
author Rik <octave@nomad.inbox5.com>
date Wed, 01 Jun 2011 21:00:14 -0700
parents ee4775d04d7f
children 13bcd62824a7
comparison
equal deleted inserted replaced
12697:ee4775d04d7f 12698:fb93b94dfc82
15 ## You should have received a copy of the GNU General Public License 15 ## You should have received a copy of the GNU General Public License
16 ## along with Octave; see the file COPYING. If not, see 16 ## along with Octave; see the file COPYING. If not, see
17 ## <http://www.gnu.org/licenses/>. 17 ## <http://www.gnu.org/licenses/>.
18 18
19 ## -*- texinfo -*- 19 ## -*- texinfo -*-
20 ## @deftypefn {Function File} {} rectangle () 20 ## @deftypefn {Function File} {} rectangle ()
21 ## @deftypefnx {Function File} {} rectangle (@dots{}, "Position", @var{pos}) 21 ## @deftypefnx {Function File} {} rectangle (@dots{}, "Position", @var{pos})
22 ## @deftypefnx {Function File} {} rectangle (@dots{}, "Curvature", @var{curv}) 22 ## @deftypefnx {Function File} {} rectangle (@dots{}, "Curvature", @var{curv})
23 ## @deftypefnx {Function File} {} rectangle (@dots{}, "EdgeColor", @var{ec}) 23 ## @deftypefnx {Function File} {} rectangle (@dots{}, "EdgeColor", @var{ec})
24 ## @deftypefnx {Function File} {} rectangle (@dots{}, "FaceColor", @var{fc}) 24 ## @deftypefnx {Function File} {} rectangle (@dots{}, "FaceColor", @var{fc})
25 ## @deftypefnx {Function File} {@var{h} =} rectangle (@dots{}) 25 ## @deftypefnx {Function File} {@var{h} =} rectangle (@dots{})
26 ## 26 ##
27 ## Draw rectangular patch defined by @var{pos} and @var{curv}. The variable 27 ## Draw rectangular patch defined by @var{pos} and @var{curv}. The variable
28 ## @code{@var{pos}(1 : 2)} defines the lower left-hand corner of the patch 28 ## @code{@var{pos}(1 : 2)} defines the lower left-hand corner of the patch
29 ## and @code{@var{pos}(3 : 4)} its width and height. By default the value of 29 ## and @code{@var{pos}(3 : 4)} its width and height. By default the value of
30 ## @var{pos} is @var{[0, 0, 1, 1]}. 30 ## @var{pos} is @var{[0, 0, 1, 1]}.
31 ## 31 ##
32 ## The variable @var{curv} defines the curvature of the sides of the rectangle 32 ## The variable @var{curv} defines the curvature of the sides of the rectangle
33 ## and it can be a scalar or two-element vector with values between 0 and 1. 33 ## and it can be a scalar or two-element vector with values between 0 and 1.
34 ## A value of 0 represents no curvature of the side, where as a value of 1 34 ## A value of 0 represents no curvature of the side, where as a value of 1
42 ## 42 ##
43 ## @example 43 ## @example
44 ## min (pos (1: 2)) / max (pos (1:2)) * curv 44 ## min (pos (1: 2)) / max (pos (1:2)) * curv
45 ## @end example 45 ## @end example
46 ## 46 ##
47 ## Other properties are passed to the underlying patch command. If called 47 ## Other properties are passed to the underlying patch command. If called
48 ## with an output argument, @code{rectangle} returns the handle to the 48 ## with an output argument, @code{rectangle} returns the handle to the
49 ## rectangle. 49 ## rectangle.
50 ## @end deftypefn 50 ## @end deftypefn
51 ## @seealso{patch} 51 ## @seealso{patch}
52 52
200 "linewidth", get (h, "linewidth"), 200 "linewidth", get (h, "linewidth"),
201 "linestyle", get (h, "linestyle"), 201 "linestyle", get (h, "linestyle"),
202 "facecolor", get (h, "facecolor")); 202 "facecolor", get (h, "facecolor"));
203 endfunction 203 endfunction
204 204
205
205 %!demo 206 %!demo
206 %! close all 207 %! close all
207 %! axis equal 208 %! axis equal
208 %! rectangle ("Position", [0.05, 0.05, 0.9, 0.9], "Curvature", [0.5, 0.5]); 209 %! rectangle ("Position", [0.05, 0.05, 0.9, 0.9], "Curvature", [0.5, 0.5]);
209 210