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
 Use data from input file in legend (very basic)

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
hetanquary Posted - 10/10/2011 : 7:03:55 PM
Origin 8.1 SR1 v8.1.13.88 (Academic)
Operating System: Windows XP

I need to create a legend on my graph using text from top of my input ascii file. I have been reading and learning about how the headers and subheaders and all that work and I understand how the default legend works I believe but I need the legend to have 4 separate lines instead of one long line. The first 4 lines of the input file should be the legend. Can I do this using the default legend somehow, or do I need a script? As you can tell I am very new to this. Any help would be appreciated.
5   L A T E S T    R E P L I E S    (Newest First)
hetanquary Posted - 10/12/2011 : 11:30:57 AM
So after that incredibly long post I actually think I have figured it out now. Thank you for all you trouble!
hetanquary Posted - 10/11/2011 : 2:52:24 PM
Thank you for all your help. There are some things I am not really understanding though because I can't get things to work out the way I want. May be it would help if I describe my project a little. Right now my setup is like this: I have created two templates because my data produces to graphs. I saved the templates with all their settings into a project. In the project I use a worksheet script to plot the data in the correct way. My procedure is to open the project, then import the data using import single ascii. I have set up the import so that the first 4 lines of the input file get read into the comment line. Right now, the graph is not doing anything with those first four lines. I would like it to put those first four lines into the legend.

After opening my project, importing the data (which produces the 2 graphs) I did what you suggested (double clicked the legend, hit ctrl-h, chose insert as link and selected SubHeader). This produced the correct result. I did the same thing on the second graph. I then right clicked the legend, selected save format as theme, named and saved it. I also resaved both the templates after I got the legend how I wanted it. Obviously this was not all I needed to do, or I have done something wrong in the previous steps because when I import some new data, the new legend is not generated, it is blank.

Sorry for the lengthy post. I hope it makes sense.
greg Posted - 10/11/2011 : 1:54:45 PM
An Import Filter can be used to make sure you grab all the header variables you need. If you create a graph of the imported data and setup the legend to use Links, then you can save the graph as a Template and use it to plot data from all such imported data and the legend will grab the correct information from the worksheet.
hetanquary Posted - 10/11/2011 : 12:51:05 PM
Thank you, that is very helpful! I was able to modify the legend the way I wanted it. Now I need to make it grab that data and create the legend in that format every time I import a new ascii. Is that what the themes are for? Or is it part of the template or the project?
greg Posted - 10/11/2011 : 12:13:21 PM
You can use the Insert Variables dialog to add import header variables to any text object (and there is nothing special about the legend text object except its name).

Double-click on the text of an existing legend and position the cursor where you want variables added, then press Ctrl+H to open Insert Variables. You can choose to insert variables as links (showing just values) or as equations : VariableName = Value.
The former values update based on contents in the worksheet, while the latter is static text.

When you edit a legend in this manner, you should no longer use Graph : New Legend as that will wipe out your changes. Use Graph : Update Legend to protect your added text.



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