Menu

#2524 Different order for variable ps and pt since 5.4 ?

None
closed-fixed
nobody
2022-07-11
2022-05-20
theozh
No

Since gnuplot 5.2.0 there is the possibility to have variable pointsize, pointtype and color.

According to documentation (5.2.0 and 5.4) the order is fixed ps:pt:color and color is always last.

However, apparently since gnuplot 5.4.0 this order was changed.

Either it was
a) an unintentional change or
b) an intentional change
In any case, the documentation in 5.4 is not matching reality.

It is a bit unfortunate, that the script will give different results in 5.2 and 5.4.
Since 5.2 I was wondering why the sequence is in fixed order ps:pt:color instead of in the same order as the different var appear afterwards, i.e. w p pt var ps var lc rgb var would be different compared to lc rgb var pt var ps var.

### different order pf pt:ps in 5.2 and 5.4???
reset session

$Data <<EOD
# x  y  ps  pt   color
  1  1   1     1   0xff0000
  2  1   1.5   3   0x00ff00
  3  1   2     5   0x0000ff
  4  1   2.5   7   0xff00ff
  5  1   3     9   0xffff00
  6  1   3.5  11   0x00ffff
EOD 

set offsets 0.5,0.5,0.5,0.5

set multiplot layout 2,1
    plot $Data u 1:2:3:4:5 w p ps var pt var lc rgb var
    plot $Data u 1:2:4:3:5 w p ps var pt var lc rgb var   # cols 3 and 4 swapped
unset multiplot
### end of script
2 Attachments

Discussion

  • Ethan Merritt

    Ethan Merritt - 2022-05-22

    The 2D data input code was massively reworked between 5.2 and 5.4; this bug was probably an unintended change of that rearrangement. Note that the mix-up only affected 2D plots with plot style points, linespoints, or labels. The equivalent 3D plots work as documented.

    For consistency with older versions and with the 3D code, I have changed the interpretation of input column order for both stable and development versions (5.4 and 5.5) to match the documentation.

    While testing the revised code I noticed another bug. If you used pointtype variable with plot style labels it worked for numerical point types but yielded a point type that was off by one; e.g. a 6 in the data file produced a point with point type 7. That is now fixed also.

     
  • Ethan Merritt

    Ethan Merritt - 2022-05-22
    • status: open --> pending-fixed
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2022-07-11
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.