{"id":2704,"date":"2015-05-12T14:30:06","date_gmt":"2015-05-12T18:30:06","guid":{"rendered":"http:\/\/blog.originlab.com\/?p=2704"},"modified":"2018-12-04T04:57:18","modified_gmt":"2018-12-04T09:57:18","slug":"create-graphs-for-data-files-with-consistant-format","status":"publish","type":"post","link":"https:\/\/blog.originlab.com\/ja\/create-graphs-for-data-files-with-consistant-format","title":{"rendered":"Create Graphs for Data Files with Consistent Format"},"content":{"rendered":"<p>Occasionally we have been asked from people how to create many similar graphs from many data files with the consistent format. This article explains the Batch Processing method to achieve such repetitive graphing tasks.<\/p>\n<p>By default when plotting a graph in Origin, it creates a independent graph window. Origin supports embed the graph window in worksheet in 3 ways:<\/p>\n<ul>\n<li>in a cell in a worksheet<\/li>\n<li>as a floating graph in a worksheet<\/li>\n<li>in a single cell worksheet.<\/li>\n<\/ul>\n<p>After graph is embedded in worksheet, user can save such\u00a0workbook as a template and use <strong>Batch Process<\/strong> dialog to import multiple data file and generate multiple workbooks with data and embedded graph. In this blog, we will show how to embed graph as floating graph and do batch plotting. The F*.dat files used are located in &lt;Origin Program Folder&gt;\\Samples\\Import and Export\\.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Float.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2707\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Float.png\" alt=\"scr_BatchPlot_Float\" width=\"707\" height=\"537\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Float.png 804w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Float-300x228.png 300w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/a><\/p>\n<p>Note: Origin also has a feature, called <strong>Batch Plotting<\/strong>, which lets you create many similar graphs with data already imported into worksheets.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong>Create Workbook Template:<\/strong><\/h4>\n<p>1. Choose <strong>File: Import: Single ASCII&#8230;<\/strong> to import F1.dat file. \u00a0Then plot and customize the graph as you like. (You can set the rescale mode of x and y axes to &#8220;Auto&#8221; to rescale the graph automatically. But, if you want to hold the same axis scale unchanged, you should set the rescale mode to &#8220;Manual&#8221;.)<\/p>\n<p>2. Right click in gray area of the worksheet and choose <strong>Add Graph<\/strong> flyout, select the graph in the Graph Browser, and click OK.) Now, you see your graph as a floating graph in the worksheet, and you can relocate or resize it.<\/p>\n<p>(<span style=\"color: #008000;\">Note:<\/span> If you want to embed the graph in a worksheet cell, you can create a new column, right-click a cell, and choose <strong>Insert Graph<\/strong> flyout. If you want to put the graph in a separate sheet, right-click on the sheet tab at the bottom of the sheet, and choose <strong>Add Graph as Sheet<\/strong> flyout.)<\/p>\n<p>3. Choose menu <strong>Worksheet: Clear Worksheet&#8230; <\/strong>to clear the data.\u00a0Then choose menu\u00a0<strong>File: Save Window As<\/strong> which will save an empty worksheet window file with the extension, .OGW. This will make sure the OGW file size is small.<\/p>\n<h4><\/h4>\n<h4><strong>Batch Plot:<\/strong><\/h4>\n<p>1. Click <strong>New Project<\/strong> button to start a clean project. Choose <strong>File: Batch Process<\/strong> to open the batch processing tool.<\/p>\n<p>2. In this tool, please specify as follows:<br \/>\na) <strong>Analysis Template:<\/strong> Navigate and set to the OGW\u00a0 file you just saved.<br \/>\nb) <strong>File List:<\/strong> Navigate and select F1.dat, F2.dat and F3.dat under &lt;Origin Program Folder&gt;\\Samples\\Import and Export\\.<\/p>\n<p>3. Press OK,<\/p>\n<p>Now the whole batch process would take place. You will see a progress bar and\u00a0at the end, you get 3 workbooks. In each workbook, you will see the data file and corresponding graph. You can double click the graph window to customize it further. You can right click the floating graph and choose Restore window to change floating graph back into independent graph windows.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong>About Batch Processing dialog<\/strong><\/h4>\n<p>Batch Process dialog usually is used to do batch analysis, e.g. there are analysis such as fitting, set column value calcuation, etc. in workbook. So it doesn&#8217;t accept OTW (workbook template files).<\/p>\n<p>We extended it to do batch plotting. But <strong>File: Save Workbook as Analysis Template<\/strong> menu doesn&#8217;t work if there are no analysis or calculation in workbook.\u00a0Therefore in step 3 of Create workbook template, we manually clear data in worksheet and then use <strong>File: Save Window as<\/strong> to save an .OGW file. We may improve this in future version<\/p>\n<p>&nbsp;<\/p>\n<h4><strong>Pros and Cons of different ways to embed graph into worksheet<\/strong><\/h4>\n<table style=\"height: 404px;\" border=\"1\" width=\"608\">\n<thead>\n<tr>\n<th><strong>Place of the graph<\/strong><\/th>\n<th><strong>Graph size (if embedded)\u00a0 <\/strong><\/th>\n<th><strong>Pro<\/strong><\/th>\n<th><strong>Con<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Cell<\/td>\n<td style=\"text-align: center;\">small<\/td>\n<td>&#8211;\u00a0See data and graph side by side.<br \/>\n&#8211; Can contain many graphs compactly<br \/>\n&#8211; Graph related data or descriptions can be stored in the same column<\/td>\n<td style=\"text-align: left;\">\n<p>&#8211; Default embedded graph is tiny.<\/p>\n<p>&#8211; Need to resize cell height\u00a0and width or merge multiple cells to make the graph bigger<\/p>\n<p>&nbsp;<\/p>\n<p>&#8211; Not convenient to move the graph<\/td>\n<\/tr>\n<tr>\n<td>Floating<\/td>\n<td style=\"text-align: center;\">medium<\/td>\n<td>&#8211; See\u00a0data and graph side by side.<br \/>\n&#8211; Easy to move and resize the graph<\/td>\n<td>&#8211;\u00a0Graph could\u00a0block the data area<\/td>\n<\/tr>\n<tr>\n<td>Sheet<\/td>\n<td style=\"text-align: center;\">large<\/td>\n<td>\n<p>&#8211;\u00a0Graph occupies the whole sheet<\/p>\n<p>&nbsp;<\/td>\n<td>&#8211;\u00a0Can&#8217;t see data and graph side by side.<br \/>\n&#8211; If the book contains many sheets, it becomes hard to manage the association between the data and the graph<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Screenshot of the result when the graph is placed in a cell:<br \/>\n<a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Cell.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-2709\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Cell.png\" alt=\"scr_BatchPlot_Cell\" width=\"693\" height=\"429\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Cell.png 896w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Cell-300x186.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Cell-80x50.png 80w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Screenshot of the result when the graph is placed in a new whole sheet as a single cell:<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Sheet.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-2708 size-full\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Sheet.png\" alt=\"scr_BatchPlot_Sheet\" width=\"702\" height=\"288\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Sheet.png 702w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Sheet-300x123.png 300w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Occasionally we have been asked from people how to create &hellip; <\/p>","protected":false},"author":10,"featured_media":2707,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[99],"tags":[],"class_list":["post-2704","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-batch-processing"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7DvU2-HC","jetpack_likes_enabled":true,"jetpack_featured_media_url":"https:\/\/blog.originlab.com\/wp-content\/uploads\/2015\/04\/scr_BatchPlot_Float.png","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/2704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/comments?post=2704"}],"version-history":[{"count":68,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/2704\/revisions"}],"predecessor-version":[{"id":10142,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/2704\/revisions\/10142"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/media\/2707"}],"wp:attachment":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/media?parent=2704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/categories?post=2704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/tags?post=2704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}