Draws arrow (2D only) # Input `xi`, `yi` -- start point `xf`, `yf` -- end point Use [`set_arrow_style`](Self::set_arrow_style) and [`set_arrow_scale`](Self::set_arrow_scale) to configure.
(&mut self, xi: T, yi: T, xf: T, yf: T)
| 240 | /// |
| 241 | /// Use [`set_arrow_style`](Self::set_arrow_style) and [`set_arrow_scale`](Self::set_arrow_scale) to configure. |
| 242 | pub fn draw_arrow<T>(&mut self, xi: T, yi: T, xf: T, yf: T) |
| 243 | where |
| 244 | T: std::fmt::Display + Num, |
| 245 | { |
| 246 | let opt_shared = self.options_shared(); |
| 247 | let opt_arrow = self.options_arrow(); |
| 248 | write!( |
| 249 | &mut self.buffer, |
| 250 | "p=pat.FancyArrowPatch(({},{}),({},{})\ |
| 251 | ,shrinkA=0,shrinkB=0\ |
| 252 | ,path_effects=[pff.Stroke(joinstyle='miter')]\ |
| 253 | {}{})\n\ |
| 254 | plt.gca().add_patch(p)\n", |
| 255 | xi, yi, xf, yf, &opt_shared, &&opt_arrow, |
| 256 | ) |
| 257 | .unwrap(); |
| 258 | } |
| 259 | |
| 260 | /// Draws circle (2D only) |
| 261 | /// |