ExpertNoob
ExpertNoob

Reputation: 167

Customize a GnuPlot grid line

It's all in the subject.

How to customize a particular grid line in a Gnuplot (v4.6) graph ?

Any hints appreciated.

Upvotes: 2

Views: 3555

Answers (1)

mgilson
mgilson

Reputation: 309831

Do you want to customize the appearance of each line in the grid? if so, you can use all the normal mechanics of creating and using linestyles:

set style line 100 lt 1 lc rgb "red" lw 2
set grid ls 100
plot sin(x)

However, if you want to customize a single line, you can't do that. The best thing I can think of is putting another line (headless arrow) on top:

set grid
set style line 100 lt 1 lc rgb "red" lw 2
set arrow 100 from 0,-1 to 0,1 nohead ls 100 front
plot sin(x)

Note that you can position the arrow in different coordinate systems as well:

set arrow 100 from graph 0.5,0 to graph 0.5,1 nohead ls 100 front

Upvotes: 15

Related Questions