diff --git a/src/curve.rs b/src/curve.rs index 90e4331..6f0d044 100644 --- a/src/curve.rs +++ b/src/curve.rs @@ -473,13 +473,6 @@ impl Curve { /// Returns options for curve fn options(&self) -> String { - // fix color if marker is void - let line_color = if self.marker_void && self.line_color == "" { - "red" - } else { - &self.line_color - }; - // output let mut opt = String::new(); @@ -492,8 +485,8 @@ impl Curve { if self.line_alpha > 0.0 { write!(&mut opt, ",alpha={}", self.line_alpha).unwrap(); } - if line_color != "" { - write!(&mut opt, ",color='{}'", line_color).unwrap(); + if self.line_color != "" { + write!(&mut opt, ",color='{}'", self.line_color).unwrap(); } if self.line_style != "" { write!(&mut opt, ",linestyle='{}'", self.line_style).unwrap(); diff --git a/tests/test_curve.rs b/tests/test_curve.rs index 8e185e5..2de23c7 100644 --- a/tests/test_curve.rs +++ b/tests/test_curve.rs @@ -20,15 +20,15 @@ fn test_curve() -> Result<(), StrError> { .set_marker_void(false) .set_marker_line_color("#cda500") .set_marker_line_width(3.0) - .set_marker_size(8.0) + .set_marker_size(15.0) .set_marker_style("p"); // another curve let mut curve2 = Curve::new(); curve2 .set_line_style("None") - .set_marker_line_color("#1862ab") - .set_marker_style("8") + .set_marker_style("o") + .set_marker_size(20.0) .set_marker_void(true); let mut curve3 = Curve::new();