How to make scatter plots with transparent points

Dd H picture Dd H · Dec 30, 2015 · Viewed 15.6k times · Source

enter image description here

How can I plot an image with partial transparent scatter points just like in this picture with gnuplot? The problem is I don't know how to set the points to be transparent.

Answer

F. Knorr picture F. Knorr · Dec 30, 2015

Try this:

set style fill  transparent solid 0.35 noborder
set style circle radius 0.02
plot 'test' u 1:2 with circles lc rgb "blue", \
     '' u 1:2 every 100 w circles lc rgb "red" fs solid 1.0 border lt -1

which outputs enter image description here

As you can see, you can specify for each data set whether to use transparency and which color to use.
If your data consist of two values (x and y position of the circle) you have to specify the circle's radius via set style circle .... If your data has three rows, you can use the third value to specify the circle's radius for each data point.
You can play with the transparency level, which ranges from 0 (full transparency) to 1 (no transparency).