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
 Separate legend for symbol colors
 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 - 02/02/2021 :  2:20:03 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2021b (64-bit) Beta1 9.8.5.53
Windows 7 Pro x64 SP1

Greetings!

I make a scatter graph with few plots with different Plot Symbol each. However, points of each scatter plot are colored using the same indexed color list.
The standard legend describes datasets and therefore Plot Symbols.

What is the best way to insert a separate legend for symbol colors?

Thank you.

---
Andrey

snowli

USA
1391 Posts

Posted - 02/02/2021 :  2:25:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can right click and choose Categorical Values to add symbol color legend.

Thanks, Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/02/2021 :  2:59:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

You can right click and choose Categorical Values to add symbol color legend.

Thanks, Snow



Got it!

This works fine but introduces redundancy.
Can I somehow make two legends: one for Plot Symbol (each plot) and another for Plot Symbol Color?

---
Andrey

Edited by - AKazak on 02/02/2021 3:03:38 PM
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/02/2021 :  3:48:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Please see the following test project:
https://my.originlab.com/ftp/forum_and_kbase/Images/Categorical%20Graph%20Legend.opju

How do I color symbols of the top two legend entries in black?


---
Andrey
Go to Top of Page

snowli

USA
1391 Posts

Posted - 02/03/2021 :  1:55:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

See detailed syntax on https://www.originlab.com/doc/LabTalk/ref/Legend-Substitution-Notation

E.g. You can change the 1st two rows to the following so it shows black color
\l(1, edgecolor:1) %(1X, @L) vs. %(1Y, @L)
\l(2, edgecolor:1) %(2X, @L) vs. %(2Y, @L)

What do you mean by making two legends? If you mean separate legend boxes, you can click the legend box, CTRL+C to copy. Then paste it to another location in graph. Then delete those you don't need.

Legend is basically text object with name "legend" and on Programming tab, the Link to (%, $), substitution level is set to 1.

Thanks, Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/03/2021 :  4:37:01 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

Hi Andrey,

See detailed syntax on https://www.originlab.com/doc/LabTalk/ref/Legend-Substitution-Notation

E.g. You can change the 1st two rows to the following so it shows black color
\l(1, edgecolor:1) %(1X, @L) vs. %(1Y, @L)
\l(2, edgecolor:1) %(2X, @L) vs. %(2Y, @L)

What do you mean by making two legends? If you mean separate legend boxes, you can click the legend box, CTRL+C to copy. Then paste it to another location in graph. Then delete those you don't need.

Legend is basically text object with name "legend" and on Programming tab, the Link to (%, $), substitution level is set to 1.

Thanks, Snow



Dear Snow,

Got it.

A question on syntax: how do I correctly specify the following option (1st line in the table) while skipping PointIndex:

quote:
1=Show Border or Edge color as a block, 2=Show Interior color as a block, 3=Show Pattern Color (or Black) as a block, 4=Show empty Symbol (or special Not Used), 5=Not Used, 6=Not Used, 7=Show actual style.


quote:
Originally posted by snowli
Legend is basically text object with name "legend" and on Programming tab, the Link to (%, $), substitution level is set to 1.
Thanks, Snow



OK, I see.
How do I choose which text object would be updated on Ctrl+L?
Where do I read more on setting Link to (%, $), Substitution Level option (seems to be powerful)?

Thank you.

---
Andrey
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/03/2021 :  4:46:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
How do I choose which text object would be updated on Ctrl+L?
quote:
To ensure that your legend customizations cannot be overwritten by reconstructing:
Rename the legend object. Right-click on the legend and choose Properties. Click on the Programming tab and change Name to something other than "Legend".

https://www.originlab.com/doc/Origin-Help/Legend-ColorScale#Customizing_the_Data_Plot_Legend br /


It seems that Ctrl+L updates only the text object named "Legend".
Also see: https://www.originlab.com/doc/Origin-Help/Ob-Prop-Program-tab

---
Andrey
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/04/2021 :  11:54:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by AKazak

quote:
Originally posted by snowli

Hi Andrey,

See detailed syntax on https://www.originlab.com/doc/LabTalk/ref/Legend-Substitution-Notation

E.g. You can change the 1st two rows to the following so it shows black color
\l(1, edgecolor:1) %(1X, @L) vs. %(1Y, @L)
\l(2, edgecolor:1) %(2X, @L) vs. %(2Y, @L)

What do you mean by making two legends? If you mean separate legend boxes, you can click the legend box, CTRL+C to copy. Then paste it to another location in graph. Then delete those you don't need.

Legend is basically text object with name "legend" and on Programming tab, the Link to (%, $), substitution level is set to 1.

Thanks, Snow



Dear Snow,

Got it.


quote:
Originally posted by snowli
Legend is basically text object with name "legend" and on Programming tab, the Link to (%, $), substitution level is set to 1.
Thanks, Snow



OK, I see.
How do I choose which text object would be updated on Ctrl+L?
Where do I read more on setting Link to (%, $), Substitution Level option (seems to be powerful)?

Thank you.

---
Andrey



---
Andrey
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/04/2021 :  1:01:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
A question on syntax: how do I correctly specify the following option (1st line in the table) while skipping PointIndex:

quote:
1=Show Border or Edge color as a block, 2=Show Interior color as a block, 3=Show Pattern Color (or Black) as a block, 4=Show empty Symbol (or special Not Used), 5=Not Used, 6=Not Used, 7=Show actual style.



---
Andrey
Go to Top of Page

snowli

USA
1391 Posts

Posted - 02/04/2021 :  1:28:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

On Programming tab of the text object, there is name field. Only text object with name "legend" will update when Ctrl+L.

Here is the link to substitution notation
https://www.originlab.com/doc/Origin-Help/Ob-Prop-Program-tab

Thanks, Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/04/2021 :  2:26:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

Hi Andrey,

On Programming tab of the text object, there is name field. Only text object with name "legend" will update when Ctrl+L.

Here is the link to substitution notation
https://www.originlab.com/doc/Origin-Help/Ob-Prop-Program-tab

Thanks, Snow



Got it!

A question on syntax: how do I correctly specify the following option (1st line in the table @ https://www.originlab.com/doc/LabTalk/ref/Legend-Substitution-Notation#Plot_Symbol_Component) while skipping PointIndex:

quote:
1=Show Border or Edge color as a block, 2=Show Interior color as a block, 3=Show Pattern Color (or Black) as a block, 4=Show empty Symbol (or special Not Used), 5=Not Used, 6=Not Used, 7=Show actual style.



---
Andrey
Go to Top of Page

snowli

USA
1391 Posts

Posted - 02/04/2021 :  2:49:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I don't know how this works without specifying point index either. I reported this in ORG-23181. For now you have to use pointindex.



Thanks, Snow

quote:
Originally posted by AKazak

A question on syntax: how do I correctly specify the following option (1st line in the table) while skipping PointIndex:

quote:
1=Show Border or Edge color as a block, 2=Show Interior color as a block, 3=Show Pattern Color (or Black) as a block, 4=Show empty Symbol (or special Not Used), 5=Not Used, 6=Not Used, 7=Show actual style.



---
Andrey

Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/04/2021 :  3:11:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

I don't know how this works without specifying point index either. I reported this in ORG-23181. For now you have to use pointindex.



OK.
What does PointIndex actually correspond to?
Does it work if I previously set up custom formats for individual points?

---
Andrey
Go to Top of Page

snowli

USA
1391 Posts

Posted - 02/04/2021 :  3:20:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
pointindex means the point in plot.

e.g. \l(1,3,2) -- 1st plot, 3rd point, interior color showing as block

U can see in examples table on https://www.originlab.com/doc/LabTalk/ref/Legend-Substitution-Notation

When using \l(1), we actually use 1st point's property. That's why sometimes if it happened the symbol size of 1st point is 0, nothing shows in legend. We improved it in 2021b.

Thanks, Snow


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