MCPcopy Create free account
hub / github.com/cpmech/plotpy / draw_circle

Method draw_circle

src/canvas.rs:266–278  ·  view source on GitHub ↗

Draws circle (2D only) # Input `xc`, `yc` -- center coordinates `r` -- radius

(&mut self, xc: T, yc: T, r: T)

Source from the content-addressed store, hash-verified

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 ///

Callers 3

circle_worksFunction · 0.80
test_inset_axes_3Function · 0.80
test_canvasFunction · 0.80

Calls 1

options_sharedMethod · 0.80

Tested by 3

circle_worksFunction · 0.64
test_inset_axes_3Function · 0.64
test_canvasFunction · 0.64