53
votes

How to change point size and shape and color in gnuplot.

plot "./points.dat" using 1:2 title with dots

I am using above command to plot graph ,but it shows very small size points.

I tried to use command

set pointsize 20

but still point size is same.

3

3 Answers

74
votes

Use the pointtype and pointsize options, e.g.

plot "./points.dat" using 1:2 pt 7 ps 10  

where pt 7 gives you a filled circle and ps 10 is the size.

See: Plotting data.

8
votes

The pointsize command scales the size of points, but does not affect the size of dots.

In other words, plot ... with points ps 2 will generate points of twice the normal size, but for plot ... with dots ps 2 the "ps 2" part is ignored.

You could use circular points (pt 7), which look just like dots.

0
votes

plot "./points.dat" using 1:2 title with dt 2 lw 4