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
 Plot X vs Y without user input in LabTalk
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kpongani

USA
17 Posts

Posted - 03/25/2012 :  7:10:15 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 8 and Service Release 6 (Select Help-->About Origin):
Operating System: Win7

I have an old LabTalk script from Origin 7.0 with this line:

work -p 200 line;

1. Under version 8, the program halts at a Plot Setup dialog. I have only 3 columns, one is Disregard, one is X and one is Y. How do I get the script to run without halting for user input? I want an XY line plot with my single X and single Y columns. Other than the column defined as Disregard, there are no other columns.

2. And, while I'm at it, if I wanted to use a user-defined template, is there a way to add this to the script?

Many thanks.

Kathy_Wang

China
159 Posts

Posted - 03/26/2012 :  03:15:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
For the first question, in Origin 8.0, to plot your data as your want, first highlight your Y column and then use your script
work -p 200

As an alternative option, you may use the script:
plotxy 2 200

,in which 2 indicates your y column index, and 200 is the plot type ID for lines.
For the second one, you may use the following script:
plotxy (1,2) plot:=200 ogl:=[<new template:=LINE name:=MyLineGraph>]

in which (1,2) stands for your input XY range, 200 stands for your plot type ID, and you should replace "LINE" with the name of your template, and the graph window is named as MyLineGraph
You may refer to more detailed information from the following link of our online help file:
http://www.originlab.com/www/helponline/Origin/en/Programming/mergedProjects/X-Function/X-Function/Plotxy.html


Kathy
Originlab

Edited by - Kathy_Wang on 03/26/2012 9:18:29 PM
Go to Top of Page

kpongani

USA
17 Posts

Posted - 03/26/2012 :  09:18:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Many thanks.

BTW, the link on the plotxy page to the "LabTalk Language Reference: Command Reference: Worksheet (command) (-p switch)" might be broken.

In case anyone else needs it, I found the numbers for the different plot options at
http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Worksheet_%28command%29#-p.3B_Plot_the_current_worksheet_selection_in_the_nth_graph_type_into_the_template
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