Author |
Topic |
|
naeem498
17 Posts |
Posted - 02/25/2011 : 10:37:02 AM
|
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
|
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
|
|
|
naeem498
17 Posts |
Posted - 02/27/2011 : 12:00:18 PM
|
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 . . |
|
|
vincenth
30 Posts |
Posted - 02/28/2011 : 3:03:49 PM
|
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 |
|
|
naeem498
17 Posts |
Posted - 03/08/2011 : 10:07:01 AM
|
Hi,
Thank you man. Now, I am trying to learn the language. Hope I will do it shortly. Thanks again |
|
|
naeem498
17 Posts |
Posted - 06/24/2011 : 10:46:41 AM
|
Hi Vincent,
After learning a little bit of programming I understood your code now and it really helped me. Thank you very much |
|
|
|
Topic |
|
|
|