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
 Batch plotting using dataset header names
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

corei5

18 Posts

Posted - 06/02/2017 :  7:44:37 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): b9.4.1.354
Operating System: Win 7

Hello,

Is it possible to batch plot graphs using slightly varying datasets? I have multiple .csv files where the column order may change from one file to the next with also missing (or extra) columns. However, header names are consistent across the different files and the header names I'm interested in plotting always exist in the files.

A very simple example of my problem using Speed as the header name I wish to plot (I actually have many files with at least a hundred columns in each file):

File 1 has columns - Time, Speed, Acceleration, Distance
File 2 has columns - Time, Acceleration, Speed, Distance
File 3 has columns - Time, Deceleration, Speed
...
etc.

For my example, I am only interested in batch plotting Time vs. Speed.

I can make a workbook template for File 1 and substitute data from datasets exactly matching File 1's format to produce Time vs. Speed plots without any issue. As soon as I import a file with File 2's structure, I get a plot of Time vs. Acceleration. When I import a file with File 3's structure, I get a plot of Time vs. Deceleration.

Is there any way to specify columns to plot with specific header names since it looks like my batch plots are targeting certain column positions instead.

Thanks for any help!


Fred

cpyang

USA
1406 Posts

Posted - 06/03/2017 :  4:18:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Are you already using Cloneable Template? See

https://www.youtube.com/watch?v=h3y0gE7DAT4&feature=youtu.be


If you are inserting the graph into your workbook and just import new data, then some script is needed to switch the column as Origin remember the plot by column positions only. So some code will need to be run after import.


CP
Go to Top of Page

corei5

18 Posts

Posted - 06/05/2017 :  5:55:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The cloneable template seems to work for me.

Thanks!
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