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
 Plot multiple files
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

thitchen

44 Posts

Posted - 04/09/2012 :  05:28:26 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Ver8 SR0
Operating System: Win7 Professional

Hi.

I have some files with file names 0304ab.dat~0304yh.dat with alphabetic order.
Is there a way to draw 24 panels a page each cantaining a set of data from one file with the legend the name of that file?
Something like this but with 24 panels and legends:


Thank you,
-chen

Kathy_Wang

China
159 Posts

Posted - 04/09/2012 :  06:38:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
You may use the import wizard (Open from "File:Import:Import Wizard") to import all your files at once, in the file name options dialog, check the "Worksheet with filename" to set the worksheet name as file name.
Then go to the "Save Filters" dialog by keep clicking "next", and check for "Save filter" and then "Specify advanced filter options", again click "Next" and open the "advanced options" dialog. There paste the following code into the blank area for labtalk code:

plotxy iy:=(col(B), col(C));//select the column you want to plot by yourself
legendupdate mode:=7 custom:="@WS";

Then click "Finish" and all your files will be imported, and after each import, a graph with updated legend will be generated.
Then choose "Graph:Merge Graph Windows" to merge all 24 graphs and arrange them in the way you want.
Also, you are highly recommended to upgrade your origin version at least to Origin 8.0 SR 6, for upgrading, please go to the following link:
http://www.originlab.com/index.aspx?go=SUPPORT/ServiceReleases
Hope this information helps.


Kathy
Originlab
Go to Top of Page

thitchen

44 Posts

Posted - 04/09/2012 :  2:02:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, but where did I specify 24 panels each graph?
And in "plotxy iy:=(col(B), col(C));//select the column you want to plot by yourself", is it correct to write "plotxy iy:=(col(A), col(B));" instead? Since I only have 2 columns each file. I'm downloading the upgrades. I'm a newbie. Sorry I bothered you. Thanks again.

quote:
Originally posted by Kathy_Wang

Hi,
You may use the import wizard (Open from "File:Import:Import Wizard") to import all your files at once, in the file name options dialog, check the "Worksheet with filename" to set the worksheet name as file name.
Then go to the "Save Filters" dialog by keep clicking "next", and check for "Save filter" and then "Specify advanced filter options", again click "Next" and open the "advanced options" dialog. There paste the following code into the blank area for labtalk code:

plotxy iy:=(col(B), col(C));//select the column you want to plot by yourself
legendupdate mode:=7 custom:="@WS";

Then click "Finish" and all your files will be imported, and after each import, a graph with updated legend will be generated.
Then choose "Graph:Merge Graph Windows" to merge all 24 graphs and arrange them in the way you want.
Also, you are highly recommended to upgrade your origin version at least to Origin 8.0 SR 6, for upgrading, please go to the following link:
http://www.originlab.com/index.aspx?go=SUPPORT/ServiceReleases
Hope this information helps.


Kathy
Originlab

Go to Top of Page

Kathy_Wang

China
159 Posts

Posted - 04/09/2012 :  9:56:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
When you have your 24 graphs generated, you can
1. Choose"Graph:Merge Graph Windows" to open the "Graph Manipulation:merge_graph" dialog.
2. Then go to the drop-down menu of "Merge", and from it, select "specified", then the panel right to "graph" turns from gray to white (i.e. from inactive to active), and in the "graph" panel, you may browse and select graphs in your project by clicking the button right to the panel.
To arrange your plots in the merged graph, go to "Arrange Settings" branch, and modify the arrange setting as you want.
And regarding the "plotxy", we were just showing an example of how to use the command because we do not know which columns you would like to plot. In your case
plotxy iy:=(col(A), col(B));
is correct. You may refer to our online help file about this command for further information:
http://www.originlab.com/www/helponline/Origin/en/Programming/mergedProjects/X-Function/X-Function/Plotxy.html


Kathy
Originlab
Go to Top of Page

thitchen

44 Posts

Posted - 04/12/2012 :  10:56:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I found a code from this forum and that solves my problem. Thank you all the same.
http://www.originlab.com/forum/topic.asp?TOPIC_ID=5241

Edited by - thitchen on 04/12/2012 11:07:35 PM
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