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 properties

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 - 12/31/2014 : 03:58:22 AM
Hello and very happy new year to all the team,

I am using origin 9.1 and i have two problems to solve:

1.I am plotting a graph and i want the legend generated be of the same color as that of the graph. i also want to make it bold.

2. How can i copy the desired row number data from a sheet and paste it on the graph as text. I also want to change the the properties of the pasted data and link the color to that of the graph.

Happy Christmas.

Thanks and regards,
Rajesh Agarwal
9   L A T E S T    R E P L I E S    (Newest First)
AmandaLu Posted - 04/20/2015 : 03:12:43 AM
This is exactly what my codes do...
kdsaransh Posted - 04/20/2015 : 03:08:43 AM
Hello,

I am extremely sorry to get you confused.

Yes this is exactly what i want..

Thanks again....

AmandaLu Posted - 04/20/2015 : 02:44:15 AM
Hi kdsaransh,

I'm not sure what you really want. To my understanding, you have a graph like the following:



And you want the legend to be color as follow:



Am I right? If I misunderstood you, please let me know what you want exactly.

Thanks,
Amanda
OriginLab Technical Service
kdsaransh Posted - 04/20/2015 : 01:22:52 AM
Hello,

Thanks ,but the problem is not solved.

For example: I have two graphs in a single layer with different color. Now the legend that is constructed has a color same as that was saved in template. But i want that the two legends created should be of same color as a that of the graph.

Thanks and regards,
AmandaLu Posted - 04/19/2015 : 11:27:49 PM
Hi kdsaransh,

You can reconstruct the legend as follow:

str$ = "";//define a blank string str$
nn = 1;
%A = %; //store "%" in %A to avoid unneeded substitution
doc -e D{
get %c -c aa; //get the color of active plot
str$ += "\l($(nn)) \b(\c$(aa)(%A($(nn))))%(CR)"; //construct the legend text of the active plot and add it to str$
nn+=1;
}
str.TrimRight(); //trim the last CR character
legend.text$ = str$; //reconstruct the legend


Thanks,
Amanda
OriginLab Technical Service
kdsaransh Posted - 04/17/2015 : 05:51:34 AM
Hi,

I had tried ungrouping the graphs, but this didn't work at all.

Please help.

Thanks a lot..
kdsaransh Posted - 04/10/2015 : 1:55:38 PM
Hi,
Thanks,

But the problem is : I have some 6 graphs each of different color and hence i have six legend. Now i want to set the legend color same as that of the graph.

I hope that's its clear.

Thanks....
AmandaLu Posted - 01/04/2015 : 01:14:07 AM
Hi kdsaransh,

1. If you want the legend text color to be the same of the plot color, you can use
legend.color=colorindex;

To make it bold, use
legend.text$ = "\b(%(legend.text$))";


2. To add a text label linked to a specific cell and color the text, use

ncolor=3;
label -s -n MyLabel "\c$(ncolor)(%([book1]Sheet1,1,1))";// create a label named "MyLabel" and show the value in first cell of [book1]sheet1, and make it green.


Please refer to the label command document for details:

http://www.originlab.com/doc/LabTalk/ref/Label-cmd

Thanks,
Amanda
kdsaransh Posted - 01/03/2015 : 06:13:09 AM
I am still struggling for the script to work.

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