简体   繁体   English

如何在 Xmgrace 中画圆

[英]How to draw a circle in Xmgrace

How to draw a circle in Xmgrace with center in (x,y) and diameter d ?如何在 Xmgrace 中绘制圆心在(x,y)和直径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?例如, -(1-x^2)^0.5(1-x^2)^0.5 ,但有替代方案吗?

Using the GUI使用图形用户界面

  1. In the menu bar, go to Window > Drawing objects > Ellipse .在菜单栏中,转到Window > Drawing objects > Ellipse
  2. Draw any ellipse in the plotting area.在绘图区域绘制任何椭圆。
  3. Click Edit object and select the ellipse.单击Edit object并选择椭圆。
  4. In the new window, change在新窗口中,更改
    • Position in to World Coordinates . Position inWorld Coordinates
    • Xcenter to the value of x . Xcenterx的值。
    • Ycenter to the value of y . Ycentery的值。
    • Width to d . Widthd
    • Height to d . Heightd
  5. Click Accept .单击Accept

From a batch file从批处理文件

Save this batch.xmg :保存这个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. ELLIPSE 0,0,1,1线定义了圆的x0,y0,x1,y1 So that is a circle centered in (0.5, 0.5) and of diameter 1.所以这是一个以(0.5, 0.5)为中心、直径为 1 的圆。

Now execute现在执行

xmgrace -nosafe -batch batch.xmg 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM