arrow#
- arrow(angle=None, length=None, ends=None, type=None)#
Describe arrows to add to a line.
- Parameters:
- anglefloat
The angle of the arrow head in degrees (smaller numbers produce narrower, pointer arrows). Essentially describes the width of the arrow head.
- lengthint
The length of the arrow head (px).
- ends{‘last’, ‘first’, ‘both’}
Indicating which ends of the line to draw arrow heads.
- type{‘open’, ‘closed’}
Indicating whether the arrow head should be a closed triangle.
- Returns:
- FeatureSpec
Arrow object specification.
Examples
1from lets_plot import * 2LetsPlot.setup_html() 3ggplot() + \ 4 geom_segment(x=2, y=10, xend=4, yend=9, \ 5 arrow=arrow(type='closed')) + \ 6 geom_segment(x=3, y=6, xend=3, yend=9, \ 7 arrow=arrow(type='open')) + \ 8 geom_segment(x=4, y=7, xend=5, yend=10, \ 9 arrow=arrow(type='closed', ends='both', length=23)) + \ 10 geom_segment(x=5, y=8, xend=7, yend=7, \ 11 arrow=arrow(type='open', ends='first', angle=120, length=23))