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
 Separate legend for symbol colors

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 - 02/02/2021 : 2:20:03 PM
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
13   L A T E S T    R E P L I E S    (Newest First)
snowli Posted - 02/04/2021 : 3:20:56 PM
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


AKazak Posted - 02/04/2021 : 3:11:21 PM
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
snowli Posted - 02/04/2021 : 2:49:20 PM
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

AKazak Posted - 02/04/2021 : 2:26:21 PM
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
snowli Posted - 02/04/2021 : 1:28:03 PM
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
AKazak Posted - 02/04/2021 : 1:01:37 PM
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
AKazak Posted - 02/04/2021 : 11:54:00 AM
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
AKazak Posted - 02/03/2021 : 4:46:52 PM
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
AKazak Posted - 02/03/2021 : 4:37:01 PM
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
snowli Posted - 02/03/2021 : 1:55:59 PM
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
AKazak Posted - 02/02/2021 : 3:48:44 PM
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
AKazak Posted - 02/02/2021 : 2:59:05 PM
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
snowli Posted - 02/02/2021 : 2:25:00 PM
You can right click and choose Categorical Values to add symbol color legend.

Thanks, Snow

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