How to draw a circle in Xmgrace with center in (x,y)
and diameter d
? One way is to create sets from two functions. For example, -(1-x^2)^0.5
and (1-x^2)^0.5
, but are there alternatives?
Asked
Active
Viewed 154 times
1 Answers
1
Using the GUI
- In the menu bar, go to
Window > Drawing objects > Ellipse
. - Draw any ellipse in the plotting area.
- Click
Edit object
and select the ellipse. - In the new window, change
Position in
toWorld Coordinates
.Xcenter
to the value ofx
.Ycenter
to the value ofy
.Width
tod
.Height
tod
.
- Click
Accept
.
From a batch file
Save this batch.xmg
:
WITH ELLIPSE 0
ELLIPSE ON
ELLIPSE LOCTYPE WORLD
ELLIPSE 0,0,1,1
ELLIPSE DEF
The ELLIPSE 0,0,1,1
line defines the x0,y0,x1,y1
of the circle. So that is a circle centered in (0.5, 0.5)
and of diameter 1.
Now execute
xmgrace -nosafe -batch batch.xmg

Quasímodo
- 3,812
- 14
- 25