Gnuplot: plot with circles of a defined radius

Eddy picture Eddy · Jul 31, 2012 · Viewed 24.5k times · Source

I know on gnuplot you can plot some data with circles as the plot points:

plot 'data.txt' using 1:2 ls 1 with circles

How do I then set the size of the circles? I want to plot several sets of data but with different size circles for each data set.

Answer

andyras picture andyras · Jul 31, 2012

If you have a third column in your data, the third column specifies the size of the circles. In your case, you could have the third column have the same value for all the points in each data set. For example:

plot '-' with circles
1 1 0.2
e

will plot a circle at (1,1) with radius 0.2. Note that the radius is in the same units as the data. (The special file name '-' lets you input data directly; typing 'e' ends the input. Type help special at the gnuplot console for more info.)

You can look here for more ideas of how to use circles.