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
 Import of multiple ASCII files with plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

PB-Marvin17

Germany
1 Posts

Posted - 08/13/2021 :  08:37:13 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello everyone,

I am currently working on data import in Origin with Lab talk to make my life easier. Because I wasn't sure if I can do this with the import wizzard, I tried to import four data files (.txt) with the "import" -> "multiple ASCII" option.

I want to import the data to one sheet and create a plot (see graphic). I have several problems with this.

1. I set the number of collums in the settings to 8 since I was not able to add aditional collums.. Can someone tell me the correct way to add aditional collums after every imported file? (and in general)
2. I managed to plot the data (see graph). But my problem is that I import different sets of data with different intensities. Since the modification I perform uses constant values, I have problems with different sets of data.
I tried to fix this by searching for the maximum values or minimum values of selcted collums but failed to do so.. I want to keep the visible distances between the curves (observed and calculated) and the position points as well as between the position points and the difference curve constant for different sets of data. I would prefer that all plots look the same and the data need no further modification.. How to I manage to do that?

My script after the import of all files looks like this:

wks.col1.type = 4; // set column as X
wks.col2.type = 1; // set column as Y
wks.col3.type = 4;
wks.col4.type = 1;
wks.col5.type = 4;
wks.col6.type = 1;
wks.col7.type = 4;
wks.col8.type = 1;

col(F)=-50;
col(I)=col(H)-300;

string bkname$ = page.name$;
string shname$ = layer.name$;

plotxy iy:=(1,2) plot:=201 ogl:=[<new template:="Plot" name:="Plot">];
plotxy iy:=[bkname$]shname$!(3,4) plot:=200 ogl:=1;
plotxy iy:=[bkname$]shname$!(5,6) plot:=201 ogl:=1;
plotxy iy:=[bkname$]shname$!(7,9) plot:=200 ogl:=1;

I use OriginPro 2021b (64-bit) SR2 on Win10.

I hope you can understand my problems. Thanks for your advice,
Kind Regards,
Marvin.

YimingChen

1665 Posts

Posted - 08/17/2021 :  3:55:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
1. To add column to worksheet, please use the script:
wks.addCol(name)

2. To customize individual plot, you will need to use Set command:
https://www.originlab.com/doc/Labtalk/Ref/Set-cmd

James
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