drawing a circle of radius R around a point

shn picture shn · Jun 21, 2012 · Viewed 28k times · Source

I'm using gnuplot, and I wonder if it is possible to draw a circle of radius R around a given point (x,y) ?

Answer

andyras picture andyras · Jun 21, 2012

If you don't want to graph a circle, you can use the set object circle command. You use it like this, for example:

set object X circle at axis 0,0 size scr 0.1 fc rgb "navy"

This will draw a navy blue circle at the origin with a radius of 0.1 of the screen (canvas) size. Note that when you specify a position/radius for the circle you have to specify which coordinate system you are using: first corresponds to the first x-y coordinate system, scr (short for screen) is for screen coordinates. You can learn more by looking in the documentation for drawing circles.