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
 Origin Forum
 Exclude selected plot(s) from legend
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 11/30/2020 :  04:33:36 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2021 (64-bit) 9.8.0.200
Windows 7 Pro x64 SP1

Greetings!

If I prepare crossplots I usually add y=x bisect plot to make comparison easier.
Since the line is obvious I don't need it in the graph legend.
How do I exclude the function plot from the legend, so it does not re-appear upon legend reconstruction?

Thank you.

---
Andrey

YimingChen

1592 Posts

Posted - 11/30/2020 :  09:38:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can use reference line for such purpose, see below:


James
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 11/30/2020 :  09:46:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

You can use reference line for such purpose, see below:
James



Great workaround!
Thank you.

However, in general, is this possible to selectively hide plots from the legend?

---
Andrey
Go to Top of Page

YimingChen

1592 Posts

Posted - 11/30/2020 :  10:48:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You have to manually delete the unwanted legend entry.

James
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 12/01/2020 :  09:56:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

You have to manually delete the unwanted legend entry.

James



Sure, but the deleted item will re-appear once I reconstruct the legend.

---
Andrey
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 06/07/2022 :  07:12:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The option is still required.
Can you share an update on the topic, please?

---
Andrey
Go to Top of Page

snowli

USA
1379 Posts

Posted - 06/07/2022 :  09:05:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Reconstruct legend will remade legend based on what's plotted.

Is there any reason you need to reconstruct legend after you manually choosen some legend not to show?

In Plot Details dialog, if u go to Graph node on the left and choose Legends/Titles, u can set Legend Update Mode to None so when u change data, the legend will not change.

But again reconstruct legend will remake legend.

Thanks, Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 06/07/2022 :  09:52:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

Reconstruct legend will remade legend based on what's plotted.

Is there any reason you need to reconstruct legend after you manually choosen some legend not to show?

In Plot Details dialog, if u go to Graph node on the left and choose Legends/Titles, u can set Legend Update Mode to None so when u change data, the legend will not change.

But again reconstruct legend will remake legend.

Thanks, Snow



Dear Snow,

The problem is that the legend remakes completely even if I call Legend Update, not Reconstruct.

Is there a way to remove few legend entries (rows) and block their recreation on Legend Update?

---
Andrey
Go to Top of Page

snowli

USA
1379 Posts

Posted - 06/07/2022 :  10:15:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

I created ORG-25354 with 2 suggestions.
1. Option to Hide legend for function plots.
2. Option to lock legend so Update Legend will not reconstruct the hidden entries. Again, i suppose Reconstruct Legend should bring them back.

A workaround for now:
Select Legend box and Ctrl+C. Then Ctrl+V. This actually create a Text object called "Text". Remove Entries from this Text object.
Go to Object Manager dialog.
Right click top node and choose Show Graph Objects.
Uncheck legend box so it will be hidden

Now try reconstruct or update legend. It will only update the hidden legend box. It will not affect your "Text object"

Thanks, Snow

Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 06/07/2022 :  11:52:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

Hi Andrey,

I created ORG-25354 with 2 suggestions.
1. Option to Hide legend for function plots.
2. Option to lock legend so Update Legend will not reconstruct the hidden entries. Again, i suppose Reconstruct Legend should bring them back.

A workaround for now:
Select Legend box and Ctrl+C. Then Ctrl+V. This actually create a Text object called "Text". Remove Entries from this Text object.
Go to Object Manager dialog.
Right click top node and choose Show Graph Objects.
Uncheck legend box so it will be hidden

Now try reconstruct or update legend. It will only update the hidden legend box. It will not affect your "Text object"

Thanks, Snow



Dear Snow,

Seems to be a viable workaround.

A side question on Origin internals: how does original Legend object differ from its clone Text object? In other words: how does Origin identify and get the reference to the original Legend object?

---
Andrey
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 06/07/2022 :  12:03:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by AKazak

A side question on Origin internals: how does original Legend object differ from its clone Text object? In other words: how does Origin identify and get the reference to the original Legend object?

---
Andrey



Only by the name of the object. If you rename the legend, a new one will be created, that is why Snow's workaround is to keep it but hide it.

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 06/07/2022 :  10:25:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

quote:
Originally posted by AKazak

A side question on Origin internals: how does original Legend object differ from its clone Text object? In other words: how does Origin identify and get the reference to the original Legend object?

---
Andrey



Only by the name of the object. If you rename the legend, a new one will be created, that is why Snow's workaround is to keep it but hide it.

CP




Got it.
Thanks.
---
Andrey

Edited by - AKazak on 06/07/2022 10:26:04 PM
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