Draws circle (2D only) # Input `xc`, `yc` -- center coordinates `r` -- radius
(&mut self, xc: T, yc: T, r: T)
| 264 | /// * `xc`, `yc` -- center coordinates |
| 265 | /// * `r` -- radius |
| 266 | pub fn draw_circle<T>(&mut self, xc: T, yc: T, r: T) |
| 267 | where |
| 268 | T: std::fmt::Display + Num, |
| 269 | { |
| 270 | let opt = self.options_shared(); |
| 271 | write!( |
| 272 | &mut self.buffer, |
| 273 | "p=pat.Circle(({},{}),{}{})\n\ |
| 274 | plt.gca().add_patch(p)\n", |
| 275 | xc, yc, r, &opt |
| 276 | ) |
| 277 | .unwrap(); |
| 278 | } |
| 279 | |
| 280 | /// Draws triangles (2D only) |
| 281 | /// |