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 for Programming
 LabTalk Forum
 Plot X vs Y without user input in LabTalk

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
kpongani Posted - 03/25/2012 : 7:10:15 PM
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.
2   L A T E S T    R E P L I E S    (Newest First)
kpongani Posted - 03/26/2012 : 09:18:15 AM
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
Kathy_Wang Posted - 03/26/2012 : 03:15:03 AM
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

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