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.
|