【发布时间】:2014-07-14 14:10:53
【问题描述】:
我有类似的东西:
set grid xtics lt 0 lw 1 lc rgb "#a9a9a9"
set grid ytics lt 0 lw 1 lc rgb "#a9a9a9"
或没有“xtics”标签的相同,效果很好! 但如果我添加:
unset xtics
然后网格也消失了:(
我怎样才能只有一个网格,没有抽动?
【问题讨论】:
标签: gnuplot
我有类似的东西:
set grid xtics lt 0 lw 1 lc rgb "#a9a9a9"
set grid ytics lt 0 lw 1 lc rgb "#a9a9a9"
或没有“xtics”标签的相同,效果很好! 但如果我添加:
unset xtics
然后网格也消失了:(
我怎样才能只有一个网格,没有抽动?
【问题讨论】:
标签: gnuplot
要隐藏主要刻度,您可以使用set tics scale 0:
set grid
set tics scale 0
plot x
注意,如果有一天您还想使用次要刻度并将其隐藏,则必须使用set tics scale 0,0.001。
【讨论】:
如果你只想让tic标签消失,那么使用set format:
set format x ""
set format y ""
set grid
plot x
如果您也不想要抽动,那么据我所知,您需要一个更复杂的脚本,可能使用迭代器和箭头,例如以下(您必须根据您的xrange 和 yrange 以及您喜欢的箭头样式):
unset xtics
unset ytics
set for [i=-5:5:5] arrow from i,-10 to i,10 nohead
set for [j=-5:5:5] arrow from -10,j to 10,j nohead
plot x
【讨论】: