curly_bracket
Contents
Syntax
davinci( 'curly_bracket', 'Position', [x y], 'Height', h, 'Width', w ) davinci( ___, 'Rotation', r ) davinci( ___, <StyleParameterName>, styleparametervalue ) h = davinci( ___ )
Description
Draw a curly bracket.
- The Rotation parameter/value pair controls the rotation about Position. Units are degrees. A positive value rotates counter-clockwise.
- The curly bracket is drawn as two Matlab patch objects. When the Rotation angle is zero (such as in the figure above), the left half of the bracket is a patch object with graphics handle h.half_bracket_1. The right half has handle h.half_bracket_2.
- The length q is the length of each of the four "talons," the regions of the bracket with curvature. The length q is set implicitly, not explicitly, by the user, as q is directly proportional to the user-specified Height. E.g., doubling Height doubles q. The proportionality constant is hard-coded in davinci().
- The values for Height and Width together cannot be such that the two talons in a given half-bracket touch or overlap each other. If this happens, an error is thrown with a helpful message.
Style Parameters
The table below lists the available style parameters.
Parameter | Default | Comments |
Color | 'k' | the FaceColor property of the Matlab patch objects, unless the FaceColor property is specified explicitly (see below). |
EdgeColor | 'none' | The EdgeColor property of the Matlab patch objects. |
FaceAlpha | 1 | The FaceAlpha property of the Matlab patch objects. |
FaceColor | See "Comments". | The FaceColor property of the Matlab patch objects. If the FaceColor parameter/value pair is not specified in the call to davinci() , each patch object's FaceColor property is set to the value of the Color parameter/value pair, which as shown above defaults to 'k' . |
FaceVertexAlphaData | [] | The FaceVertexAlphaData property of the Matlab patch objects. |
FaceVertexCData | [] | The FaceVertexCData property of the Matlab patch objects. |
LineStyle | '-' | The LineStyle property of the Matlab patch objects. |
LineWidth | 0.5 | The LineWidth property of the Matlab patch objects. |
Marker | 'none' | The Marker property of the Matlab patch objects. |
MarkerEdgeColor | 'auto' | The MarkerEdgeColor property of the Matlab patch objects. |
MarkerFaceColor | 'none' | The MarkerFaceColor property of the Matlab patch objects. |
MarkerSize | 6 | The MarkerSize property of the Matlab patch objects. |
NPoints | 30 | The number of vertices used to draw each of the two curves on each talon. Must be at least two. |
Patch.ExtraArgs | {} | Extra parameter/value pairs to pass through to the Matlab patch() commands. See "Pass Through" Arguments for details. |
Examples
EXAMPLE #1 -- DRAW A SIMPLE BRACKET.
davinci( 'curly_bracket', 'Position', [3 10], 'Height', 3, 'Width', 30 ); daspect( [1 1 1] ) % Set the aspect ratio at 1:1.
EXAMPLE #2 -- MISCELLANEOUS BRACKETS.
The code to draw the examples below is here.
Copyright 2015, Leonard R. Wayne, Washington, District of Columbia, United States of America.