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
 Origin Forum
 Creating 100 graphs from 1 file :(
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

naeem498

17 Posts

Posted - 02/25/2011 :  10:37:02 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Is it possible to graph a huge file containing 100(graphs)data, easily. Now I have to select one in each of the 100 graph data and create a graph, then take the second out of 100 make a graph of that, take the third make graph out of that... up till 100.
I want a method where it can take the data and split it and make 100 graphs automatically

vincenth

30 Posts

Posted - 02/25/2011 :  4:40:25 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Naeem,

A simple script can help with a repetitive task like this one. Something like this:

// Common X-data in Col(1), Y-data in Col's 2-101
for (ii=2; ii<102; ii++) {
range rr = [Book1]Sheet1!$(ii);
plotxy iy:=rr ogl:=[<new>]<new>;
}

Could really save you time. Just copy and paste into the Script Window, highlight the whole code with the cursor, and hit enter.

Splitting a long dataset into columns can be achieved with one of the import tools (either an X-Function or the import wizard).

Regards,
Vince
Go to Top of Page

naeem498

17 Posts

Posted - 02/27/2011 :  12:00:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey Vincent,

Thanks man, Can you make it simple for me. I am a chemist dont know much about these kind of softwares. To make the question more clear

I have a file in which I have 20 pixels (data) and each pixel is going through 8 scans that means I have 20 * 8 = 160 graphs data. Now I want to make 160 graphs out of those data, what I do is highlight pixel 1 scan 1 data make a graph, then pixel 1 scan 2 make a graph..... up till pixel 20 scan 8. You can imagine how it feels;)

The file is a .txt form and looks like

pixel 1 scan 1
1 123
2 123
3 123
4 123
.
.

Pixel 1 scan 2
1 123
2 123
3 123
.
.

Thanks for the help

Pixel 20 scan 8
1 123
.
.
Go to Top of Page

vincenth

30 Posts

Posted - 02/28/2011 :  3:03:49 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Naeem, I understand completely. If you are using one of the most recent versions of Origin (8.1 or 8.5), I suggest you implement batch processing. It does not involve code; you go through your analysis once (in your case simply generating a graph), embed your graph a workbook page (can be the same page as the data), and save the workbook as an Analysis Template (File: Save Workbook as Analysis Template). Then use the template to do Batch Processing (File: Batch Processing) for as many files as you wish.

There are detailed examples in the video tutorials on the website:
http://www.originlab.com/Index.aspx?go=SUPPORT/VideoTutorials#GeneralAnalysis

Vince

Edited by - vincenth on 02/28/2011 3:05:19 PM
Go to Top of Page

naeem498

17 Posts

Posted - 03/08/2011 :  10:07:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Thank you man. Now, I am trying to learn the language. Hope I will do it shortly. Thanks again
Go to Top of Page

naeem498

17 Posts

Posted - 06/24/2011 :  10:46:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Vincent,

After learning a little bit of programming I understood your code now and it really helped me. Thank you very much
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