I have 4 points I would like to plot using gnuplot, but with lines. The problem is, I can't find how to highlight these 4 points on the drawn line. I would like for the plot to be a line through the points, but that these points are also clearly marked. An example generated by excel. What I know is either drawing only points, or only a line with no highlighted points. Is a combination possible in gnuplot?
1 Answers
8
votes
From gnuplot docs, define styles as:
set style line 1 lc rgb '#0060ad' lt 1 lw 2 pt 5 ps 1.5 # blue
set style line 2 lc rgb '#dd181f' lt 1 lw 2 pt 7 ps 1.5 # red
...
and plot:
plot ... w lp ls 1 # Use line style 1
where:
lc - linecolor
lt - linetype
lw - linewidth
pt - pointtype
ps - pointsize
w - with
lp - linespoints
ls - linestyle
or one line shorthand:
plot ... w lp lc rgb 'cyan' lw 2 pt 5
line style 1 will produce blue line with square points
plot ... with linespoints
. – Christoph