Author |
Topic  |
|
gammapsi
Germany
Posts |
Posted - 06/04/2007 : 09:33:05 AM
|
Origin Version (Select Help-->About Origin): v7.0394 Operating System: Win XP Pro
Hi there,
my problem is similar to the post “Multiple automatic plot generation” by frijud.
I have multiple data sets with the same x and y axes, which I want to plot in a single graph. For each data set, I want to show a linear fit, the linear equation and error bars for the standard deviation.
Ideally, I’d like to have a template where I only have to copy the new raw data into the respective columns and automatically get a corresponding new graph.
When I draw a one-layer graph, I can only calculate the regression curve with the first data set. I tried to create a template with multiple layers, which seems rather clumsy to me and leads to multiple axes with different scales. How can I merge the different axes into one with the scales automatically adjusted to fit all data points?
It looks like a pretty standard task for me. However, I am new to Origin and can’t figure it out with my current knowledge. Are there any free macros or templates available? That would be really useful. I have no programming skills.
On a sidenote, is it possible to select not whole colums but only certain cells within a colum and plot a graph (like in Microsoft Excel)? This would save me a lot of busy work.
Many thanks for your help,
Gerhard
|
|
Mike Buess
USA
3037 Posts |
Posted - 06/04/2007 : 11:57:22 AM
|
Hi Gerhard,
quote: I have multiple data sets with the same x and y axes, which I want to plot in a single graph.
Apparently the datasets are from separate worksheets. If all worksheets are standard XY you can do this...
1. Assign the following LabTalk script to your Custom Routine button as described here.
// begin script win -t P; // open graph template %P=%H; // save its name // apply following {script} to all worksheets in the active folder doc -ef W { %W=%H; // save wks name win -a %P; // restore plot lay -i202 %(%W,2); // plot 2nd column of %W as 202=line+symbol, 201=symbol, 200=line, etc. }; win -a %P; // restore plot layer -a; // rescale to show all layer -g; // group dataplots legend; // create legend // end script
2. Create a project folder and drag all worksheets you want plotted to that folder.
3. Make sure you are in the new folder and click the Custom Routine button. That will plot all datasets in the folder in one graph layer. Once the graph is created you can return all worksheets to their former locations if you want.
quote: When I draw a one-layer graph, I can only calculate the regression curve with the first data set.
Use Tools > Linear Fit and check the Fit All Curves option on the settings tab.
quote: Are there any free macros or templates available?
http://www.originlab.com/FileExchange/
quote: is it possible to select not whole colums but only certain cells within a colum and plot a graph (like in Microsoft Excel)?
Of course you can select/plot a range of cells but there is no way to select non-consecutive cells.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 06/04/2007 12:15:22 PM |
 |
|
gammapsi
Germany
Posts |
Posted - 06/11/2007 : 05:03:03 AM
|
Thanks for the information, Mike, I appreciate it.
|
 |
|
|
Topic  |
|
|
|