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
 Add vector plots to many graphs

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
surjpanj Posted - 01/27/2016 : 07:52:32 AM
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

2   L A T E S T    R E P L I E S    (Newest First)
surjpanj Posted - 01/28/2016 : 08:23:32 AM
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
Hideo Fujii Posted - 01/27/2016 : 2:53:02 PM
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.

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