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
 Changing the rotation angle of data annotations

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
redman Posted - 10/24/2014 : 07:59:40 AM
Origin Ver. and Service Release (Select Help-->About Origin): 9.1SR3
Operating System:Winsdows 7

Is there a way to change the default rotation angle (or alignment) of data annotations or text labels by LabTalk?
By default, the text lable and data annotation are horizontally aligned. Although I can change one of the label then use the format copy and paste to reset other labels/annotations, I wonder if there is a more efficient way to do so.
I tried "set -qr 90", however it showed "#Command Error!" no mater the labels were created by a label column or by the data annotation tool.

Best regards,

Redman
3   L A T E S T    R E P L I E S    (Newest First)
SeanMao Posted - 10/27/2014 : 06:34:45 AM
Hi,

I just found out there is simple way you can save the rotation angle as default so all annotated labels will be shown in saved rotation angle as you have described.

To do so, create an arbitrary text label on one graph, right click on that text label and select "Properties" to open Object Properties dialog. Change Rotate (deg.) to 45 for instance, then click Set Default button and close the dialog.

The Set Default button is what you actually looking for. Cheers!

Regards!

Sean
redman Posted - 10/27/2014 : 06:12:50 AM
Dear SeanMao,

It helps a lot, many thanks! In the future version, is it possible to set a defaut customized angle? For example, I want to add a few peak labels with the data annotation tool, and I want the labels are vertically aligned. I wish to set the defaut rotation angle first, and then just mouse clicks!

Regards,

Redman
SeanMao Posted - 10/26/2014 : 11:15:09 PM
Hi Redman,

The syntax changing the rotation of text label or data label is set name -tr/-qr angle.

If you are using data label and all your plots in active graph layer are grouped, you can simply use set %C -qr angle to change all data labels' rotation angles in active layer where build-in string register %C is the name of current active dataset.

If the plots in active layer are independent and you want to change the rotation angle of one of the plots, use the following code:

range rr = [Graph1]Layer1!1; // For first plot in first layer in
                             // graph window Graph1
set rr -qr 90;


If you have a text label plot where you have label column (Designation Label) in column C for example, you can change the rotation of text labels by:

range rr = [Book1]Sheet1!C; //Label column in Book1 and Sheet1 
                            //Column C
set rr -tr 90;


If you want to change the rotation angle of added annotations, you can use the following commands for graphic objects:

Text.rotate = 30; // If the added text object's name is Text
                  // Right click to find object's name in 
                  // Programming Control dialog


For details about range notations, please refer to link below:
http://www.originlab.com/doc/LabTalk/Tutorials/Tutorial-Range-Notation

Regards!

Sean

OriginLab Technical Service

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