How do I set grid spacing in gnuplot

前端 未结 2 2056
伪装坚强ぢ
伪装坚强ぢ 2021-02-15 12:41

I have yaxis from 0 to 100. I want a grid line after every 10 units. How can I do that? That is, how can I draw grid lines after each 10 units?

2条回答
  •  轮回少年
    2021-02-15 13:27

    The ytics variable controls how often or sparse the y scale values will be printed and thus the grid lines will be drawn.

    set ytics 10  # y scale marks and values will be at every 10th unit
    set grid      # grid turned on at each scale values
    replot        # replot your graph
    

    The mytics controls the minor marks on the y scale. The set grid mytics makes the y scale minor grid lines visible.

提交回复
热议问题