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
 Legend with values from column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

barni0606

5 Posts

Posted - 07/17/2013 :  03:58:13 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
How can i create a legend in a bar plot with values from a special column in my worksheet?

It is not possible to chosse this option in the menue and I don´t understand the commands for the default mode.

Edited by - barni0606 on 07/17/2013 07:42:15 AM

Hideo Fujii

USA
1582 Posts

Posted - 07/17/2013 :  12:49:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can use the substitution notation in the legend textto refer to a value of a specific dataset value. For example:

  $(%(Book1,2,3),.2)
  (or $(%([Book1]Sheet1,2,3),.2)   )
This means the third row in the second column in Book1. (Here, ".2" is a format element to set the decimal place to 2.
Then, right-click the legend, select "Programming Control" flyout, and set the "Link to(%, $) Substitution Level" to 1.
(Note: In this screenshot, I have made the "special point" at the third bar by SHIFT+doubleClick to emphasize it.)



Hope this helps.

--Hideo Fujii
OriginLab


Post note: %([Book1]Sheet1,2,3,.2) also should work.

Edited by - Hideo Fujii on 07/18/2013 10:41:57 AM
Go to Top of Page

barni0606

5 Posts

Posted - 07/18/2013 :  09:06:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Sorry that doesn´t work like i would like it. I have got three columns. In the first column are the names of the examples which should be in the legend. In the columns 2 and free are the x and y values. I hope this helps for the solution.
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 07/18/2013 :  10:14:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi barni0606,

By setting the proper column and row numbers, the substitution notation should work as in the screenshot below.
(Of course, in this case, the legend element is a text, you don't need the formatting notation $(....). )



For the details of the substitution notation, see:
http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Substitution_Notation#Worksheet_Column_and_Cell_Substitution

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 07/18/2013 10:28:05 AM
Go to Top of Page

bergschofal

Austria
3 Posts

Posted - 06/22/2015 :  6:13:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Hideo,

I'm a little late, but need some help.
Is it possible to edit these legend entry not writing 'book1' but
as @W. Somehow it doesn't work and I have lots of books, from whome I would like to get a text in a column in the legend...

example:

\l(2) %(book1,1,1) --> leads to the wanted number
\l(2) %(@W,1,1) --> leads to @@@

Thanks
Go to Top of Page

cdrozdowski111

USA
247 Posts

Posted - 06/23/2015 :  09:55:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi bergschofal,

Try this where 2 represents 2nd plot:

\l(2) %(2,@D,1)


Does this solve your issue?

Thanks,
Chris Drozdowski
Originlab Technical Support
Go to Top of Page

snowli

USA
1386 Posts

Posted - 06/23/2015 :  4:57:14 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Please read this blog about how to use metadata or some cell value in worksheet to annotate the graph.
http://blog.originlab.com/graphing/annotating-graphs-with-worksheet-metadata

Note: Legend is just a special text object in Origin so the syntax also works for legend.

e.g. %(2, @WT, 3, 4) -- 2nd plot's corresponding worksheet. 3th colum, 4th row.

$(%(2, @WT, 3, 4),.2) -- using this $( , .2) to keep 2 decimal places. Using $( , *3) to keep 3 significant digits.


Thanks, Snow
Go to Top of Page

bergschofal

Austria
3 Posts

Posted - 07/02/2015 :  03:35:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Snowli,

Somehow the link @WT does not work. I also looked at the blog you suggested and downloaded the file. Also in this file the link to the desired cell does not work. But it is exactly what I need :-)

@cdrozdowski111: doesn't give me the value of the desired cell back....gives back the x-Value of my chart in the x's-Row "\l(2) %(2,@D,x)"

I use OriginPro 9G 64bit.

Thanks


quote:
Originally posted by snowli

Please read this blog about how to use metadata or some cell value in worksheet to annotate the graph.
http://blog.originlab.com/graphing/annotating-graphs-with-worksheet-metadata

Note: Legend is just a special text object in Origin so the syntax also works for legend.

e.g. %(2, @WT, 3, 4) -- 2nd plot's corresponding worksheet. 3th colum, 4th row.

$(%(2, @WT, 3, 4),.2) -- using this $( , .2) to keep 2 decimal places. Using $( , *3) to keep 3 significant digits.


Thanks, Snow

Go to Top of Page

snowli

USA
1386 Posts

Posted - 07/02/2015 :  10:37:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

I tried in 9.0 and as you said the @wt isn't supported in 9.0. It was added later.

As a workaround, in 9.0, you can use
%(2@W, 3, 4) -- 2nd plot's corresponding worksheet. 3th colum, 4th row.
$(%(2@W, 3, 4), .2) -- using this $( , .2) to keep 2 decimal places. Using $( , *3) to keep 3 significant digits.

Thanks, Snow
Go to Top of Page

bergschofal

Austria
3 Posts

Posted - 07/03/2015 :  02:51:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Snowli,

perfect. This works.

Thanks
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