Author |
Topic  |
|
reepingk
Canada
18 Posts |
Posted - 03/13/2018 : 11:28:09 AM
|
I'm not sure why this isn't easier. I have a workbook filled with worksheets that all contain the same columns with different data. Every worksheet contains X1 Y1 and Y2. I want to make a plot with all of the worksheet's Y1s plotted vs. X1s. Of course, I can do this manually, but when you have to reverse both axis, make them log scale, then fix the axis positioning, it gets old after a while, so I've been trying to make a template do it.
However, a clone-able template will not work unless I have the exact same number of worksheets in the workbook. If I created the template with 10 worksheets (and therefore 10 traces on the plot), the template will NOT work with a workbook that only contains 5 worksheets. WHY? This is ridiculous. I understand that the template is great for creating reports of data that someone will receive weekly/yearly, etc, but this is useless for a scientist that won't always have the same number of data points in a time series every time. (Each worksheet for me represents a step in the time series.) It seems impossible for me to simply say "plot every worksheet's column A with column B then format the graph in this manner." Is it impossible?
I tried applying a theme, but that didn't work either. First off, it still requires me to create the graph manually (which, hilariously seemingly requires fewer clicks than using a template), and secondly, it messes up the color scale and legend. (The legend still contains 10 entries since I used a plot with 10 entries to make the theme, regardless of how many traces the new plot actually has.) What's the point of the theme if I have to go back and fix things afterward?
Origin 2017 and Windows 10 |
Edited by - reepingk on 03/13/2018 11:31:52 AM |
|
cpyang
USA
1406 Posts |
Posted - 03/13/2018 : 12:46:27 PM
|
quote: Originally posted by reepingk
However, a clone-able template will not work unless I have the exact same number of worksheets in the workbook. If I created the template with 10 worksheets (and therefore 10 traces on the plot), the template will NOT work with a workbook that only contains 5 worksheets. WHY? This is ridiculous.
Have you actually tried this? I just did the following and I don't see why this would not work for you.
1. make XYY data, make graph with 2 layers, layer1 X vs YY, layer2 Y1 vs Y2, using Plot Setup. 2. Save Template, check Cloneable, and choose Short Name as "Match Plot Columns By". 3. Create any new book, or new sheet, with XYY data, select all and from Plot menu, choose Template->User and pick my template saved above
--> graph is made correctly with XYY on one layer and Y1 vs Y2 on another.
Maybe you have looked at the wrong tutorial?
CP
|
 |
|
reepingk
Canada
18 Posts |
Posted - 03/13/2018 : 12:59:50 PM
|
quote: Originally posted by cpyang
quote: Originally posted by reepingk
However, a clone-able template will not work unless I have the exact same number of worksheets in the workbook. If I created the template with 10 worksheets (and therefore 10 traces on the plot), the template will NOT work with a workbook that only contains 5 worksheets. WHY? This is ridiculous.
Have you actually tried this? I just did the following and I don't see why this would not work for you.
1. make XYY data, make graph with 2 layers, layer1 X vs YY, layer2 Y1 vs Y2, using Plot Setup. 2. Save Template, check Cloneable, and choose Short Name as "Match Plot Columns By". 3. Create any new book, or new sheet, with XYY data, select all and from Plot menu, choose Template->User and pick my template saved above
--> graph is made correctly with XYY on one layer and Y1 vs Y2 on another.
Maybe you have looked at the wrong tutorial?
CP
I have tried. It doesn't show me the blue "dolly the sheep" icon over my template when I do this so it won't even let me select it.
When I use the template dialog to create a prototype, it creates a workbook with 10 worksheets.
EDIT: And yes, templates will work perfectly fine if I only have a single set of XYY data and only a single worksheet in a workbook. That's not the issue I'm having. |
Edited by - reepingk on 03/13/2018 3:25:57 PM |
 |
|
cpyang
USA
1406 Posts |
Posted - 03/13/2018 : 3:08:32 PM
|
which template dialog to create a prototype?
Well you must have not saved it as clone-able template, did you do this?

You just make your graph with two layers, and then right-click the Graph window title and right-click to choose "Save Template As..."
CP
|
 |
|
reepingk
Canada
18 Posts |
Posted - 03/13/2018 : 4:14:40 PM
|
quote: Originally posted by cpyang
which template dialog to create a prototype?
Well you must have not saved it as clone-able template, did you do this?
You just make your graph with two layers, and then right-click the Graph window title and right-click to choose "Save Template As..."
CP
It doesn't work.
Yes, I made it cloneable (or else the dolly the sheep icon wouldn't be there.) It still will NOT work for a different number of traces. As I said before, it works perfeclty fine if I have the same number of traces as was in the plot when I made the template, but if I have a different number of traces, it does not work.
I make this plot using the data behind it (notice 2 worksheets)

I create the clonable template.

I apply the template to this data (notice many worksheets, more than 2)

I get this. (Wrong, there should be ~12 traces, not 2) I want it to plot ALL of the worksheets' data, not just the first 2. However, I may not always have that many worksheets. Sometimes I'll have fewer, sometimes I'll have more.

|
Edited by - reepingk on 03/13/2018 4:17:13 PM |
 |
|
YimingChen
1640 Posts |
Posted - 03/13/2018 : 4:49:13 PM
|
Hi,
We have improved batch plotting in Origin 2018b Beta so that varying number of worksheets with same column structure can be plotted and auto grouped. Would you be willing to test it? Please leave us your valid email address and we can send you a copy. Thank you.
James, OriginLab |
 |
|
reepingk
Canada
18 Posts |
Posted - 03/13/2018 : 4:57:01 PM
|
quote: Originally posted by YimingChen
Hi,
We have improved batch plotting in Origin 2018b Beta so that varying number of worksheets with same column structure can be plotted and auto grouped. Would you be willing to test it? Please leave us your valid email address and we can send you a copy. Thank you.
James, OriginLab
So it's actually impossible in 2017? That's... extremely surprising. But no worries (sorry for getting frustrated) I'll just write a script to do it. I'm just trying to learn Origin the same way that most people would learn origin (with no programming.) (If I learn it with programming, it's hard to sympathize with other people when they ask me "how did you do this, I've been trying to do it for years." My answer is usually "I wrote a script" but that doesn't help other people. I'm trying to be helpful.)
I wouldn't make such a big fuss, it's just that I make about a dozen of these plots for every experiment I run, so having to do it manually would drive me absolutely nuts. (Especially because the plot options GUI is pretty slow (1-2 seconds to load each tab.)) |
Edited by - reepingk on 03/13/2018 4:59:10 PM |
 |
|
snowli
USA
1411 Posts |
Posted - 03/13/2018 : 5:29:17 PM
|
Hello,
suppose you want to plot same column of all sheets, I feel there is no need to save as cloneable template.
With your current graph window active, save as graph template but don't check "Mark as Cloneable Template" Then with new workbook, make sure nothing is selected in the workbook. Click Plot menu and choose the User-defined template. PLot Setup dialog will open. It should have 3 panels. If not, u can click double arrows on the right side to expand it. On top Panel, set Available Data as "Current Workbook". Select all sheets. On MIddle panel, select which column will be used as X and which as Y. Click Add button It will actually add xy of all selected sheets to bottom panel. CLick OK. data from multiple sheets will be plotted in your saved template.
Let us know if this works.
Thanks, Snow
|
 |
|
reepingk
Canada
18 Posts |
Posted - 03/13/2018 : 6:15:03 PM
|
quote: Originally posted by snowli
Hello,
suppose you want to plot same column of all sheets, I feel there is no need to save as cloneable template.
With your current graph window active, save as graph template but don't check "Mark as Cloneable Template" Then with new workbook, make sure nothing is selected in the workbook. Click Plot menu and choose the User-defined template. PLot Setup dialog will open. It should have 3 panels. If not, u can click double arrows on the right side to expand it. On top Panel, set Available Data as "Current Workbook". Select all sheets. On MIddle panel, select which column will be used as X and which as Y. Click Add button It will actually add xy of all selected sheets to bottom panel. CLick OK. data from multiple sheets will be plotted in your saved template.
Let us know if this works.
Thanks, Snow
That... actually worked. I had tried creating a non-clonable template before, but it wouldn't let me plot two y columns against each other, but going into the plot setup fixes that. Not an ideal solution (because I can already imagine that scrolling through a few dozen workbooks to get to the one you want will be annoying) but it does work.
Thank you. |
 |
|
|
Topic  |
|
|
|