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 for Programming
 LabTalk Forum
 legend formating

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
kdsaransh Posted - 04/19/2015 : 12:44:14 PM
Hi ,

I am using origin 9.1

I have a graph having two layer. I can change the color of the layer independently but cannot modify the individual legends. Both the legends are changed together. I don't know whats wrong.
I am using the below code:

layer -gu;

layer1.plot = 1; //Activate the first plot in layer1
set %C -c color(blue);
legend.fsize = 28;
legend.color = color(blue);

layer1.plot = 2; //Activate the first plot in layer1
set %C -c color(cyan);
legend.fsize = 20;
legend.color = color(cyan);
2   L A T E S T    R E P L I E S    (Newest First)
kdsaransh Posted - 04/20/2015 : 03:04:57 AM
Thanks a lot....
SeanMao Posted - 04/20/2015 : 02:49:27 AM
Hi,

"Legend" object controls the properties of all legend entries rather than individual ones.

You can only set the text color for each legend entry through substitution notation as following:

layer -gu; 

layer1.plot = 1; //Activate the first plot in layer1
set %C -c color(blue);

layer1.plot = 2; //Activate the second plot in layer1
set %C -c color(cyan);

legend.fsize = 28; // Set Legend entry text size
Legend.text$="\l(1) \c4(%(1))"+ char(10)$+"\l(2) \c5(%(2))"; // Set legend entry color


where syntax \cColor Index is used to color each legend entry.

You can use color(blue)=; to check the color index of color blue. \c4() is to color as blue, \c5() is to color entry as cyan.

Legend entry color to follow data plot color is a feature will be implemented in our next release Origin 2016.

Regards!

Sean

OriginLab Tech. Service



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