Skip to content

Commit

Permalink
Fix Pie::new() doctest; did not compile
Browse files Browse the repository at this point in the history
  • Loading branch information
fotonick committed Sep 27, 2024
1 parent 7024adc commit 1cd49ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plotters/src/element/pie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ impl<'a, Label: Display> Pie<'a, (i32, i32), Label> {
/// Default is set to start at 0, which is aligned on the x axis.
/// ```
/// use plotters::prelude::*;
/// let mut pie = Pie::new(&(50,50), &10.0, &[50.0, 25.25, 20.0, 5.5], &[RED.to_rgba(), BLUE.to_rgba(), GREEN.to_rgba(), WHITE.to_rgba()], &["Red", "Blue", "Green", "White"]);
/// let colors = [RED.to_rgba(), BLUE.to_rgba(), GREEN.to_rgba(), WHITE.to_rgba()];
/// let mut pie = Pie::new(&(50,50), &10.0, &[50.0, 25.25, 20.0, 5.5], &colors, &["Red", "Blue", "Green", "White"]);
/// pie.start_angle(-90.0); // retract to a right angle, so it starts aligned to a vertical Y axis.
/// ```
pub fn start_angle(&mut self, start_angle: f64) {
Expand Down

0 comments on commit 1cd49ec

Please sign in to comment.