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
 Origin Forum
 Positioning legend

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
Tagge2001 Posted - 08/28/2009 : 7:03:04 PM
Origin Ver. and Service Release (Select Help-->About Origin): 8 SR6
Operating System: Win Xp SP3

Hello,

it's me again. I have another question. Is there a way to position legends automatically. So that the legend is on top of the diagramm with a certain distance.

Do I have to use a script for that?

Regards

Tagge
3   L A T E S T    R E P L I E S    (Newest First)
Tagge2001 Posted - 08/31/2009 : 6:09:27 PM
Hello,

thanks for your answers! That's great.

I have another question. Now that I know how to position the legend, I tried to find something about the borders of the legend. I looked in the LabTalk documentation and found all sorts of stuff but not if there's a way to find out only the width and height of the legend Text + symbols, so that I can set the disctance between text and border automatically. Is that possible.

Regards

Tagge
greg Posted - 08/31/2009 : 11:33:02 AM
Larry's solution will only work in Origin 8.1.

You can use script to position the Legend relative to the Layer. The trick is that you must temporarily switch the Layer units to match the Legend and Page. Here is an example that positions the Legend at the top of the layer, flush to the right side of the layer:

temp = LAYER.UNIT; // Save the current Layer units
LAYER.UNIT = 5; // Set to pixels (actually device dots)
Legend.TOP = LAYER.TOP - Legend.HEIGHT; // At Layer top
Legend.LEFT = LAYER.LEFT + LAYER.WIDTH - Legend.WIDTH;
LAYER.UNIT = temp; // Restore Layer units

This must be done AFTER any changes to the Legend text.
larry_lan Posted - 08/31/2009 : 03:43:45 AM
Hi Tagge:

You can use the Object Edit toolbar. It's somewhat tricky here. How to aligne the legend depends on how you click the objects.

Supposed the is a graph legend and a data plot on the page, follow these steps:



Once you click any alignment button on Object Edit toolbar, say vertical center, the legend, which you click first, will be aligned according to the data plot (second click).

Thanks
Larry
OriginLab Technical Services

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