more debug for gnuplot
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 27 Jun 2023 20:39:06 +0000 (22:39 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 28 Jun 2023 06:59:07 +0000 (08:59 +0200)
lib/MojoFacets/Gnuplot.pm

index 57dd423..2363fe1 100644 (file)
@@ -39,8 +39,10 @@ sub index {
                $timefmt_x =~ s/[ T]%H/\\n%H/;
 
                my $spaces = $timefmt;
-               $spaces =~ s/\S//g;
+               $spaces =~ s/\S+//g;
+warn "# spaces: [$spaces]",dump( $spaces );
                $spaces = length( $spaces );
+warn "# spaces: $spaces";
 
                my @plot;
                foreach ( 1 .. $#$columns ) {
@@ -79,7 +81,7 @@ set format x "$timefmt_x"
                $g .= "\n\nplot " . join(',', @plot) . "\n";
                $g =~ s/\n\n+/\n/sg;
 
-#warn "gnuplot $g";
+warn "gnuplot $g";
 
                open(my $gnuplot, '|-', 'gnuplot') || die "gnuplot $!";
                print $gnuplot $g;