The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 command for drawing a circle to a graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

hansigold

1 Posts

Posted - 06/10/2014 :  04:37:32 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): ORIGIN 8.6.0G (32-bit) Sr1
Operating System: Windows 7

Hello,

I'm searching for a command that draws an circle in an existing graph.

For example:

draw circle;

Is there any command available without using toolbox? I find only a way to draw lines automatically. But the point of interest is the drawing of a circle.

Thank you for your help.

greg

USA
1378 Posts

Posted - 06/10/2014 :  09:19:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You hit on the right command (draw) which can be used to save and load annotation objects like circles, rectangles, arrows, etc.

We don't ship a circle object file so you will need to make one manually and save it. Then you can make a circle via script at any time.

First use the toolbar to draw a circle on your graph.
Edit the properties to be the way you want.
Alt+DoubleClick on the circle to note its Object Name. (It's always "circle" for the first circle drawn.)
Now save the circle object with this script:

// circle is the object name
// MyCircle is the filename (an OGO extension is used and ignored here)
draw -n circle -f save MyCircle;

Anytime you need a circle, use this:
draw -n MyCirc1 -f read MyCircle;

You need to manage your names (here MyCirc1) to avoid conflicts with existing objects in the layer into which you are drawing. Doing so enables you to address the object like this:
mycirc1.dx=400; // Set width - scale units
mycirc1.dy=100; // Set height - scale units
mycirc1.x=800; // Set centerX - scale units
mycirc1.y=150; // Set centerY - scale units
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000