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
 Hide and show 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
AKazak Posted - 09/03/2020 : 12:21:10 PM
OriginPro 2021 (64-bit) Beta 4 9.8.0.138
Windows 7 Pro x64 SP1

Greetings!

How I temporarily hide the legend instead of deleting it and reconstructing it back again?

Thank you.

---
Andrey
6   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 09/29/2020 : 10:48:42 AM
We will add a button on the layer Mini Toolbar for this.

CP
AKazak Posted - 09/28/2020 : 11:33:02 PM
Please share an update on the topic.

---
Andrey
AKazak Posted - 09/04/2020 : 04:09:13 AM
quote:
Originally posted by cpyang

The legend of a layer is just a text label object, except
1. its name is "legend"
2. it has enabled substitution level > 0

So to access any text object by name, especially if the name include spaces, use the GObject


gobject aa="legend 1";
aa.show=0;


This also allows the label -r command to delete it

label -r aa;


See also
https://www.originlab.com/doc/LabTalk/ref/Graphic-objs#GObject_Variable_Type

CP




OK, great!

Also, is there a toolbar icon causing the legend of the corresponding layer show/hide?
A 20-year old thread on the same topic: https://my.originlab.com/forum/topic.asp?TOPIC_ID=1351 suggests that there is one, but cannot find it.

---
Andrey
cpyang Posted - 09/04/2020 : 02:55:25 AM
The legend of a layer is just a text label object, except
1. its name is "legend"
2. it has enabled substitution level > 0

So to access any text object by name, especially if the name include spaces, use the GObject


gobject aa="legend 1";
aa.show=0;


This also allows the label -r command to delete it

label -r aa;


See also
https://www.originlab.com/doc/LabTalk/ref/Graphic-objs#GObject_Variable_Type

CP

AKazak Posted - 09/04/2020 : 02:02:37 AM
quote:
Originally posted by cpyang

Any object on the graph should have a name, and in the case of legend, the name is typically "legend", so
legend.show=0


To find out about LT code for many toolbar buttons of menu, select by holding Ctrl+SHIFT, and you will find out the legend update button execute the LT
legend -r


CP



Got it!

How do I call the legend object with a name including whitespace, for example, "Legend 1"?

---
Andrey
cpyang Posted - 09/03/2020 : 2:31:53 PM
Any object on the graph should have a name, and in the case of legend, the name is typically "legend", so
legend.show=0


To find out about LT code for many toolbar buttons of menu, select by holding Ctrl+SHIFT, and you will find out the legend update button execute the LT
legend -r


CP

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