ARROWHEAD draws stealth arrows at given coordinates.
ARROWHEAD(X,Y) plots an arrow head at coordinates specified by X and Y.
ARROWHEAD(...,Name,Value) plots an arrow head with properties specified by name-value pairs.
P=ARROWHEAD(...) returns an object generated by Matlab's `patch` function.
Possible names are
- FaceColor : any input that is valid for Matlab's `patch` function,
- FaceAlpha : any input that is valid for Matlab's `patch` function,
- EdgeColor : any input that is valid for Matlab's `patch` function,
- LineStyle : any input that is valid for Matlab's `patch` function,
- ArrHeadLen: any real value, specifies length of arrow head, measured from stealth notch to tip
- ArrHeadWid: any real value, specifies width of arrow head
- Anchor : any real value or "stealth", controlling the alignment of the arrow head and coordinate [x, y],
if "stealth", then [x, y] aligns with the stealth notch,
if 1, then [x, y] aligns with the arrowhead's tip,
if 0, then [x, y] aligns with the midpoint between the two non-tip nodes,
if any other value, [x, y] aligns with the inter-/extrapolation of the above two points,
- Rotation : any real value, specifies the counterclockwise rotation in degree
- Axes : axes to which the arrow head should be added
Examples of use:
figure, hold on, grid on, daspect([1, 1, 1])
plot( 0, 0, 'rx'), arrowHead( 0, 0);
plot( 2, 0, 'rx'), arrowHead( 2, 0, Stealth=0.2);
plot( 4, 0, 'rx'), arrowHead( 4, 0, Stealth=0.2, Anchor=0);
plot( 6, 0, 'rx'), arrowHead( 6, 0, Stealth=0.2, Anchor=1);
plot( 8, 0, 'rx'), arrowHead( 8, 0, Stealth=0.2, Anchor="stealth");
plot(10, 0, 'rx'), arrowHead(10, 0, FaceColor='b', FaceAlpha=0.3, EdgeColor='g', LineStyle='-.');
plot(12, 0, 'rx'), arrowHead(12, 0, ArrHeadLen=1.5, ArrHeadWid=0.5);
plot(14, 0, 'rx'), arrowHead(14, 0, Rotation=135, Stealth=0.2);
arrowHead(16, 0, Rotation=35, Stealth=0.2, FaceColor=[0.8, 0, 0], EdgeColor="none", ArrHeadWid=0.8);
Compatibilité avec les versions de MATLAB
Créé avec
R2024a
Compatible avec les versions R2021a et ultérieures
Plateformes compatibles
Windows macOS LinuxTags
Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
| Version | Publié le | Notes de version | |
|---|---|---|---|
| 1.0.0 |
