Menu

Gnuplot 5.0p1 grid lines major and minor with different linetypes

gnutron
2015-08-23
2015-08-23
  • gnutron

    gnutron - 2015-08-23

    I'm having trouple with setting different linestyles for the major and minor grid lines...

    Code:

    reset
    set terminal pdfcairo enhanced size 6,4
    set output 'graph.pdf'

    set style line 101 dt 1 lc "red"
    set style line 102 dt 1 lc "gray"
    set grid mxtics mytics ls 101, ls 102

    set xrange [3:50]
    set yrange [1:4]
    set mxtics 5
    set mytics 5

    set xlabel 'x'
    set ylabel 'y'

    unset key

    plot 0.1*x

    reset
    set term wxt
    set out

    This just gives the minor gray lines; the major lines don't even show up. Am I doing something wrong?

    Thanks!

     
  • gnutron

    gnutron - 2015-08-23

    Oops, I figured it out. Should have done:

    set grid xtics ytics mxtics mytics linestyle 101, linestyle 102

     

    Last edit: gnutron 2015-08-23

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.