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 for Programming
 LabTalk Forum
 Using Workbook names as Legend and Graph Names
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Hegmafor

6 Posts

Posted - 01/11/2010 :  07:28:11 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:


Hello,

I am not even sure if this belongs to the LaTalk Forum but I think thats probably the way to do what I am looking for:
I import multiple files each one in a new workbook. Now I want to use the names of the imported files as legend and as the name for the graph window. Is there a way to put this in a graph template?
I have never looked into programming in Origin before so please excuse me if his is a stupid question or doesnt even belong in this forum.

Thank you
Mike

easwar

USA
1964 Posts

Posted - 01/11/2010 :  11:18:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

Once you plot your graph with data from the multiple books, double click on the graph to open Plot Details dialog. Then select the top Graph node level on left panel and then the Legends/Titles tab on the right panel.

Then in the Auto Legend group change the drop-down to Custom. In the edit box below that you can enter syntax for building legend from different entities such as book short or long name, sheet name etc. Press F1 to open the help file to see the syntax.

For example to use book long name you can enter @WL in the edit box.
Once you do this you can save the graph as a template for repeat use including this legend setting.

Such legend configuration can also be done from script with command such as:
legendupdate mode:=7 custom:="@WL";

Easwar
OriginLab

P.S. With graph active, you can also use the menu item Graph:Update Legend and use the dialog that opens to configure the legend

Also, you need to configure your import so that the correct information is used to set the long name etc of the book so this can then work.
Go to Top of Page

Hegmafor

6 Posts

Posted - 01/16/2010 :  1:45:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you that worked quite nicely!

Now the only thing left is how to automatically name the graph window in the same way ?
Go to Top of Page

ata

Finland
2 Posts

Posted - 09/03/2014 :  07:19:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
a bit late to the party, but I have exactly the same problem: I import data to many workbooks, and when I plot them, it'd be really handy to make the graph windows' long names match the workbooks' names. Is there any way to do this automatically? I'm using Origin 8.

BR

-ata
Go to Top of Page

greg

USA
1378 Posts

Posted - 09/03/2014 :  08:58:50 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Only with a little work ...
See this post:
http://www.originlab.com/forum/topic.asp?TOPIC_ID=19909
Go to Top of Page

ata

Finland
2 Posts

Posted - 09/04/2014 :  04:29:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ah, that is perfect. Thank you very much.
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