#350 Order of major and minor gridlines drawing


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


  • Hans-Bernhard Broeker

    This is no bug. Moving it Feature Requests

  • Hans-Bernhard Broeker

    • labels: 102065 -->

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks