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
 Add vector plots to many graphs
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

surjpanj

Canada
18 Posts

Posted - 01/27/2016 :  07:52:32 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi everyone!

I have 72 graphs. On each graph I want to add new layer (No Axes, Linked XY Scale) of XYAM vector plot. Vector data is in Book1 with 72 sheets named 0, 5, 10,...360. Each sheet has vector data arranged as Col(A)=X, Col(B)=Y, Col(F)=A, Col(E)=M.

How could I make LabTalk script that would read vector data and plot XYAM layers?

So far I only know how to add new layers:
loop (i, 1, 72)
{
win -a "Graph$(i)";
layadd type:=noxy;
}

Thanks for your help,
Matt


Edited by - surjpanj on 01/27/2016 10:40:13 AM

Hideo Fujii

USA
1582 Posts

Posted - 01/27/2016 :  2:53:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Matt,

Could you please try the following code:
ii=0;
doc -e LW {
  ii++;
  plotxy (1,2) plot:=208 o:=[Graph$(ii)]1!; //208: XYAM vector
}
Here, it assumes that AM data are placed in columns 3 and 4 followed by XY data at column 1 and 2; though not explicitly specified in the plotxy command.

I hope this works.

--Hideo Fujii
OriginLab Corp.
Go to Top of Page

surjpanj

Canada
18 Posts

Posted - 01/28/2016 :  08:23:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Hideo! I rearranged the columns and it works :-).

Except there appears to be some bug in Origin 2015. First time I plot the graphs Origin considers only XY coordinates and makes wrong vector plots. But when I manually select also the AM components it makes correct plot. Afterwards I run template through all graphs and everything looks good :-).

Thanks again!
Matt

Edited by - surjpanj on 01/28/2016 08:25:12 AM
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