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
 Three data columns
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

hetanquary

USA
7 Posts

Posted - 02/04/2011 :  4:49:17 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin 8.1 SR1 v8.1.13.88 (Academic)
Operating System: Windows XP

I have a program which generates an ascii file consisting of 3 columns of data (say A, B, and C). I have two graphs which I would like to make from it: A vs. B and A vs. C. I have made two separate templates for this purpose. When I open one template and then import my data it by default plots both A vs. B and A vs. C on the same graph. I realize this can most likely be fixed easily using the import wizard, so I have spent some time attempting to figure out how to do this but have not yet been able to. Help would be appreciated.

easwar

USA
1964 Posts

Posted - 02/07/2011 :  12:14:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You could do the following:
1> Use Import Wizard to create a new import filter, which imports the data into a workbook instead of a graph
2> On the Save Filters of the wizard, check the Save Filter check box, then give a name to your filter etc, and also check the "Specify advanced filter options" check box
3> On the page that opens next, add these script lines:

// Define ranges to point to cols 1, 2, 3 of worksheet
range r1=1, r2=2, r3=3;
// Plot col 2 versus 1 using template 1
plotxy iy:=(r1,r2) ogl:=[<new template:="My Template 1">];
// Plot col 3 versus 1 using template 2
plotxy iy:=(r1,r3) ogl:=[<new template:="My Template 2">];


Replace "My Template 1" etc with the name of your custom template. This will then create two graphs after the data has been imported into worksheet.

Easwar
OriginLab
Go to Top of Page

hetanquary

USA
7 Posts

Posted - 02/07/2011 :  3:56:51 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much! It worked great. I would like to learn more about scripting though. One thing I'd like to do that you might know how to do is I'd like to specify the type of graph that will be plotted. For instance, at the moment I guess it's plotting the data in a default plot type but I would like to have it be a line plot. Specifically, how does one script that? And then generally, what resources are available to learn commands in origin? I am relatively familiar with java and fortran, so is there just a list of commands that I could refer to that you know of?
Go to Top of Page

k.anderson3454

USA
1 Posts

Posted - 02/07/2011 :  8:26:22 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Glad I came across this. Thanks


Edited by - k.anderson3454 on 02/14/2011 6:49:27 PM
Go to Top of Page

easwar

USA
1964 Posts

Posted - 02/08/2011 :  2:20:13 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by hetanquary

Thank you very much! It worked great. I would like to learn more about scripting though. One thing I'd like to do that you might know how to do is I'd like to specify the type of graph that will be plotted. For instance, at the moment I guess it's plotting the data in a default plot type but I would like to have it be a line plot. Specifically, how does one script that? And then generally, what resources are available to learn commands in origin? I am relatively familiar with java and fortran, so is there just a list of commands that I could refer to that you know of?



Hi,

You can refer to the LabTalk help file in your Origin installation.

The latest content is on our wiki:
http://wiki.originlab.com/~originla/wiki/index.php?title=Origin_Programming
Select the 2nd link and that will take you to online LabTalk scripting guide, language reference, and examples. The content here is based on our latest version 8.5.

For example, to make a graph with a particular style, you can refer to the plotxy x-function, which is covered in this section of the guide:
http://wiki.originlab.com/~originla/ltwiki/index.php?title=Script:Creating_Graphs

Easwar
OriginLab

Go to Top of Page

hetanquary

USA
7 Posts

Posted - 02/10/2011 :  7:45:15 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much! You have been very helpful!
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