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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 command for drawing a circle to a graph

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
hansigold Posted - 06/10/2014 : 04:37:32 AM
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.
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 06/10/2014 : 09:19:34 AM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000