From 5025f482f430fa6678cf19d77a8da32d93822ea5 Mon Sep 17 00:00:00 2001 From: Pavel Sountsov Date: Sat, 26 Oct 2024 13:04:18 -0700 Subject: [PATCH] Fix fill_between behavior when Between (or no FillRegion) option was made. For some reason, it used to use "closed", but that doesn't do what we want in Gnuplot 5.4 and 6.0. --- gnuplot/src/axes_common.rs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/gnuplot/src/axes_common.rs b/gnuplot/src/axes_common.rs index ed87c39c..88d73b91 100644 --- a/gnuplot/src/axes_common.rs +++ b/gnuplot/src/axes_common.rs @@ -316,23 +316,17 @@ impl PlotElement { if let FillBetween = self.plot_type { - let mut found = false; first_opt! {options, FillRegion(d) => { - found = true; - writer.write_str(match d + match d { - Above => " above", - Below => " below", - Between => " closed", - }); + Above => {writer.write_str(" above");}, + Below => {writer.write_str(" below");}, + Between => (), // This is the default behavior. + } } } - if !found - { - writer.write_str(" closed"); - } } writer.write_str(" fill ");