Struct plotpy::Curve [−][src]
pub struct Curve {}Show 13 fields
pub line_alpha: f64, pub line_color: String, pub line_style: String, pub line_width: f64, pub marker_alpha: f64, pub marker_color: String, pub marker_every: i32, pub marker_is_void: bool, pub marker_line_color: String, pub marker_line_style: String, pub marker_line_width: f64, pub marker_size: f64, pub marker_style: String, // some fields omitted
Expand description
Generates a curve (aka line-plot) given two arrays (x,y)
Note
This struct corresponds to the plot function of Matplotlib.
Examples
use plotpy::*; let x = &[1.0, 2.0, 3.0, 4.0, 5.0]; let y = &[1.0, 4.0, 9.0, 16.0, 25.0]; let mut plot = Plot::new(); let mut curve = Curve::new(); curve.line_style = "-".to_string(); curve.marker_style = "*".to_string(); curve.draw(x, y); plot.add(&curve); plot.save("/tmp/plotpy", "example_curve", "svg");
Fields
line_alpha: f64
alpha (0, 1]. A<1e-14 => A=1.0
line_color: String
color
line_style: String
style
line_width: f64
width
marker_alpha: f64
alpha (0, 1]
marker_color: String
color
marker_every: i32
mark-every
marker_is_void: bool
void marker (draw edge only)
marker_line_color: String
edge color
marker_line_style: String
edge style
marker_line_width: f64
edge width
marker_size: f64
size
marker_style: String
type, e.g., “o”, “+”