| T O P I C R E V I E W |
| deomlew |
Posted - 11/13/2006 : 05:59:32 AM Origin Version (Select Help-->About Origin): origin 7.0 sr04 Operating System: windowsxp
Hello,
I have a new question. Using the example "automation", I can now, via drag and drop, plot and fit my datafiles. It would be nice though if I could also get the fit results of all these separate files in one worksheet. Besides, it would be very convenient if all the graphs would also be shown in one plot. The problem is though that all my datafiles are processed separately. Does anyone know if there is an origin example that can give me some clues of how to implement this in my script? Tnx! |
| 4 L A T E S T R E P L I E S (Newest First) |
| deomlew |
Posted - 11/14/2006 : 03:36:17 AM great! that was it for now:) tnx |
| Mike Buess |
Posted - 11/13/2006 : 12:51:25 PM Glad the first part is working. I think you can create the graph you want by replacing GraphPage grphAllPlots; with GraphPage grphAllPlots("AllPlots");
Mike Buess Origin WebRing Member |
| deomlew |
Posted - 11/13/2006 : 12:27:18 PM Tanks again! I am getting my fit parameters in one wks now. Regarding the all-in-1-plot: it is the raw data that I would like to have in one graph. I tried it in the following way, but instead of one plot, origin returns separate plots, renaming them by adding a number (allplots, allplots1, allplots2, etc.)
// Declare a curve object using x,y columns of worksheet Curve crvData(wksData, 2, 3); // Get name of curve string strYDataName; crvData.GetName(strYDataName); // Get graph template name string strGraphTemplateName = LabTalk.System.Path.Program$ + "Samples\Programming\Automation\Automationb.OTP"; //create graph allplots in case that it is not already existing GraphPage grphAllPlots; if( !grphAllPlots ) { bool cRetG = grphAllPlots.Create(strGraphTemplateName, nOptionG); grphAllPlots.Rename("AllPlots"); // Rename the worksheetPage to allplots } // Declare active layer in current graph page GraphLayer grphLayerAllPlots = grphAllPlots.Layers(); // Plot data curve to active layer int mPlot = grphLayerAllPlots.AddPlot(crvData, IDM_PLOT_SCATTER); grphLayerAllPlots.Rescale(); |
| Mike Buess |
Posted - 11/13/2006 : 10:06:11 AM This is an easy way to collect all parameters into one worksheet...
1. Download and install the MultiFit addon from the File Exchange. 2. Insert the line void mf2wks(string); after #include <Origin.h> in your version of Automation.c. 3. Insert the line mf2wks("Params"); before fldRootFolder.Activate();.
All parameters will be appended to a worksheet like that shown in the MultiFit description. I think we need to see your current code before suggesting changes to plot all data in one graph. Also, do you want to plot raw data, fitted curve or both?
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 11/13/2006 10:22:04 AM |
|
|