Menu

#1568 behavior of "filledcurves y2=..."

None
closed-fixed
nobody
None
2016-02-04
2015-02-23
No

I think the behavior of "with filledcurves" differs from the document.
The document says:

filledcurves y2=42 ... line y=42 (at y2 axis) ie parallel to x2, etc,

but, in fact, gnuplot-5.0 and current CVS version

set yrange [0:10]
set y2range [0:20]
set y2tics
plot [0:10] x with filledcurves y2=5

fill between the graph of "x" and y=5 on "y1" axis, not on "y2" axis.

1 Attachments

Discussion

  • Christoph Bersch

    If you plot against the y2 axis with axes x1y2 you get the correct result.

    plot [0:10] x axis x1y2 with filledcurves y2=5
    

    But I don't know, if the documentation should be adapted, or if the situation you have should indeed be possible.

     
  • Ethan Merritt

    Ethan Merritt - 2015-02-26

    It makes sense that data plotted against the y1 axis can only be clipped against the y1 axis, and data plotted against y2 can only be clipped against y2.

    But if we accept this then I do not see any need for the filledcurves style to have both "y1=..." and "Y2=..." as keyword options. It would be sufficient to have "y=...", where y is either either y1 or y2 depending on which axis the plot uses.

     
  • Shigeharu TAKENO

    It would be sufficient to have "y=...", where y is either either y1 or y2
    depending on which axis the plot uses.

    I agree with you.

     
  • Ethan Merritt

    Ethan Merritt - 2015-03-03
    • status: open --> pending
     
  • Ethan Merritt

    Ethan Merritt - 2015-03-03

    OK. I have changed the code to accept "y=..." and changed the documentation to mention only that option. The older syntax is still accepted.

     
  • Ethan Merritt

    Ethan Merritt - 2015-03-17
    • status: pending --> closed-fixed
     
  • Karl Ratzsch

    Karl Ratzsch - 2015-09-02

    This seems to have messed up filledcurves for data plots:

     plot "+" us 1:(5-$1**2) w filledc y=1
    

    makes no output in version 5.0.1. Used to work (with "y1=1") in v500.

    (update: i sprang to the first option, but there were a halfdozen changes around "filledcurves" between patchlevels 0 and 1)

     

    Last edit: Karl Ratzsch 2015-09-02
  • Ethan Merritt

    Ethan Merritt - 2015-09-03

    I confirm that there is a failure of backwards compatibility. It looks to me that the old behavior did not fully match the documentation either (the x1= and x2= options have no effect) but lets leave that aside for now.

    I think the attached patch restores the previous behaviour that 2-column data plots honor the y=<val> keyword. It also adds a statement to the docs noting that 3-column data plots ignore the extra keyword, since the value in the 3rd column is used instead.</val>

    Please test

     
  • Ethan Merritt

    Ethan Merritt - 2015-09-03
    • status: closed-fixed --> open
    • Group: -->
    • Priority: 5 -->
     
  • Ethan Merritt

    Ethan Merritt - 2016-02-04
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB