Menu

#2592 gnuplot 5.4 regression(?): smooth acsplines w filledcurves

None
closed-fixed
nobody
None
2023-05-19
2023-03-07
No

It seems like the plot style filledcurves does no longer cooperate with the smoothing option acsplines since the release of the 5.4 series, as it had before (at least) in the 5.2 series.

MWE: pl "< echo '5\n1\n2\n6'", "" u 0:1:(1) smooth acsplines w filledcurves

Result with gnuplot v5.4.1 and v5.4.6 (Linux): Failure

gnuplot> pl "< echo '5\n1\n2\n6'", "" u 0:1:(1) smooth acsplines w filledcurves
                                              ^
         Can't calculate approximation splines, all weights have to be > 0

Result with gnuplot v5.2.6 and v5.2.8 (Linux): Expected behaviour

  6 +---------------------------------------------------+   
    |        +       +        +        +       +        |   
    |                     "< echo '5\n1\n2\n6'"    A    |   
  5 |-+                            "" u 0:1:(1) #######-|   
    |                                                ###|   
    |                                  XXXXXXXXXXX####  |   
  4 |-+              XXXXXXXXXXXXXXXXXXXXXXXXX####    +-|   
    |###XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX####          |   
  3 |-+#######XXXXXXXXXXXXXXXXXXXXXX######            +-|   
    |        ########################                   |   
    |                                                   |   
  2 |-+                                A              +-|   
    |                                                   |   
    |        +       +        +        +       +        |   
  1 +---------------------------------------------------+   
    0       0.5      1       1.5       2      2.5       3   

Unfortunately I don't have other/older gnuplot versions at hand to contribute more insights over the history of this behaviour change.

There was a related request on StackOverflow: https://stackoverflow.com/q/60259211 with a solution that included tabulating the acsplines data. Its MWE works on the 5.2 and 5.4 series of gnuplot. I'd still like gnuplot to not lose viable features over time.

What puzzled me during early diagnosis, was that the error message is wrong/misleading for humans. Apparently, the weights (or at least what I have thought the weight column would be for the acsplines modifier) are non-zero everywhere, still the spline algorithm complains.

It appears like the two options compete for the third data column. Apparently, in the old version (5.2 and earlier) acsplines was “strong” enough to claim the column for itself, and filledcurves was not interested in that column. But now it seems like filledcurves got “greedy” and does no longer let acsplines read a spline weight. Specifying an explicit opposite end for curve filling via filledcurves x1, e. g., does not solve the issue. Adding a fourth column does not solve the issue.

Is this a known/intentional limitation of the new code, or an accidental regression?

Discussion

  • Ethan Merritt

    Ethan Merritt - 2023-03-07
    • status: open --> pending-fixed
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2023-03-07

    It seems to be a casualty of refactoring the plot-specific column interpretation that happened between 5.2 and 5.4. It was later fixed in the development version 5.5 as part of further refactoring to handle additional smoothing options and more filledcurves variants. So only 5.4 was affected.

    Fixed now for the next patchlevel update of 5.4

     
  • Ethan Merritt

    Ethan Merritt - 2023-05-19
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB