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
 Plotting data only in first layer

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
Poffel1985 Posted - 11/08/2016 : 07:25:12 AM
Hello, i am using the recent version of Origin.

I would like to plot multiple columns into a template
(1. layer:x-y
2. layer: x-axis which is dependent on the first x-axis).

However, when I try this my data is seperated on both layers instead of only the first layer. Could you help me fixing this issue?

My syntax is in this way

wks.colSel(1, 1) ; //x1
wks.colSel(2, 1) ; //y1
wks.colSel(3, 1) ; //x2
wks.colSel(4, 1) ; //y2
wks.colSel(5, 1) ;//x3
wks.colSel(6, 1) ; //y3

worksheet -p 200 SpecialXYX_Template;



Y1 and Y3 would then be in Layer 1 and Y2 in Layer 2

Best regards
3   L A T E S T    R E P L I E S    (Newest First)
gzforever Posted - 11/09/2016 : 8:22:35 PM
To draw the plot in a specific layer u can use :

ogl:=[Graphname]1!;

Number indicates the number of layer.

In my example where i am plotting data on the first layer of graph named "Al spectro" :

plotxy iy:=2 plot:=201 color:=ii+1 ogl:=[Al spectro]1!;

Kind regards,
JZ
Hideo Fujii Posted - 11/08/2016 : 3:24:27 PM
Hi,

In addition to Chris' "right" approach, if you to make a "retrofit" code to your current code, you can simply add:

  layer -j;
to extract all plots in separate layers. Then, you can link the layers such as by:

  layer2.link=1;
  layer2.X.link=0;
Hope this also helps you.

--Hideo
Chris D Posted - 11/08/2016 : 09:57:55 AM
Hi,

Assuming the worksheet you want to plot from is active, this LabTalk will do as you wish:

string str$ = %E;
plotxy plot:=200 iy:=%(str$)!(1,2) ogl:=<new template:=SpecialXYX_Template>;
plotxy plot:=200 iy:=%(str$)!(3,4) ogl:=2!;
plotxy plot:=200 iy:=%(str$)!(5,6) ogl:=1!;


More info about plotxy X-Function is here:
http://www.originlab.com/doc/X-Function/ref/plotxy
http://www.originlab.com/doc/LabTalk/examples/Plotting

Thanks,
Chris Drozdowski
Originlab Technical Support

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