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
 All Forums
 Origin Forum
 Origin Forum
 Multiple Graphs, Same Data

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
cdrozdowski111 Posted - 11/30/2012 : 11:09:29 AM
OriginPro 9.0.0 (Student Version), Win7 64-bit, running in VMware Fusion 5.0.2

I am trying to create a template with three graphs all with different views of the same data (e.g. line plots of different wavelength ranges). I want to be able to select the relevant data column from a sheet, and plot it to the template and have all three graphs automatically have plots.

I can get one of the three graphs to plot but not the other two.

Any suggestions?
5   L A T E S T    R E P L I E S    (Newest First)
cdrozdowski111 Posted - 12/04/2012 : 05:41:38 AM
Thanks folks, I was able to implement a solution via Labscript.
greg Posted - 12/03/2012 : 12:15:40 PM
Presumably you have set the X axis scales for each layer to Manual Rescale. If so, then you only need to include the same Y dataset in each of the layers without rescaling.

To do so in the GUI:
With your worksheet active but nothing selected, choose Plot : Template Library.
Locate your saved template (possibly in the UserDefined Category), select it and click Plot.
This opens the Plot Setup dialog.
If the dialog has OK, Cancel and a blue-bordered button: click the blue-bordered button.
Select Layer1 in the bottom panel.
Choose your Plot Type and X and Y columns in the Plot Type pabel and click Add.
Repeat for Layers 2 and 3 and click OK.

To do so with a script:
Hold down the Shift and Control key and click the "Custom Routine button" (the one that looks like a flow chart).
This will open Code Builder with the Custom.OGS file loaded.
Replace the line
type -b $General.Userbutton;
with
// BEGIN
range raXY = (1,2); // This assumes column 1 is X, column 2 is Y
win -t plot "Three Ranges"; // My template named "Three Ranges"
loop(ii,1,page.nlayers)
{
page.active = ii;
layer -i raXY;
}
// END
then select File : Save and close Code Builder.
Now when you click the "Custom Routine" button, the script will plot B(Y) vs A(X) in each of your layers.
cdrozdowski111 Posted - 12/03/2012 : 11:05:10 AM
I used incorrect terms, I'm sorry.

I have a graph template with 3 layers. Each layer is meant to plot a different range of values for the same selected column of a worksheet (Y values). I can control the displayed range of values for each layer by setting the X-axis range of each layer.

I want to be able to select the relevant column on a worksheet and open the template and have all three layers automatically be plotted from the same selected column.

Where would I send the obj file to?
snowli Posted - 12/03/2012 : 10:26:18 AM
Hello,

Do you mind sending an opj file with an example of your data and expected graph?

When you say 3 graphs, do you mean 3 plots in one graph window? There can be multiple layers in the graph. Do you want all plots in one layer or they are each plot in different layers of the graph.

Template is for a single graph window.

Thanks, Snow Li
OriginLab Corp.
Hideo Fujii Posted - 11/30/2012 : 4:59:44 PM
Hi cdrozdowski111,

When you created a templates which contains multiple datasets, you can use the template by putting new datasets in the order of datasets, and as grouped as in the original.

Before you save the template, make sure which datasets (all, some, or none) are grouped as shown in the Plot Setup dialog, or in the Layer Contents dialog. (Right-clicking the layer icon, a tiny gray square like [1] at top left corner of the graph.)

Now, when you want to include another set of columns into a new graph from that saved template, you can do:

1) When your data worksheet is active, open the Template Library, and choose your template from the left panel. Click "Plot" button to show the Plot Setup dialog. (Make sure the correct plot type is selected in the middle panel of the Plot Setup.)

2) In Plot Setup, mark the check boxes of the first XY datasets which you want to assign, corresponding to the first plot in the template as you created. Press "Add" button. You see the first plot in the bottom panel.

3) Do the step 2) for the second, third... plot in order.

4) Based on which plots must be grouped, CYTL+select these plots (under Layer1) to highlight them, right-click, and choose "Group" flyout. Now, you see a group folder which contains these plots. Click OK to close Plot Setup.

I hope the above steps work as you wanted.

--Hideo Fujii
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000