From 687e59b81e38952eb9eeaa062daf40f664582386 Mon Sep 17 00:00:00 2001 From: Jaimos Skriletz Date: Sun, 9 Nov 2025 15:56:50 -0700 Subject: [PATCH] Allow plotting Fy = 0 in plots. Since 0 returns false, the logic to ensure Fy was defined was incorrect, and needs to check Fy is not the empty string. --- lib/Plots/Data.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Plots/Data.pm b/lib/Plots/Data.pm index 2f6a07c383..35c10f7f24 100644 --- a/lib/Plots/Data.pm +++ b/lib/Plots/Data.pm @@ -225,7 +225,7 @@ sub set_function { $f->{"x$key"} = $options{$key}; delete $options{$key}; } - return unless $f->{Fy}; + return unless $f->{Fy} ne ''; $f->{Fx} = $self->get_math_object($f->{Fx}, $f->{xvar}, $f->{yvar}); $f->{Fy} = $self->get_math_object($f->{Fy}, $f->{xvar}, $f->{yvar});