Customize Label above Gadget

In this blog, we are going to show a new feature that is introduced in Origin 2022b — Customize Label above ROI box of gadget. We are using quick fit gadget as an example to set custom label of fitting result, . The label text supports rich text and LabTalk expression and notation so once u customize the label, you can choose Output for all layers to get consistent label on all layers as shown in the following multi-panel graph. 

First download the zip file and unzip it to get the project file. Launch the project file in Origin and open the Data folder. Then follow the steps below:

  1.  With Graph1 activated, select from menu Gadgets: Quick Fit: Open Dialog. Under the Settings tab, make sure Function is set to Linear. Under ROI Box tab, set the X scale From = 40, To =140. Click OK button, the ROI box is added to the graph and the default label is shown on top.
  2. To customize the ROI box label, double click the yellow box to open the dialog again. Under ROI Box tab, expand Show on Center-Top of ROI Box and check the Custom Label box. Enter the following lines into the entry box and click Apply. Notice the ROI label gets updated.  Notice that rich text (\g(c)\+(2)) and LabTalk Script($(intercept, S.2)) is used here. Check the updated label.
    Fitting Function: y = $(intercept, S.2) + $(slope, .2) * x
    Reduced Chi-Sqr: \g(c)\+(2) = $(chisqr, *4)
    R Square: R\+(2) = $(cod, .4)

  3. To customize the output label:  Go to Label Box tab. The settings under this tab is to customize the label that will be added to the graph as the fitting result.  Make the following changes and make sure to set Parameter Table to Use ROI Box Tab Settings. This way the ROI label in step 3 will be used as the output label. Click OK.
  4. Click the triangle button on the upper right of the ROI box and select New Output. Click the x button to close the gadget.
  5. You can further edit the label, reposition it below the text object Buick.
  6. For multi-panel graphs, gadget will only show on one layer, but we can choose New Output to All Layers or press L key to execute the fit for all panels. Activate Graph2 and choose Gadget: Quick Fit: Open Dialog… Click the > next to Dialog Theme and choose <Last used> to load previous settings. Click OK.  Press L key or click the triangle button and select New Output for All Layers. Click X to close the yellow ROI box in first layer. 
  7. Now curve fitting is then performed on all layers and fitting result label is also added. Check the animation below on the steps of customize style of one output and paste the same forma to other labels.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です