#350 Order of major and minor gridlines drawing

open
nobody
None
5
2012-11-15
2012-10-31
Justin Gregory
No

I'm running gnuplot 4.7 on OS X 10.7.5, but this bug probably affects all platforms.

The current order for drawing gridlines in 2D plots appears to be:

Major Y-Axis
Minor Y-Axis
Major X-Axis
Minor X-Axis

This causes the minor gridlines for the X axis to be draw on top of the major gridlines of the Y axis. This issue is most likely to show up when using gridlines of different colors/weights in logarithmic plots. The correct order should probably be:

Minor Y-Axis
Minor X-Axis
Major Y-Axis
Major X-Axis

which ensures that all of the major gridlines overlay the minor gridlines.

The following code reproduces the bug. In the correct scenario there should be no blue lines overlaying red lines:

set grid lw 4 lc rgb "#FF0000", lw 2 lc rgb "#0000FF"
set grid mxtics
set grid mytics
set mxtics
set mytics
plot 0 notitle

Discussion

  • This is no bug. Moving it Feature Requests

     
    • labels: 102065 -->