0

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?

Quasímodo
  • 3,812
  • 14
  • 25

1 Answers1

1

Using the GUI

  1. In the menu bar, go to Window > Drawing objects > Ellipse.
  2. Draw any ellipse in the plotting area.
  3. Click Edit object and select the ellipse.
  4. In the new window, change
    • Position in to World Coordinates.
    • Xcenter to the value of x.
    • Ycenter to the value of y.
    • Width to d.
    • Height to d.
  5. 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