6.7.7 Panel Graph with Inset Plots of High-resolution Electron Energy-loss Spectra



Video Image.png Video Text Image.png Website blog icon circle.png Blog Image 33x33px.png

Summary

Origin can be used to create a three panel graph with inset plots similar to the image shown below:
Energy-loss Spectra22.png

Minimum Origin Version Required: 2015 SR0

What you will learn

This tutorial will demonstrate how to:

  • Use the Plot Setup dialog to create curves on one graph using data from multiple workbooks.
  • Add Inset Graphs.
  • Copy and Paste Style formats.
  • Use the Layer Management dialog to link axes.

Steps

Using the Plot Setup dialog

This tutorial is associated with <origin exe folder>\Samples\Tutorial Data.opj.

  1. Open the Tutorial Data.opj and
    go to the folder Three Panel Graph with Inset Graphs.
  2. Activate the workbooks Measured and Original name: BOS".
  3. Ensure that nothing is selected in either workbook and click the line button Button Line.png on the 2D Graphing toolbar.
  4. This will bring up the Plot Setup dialog box.
    Energy-loss Spectra02.png

    In order to show all three panels in Plot Setup dialog, please expand Plot Type panel by clicking Button Expand Preview Up.png and expand Available Data panel by clicking Button Expand Preview Up.png again.

  5. Under Available Data select the Worksheets in Folder option from the drop-down list. This will ensure that in the panel to the right, data is available from all the workbooks in the current folder.
    Energy-loss Spectra03.png
  6. Make sure that the Original name: BOS worksheet is selected as shown above. In the center panel enable the box corresponding to X and A4 and the second box corresponding to Y and B4.
  7. This will set col(A4) as the X values and col(B4) as the Y values regardless of column designation in the workbook. Select Add and a new curve will be created in the pre-existing Layer on the third panel:
    Energy-loss Spectra04.png
  8. On the first panel, change the highlighted workbook to Measured.
  9. On the left, set Plot Type to Scatter.
  10. On the second panel, select the check boxes as shown below:
    Energy-loss Spectra05.png
  11. Select Add and the plot will be added to the Layer in the third panel. Select OK to close the dialog box. Your graph should look like the one shown below:
    Energy-loss Spectra06.png
  12. Activate one of the workbooks and follow the procedure above to create two more graphs using the following designations in the Plot Setup dialog (remember to change the plot type to Scatter for the data from Measured):
Graph 2
Worksheet Name Set X as Set Y as
Original name: BOS A1 B1
Measured C D
Graph 3
Worksheet Name Set X as Set Y as
Original name: BOS A2 B2
Measured A B


Adding Inset Graphs

  1. Select the Add Inset Graph With Data button Button Add Inset Graph With Data.png on the Graph toolbar to add an inset graph to each graph. Each inset graph appears on its own layer and each graph can be customized, zoomed, panned and moved around like the full-size parent graph it was created from.
  2. Select and drag each graph to the center:
    Energy-loss Spectra10.png

Merging Graphs

  1. From the Origin menu select Graph: Merge Graph Windows: Open Dialog. Alternatively select the Button Merge.png button on the Graphs toolbar.
  2. In the Graph Manipulation: merge_graph dialog that opens, under Arrange Settings, set the Number of Rows as 3 and the Number of Columns to 1. The Preview will appear on a panel to the right.
  3. Enable the check box for Treat Each Source Graph as a Unit, to keep the graphs and the corresponding inset graphs linked.
  4. Enable Show Axes Frames to add frames around each graph:
    Energy-loss Spectra11.png
  5. Click OK to exit the dialog.

Customizing Plots and the Copy Format Feature

  1. Double-click the first graph to open the Plot Details dialog box.
  2. Use the Button Expand Left.png button to expand the left panel. Click on the arrow next to the Layer1 icon to expand it and show the layer 1 contents.
  3. Select the plot [ Measured ]Sheet1!E[ X ]... and on the Symbol tab, change the symbol to a circle, the Size as 5 and the Symbol Color to Red as shown below. Select Apply.
    Energy-loss Spectra12.png
  4. Select the plot [ Fitted ]Sheet1!A4[ X ],B4... and on the Line tab set the line color as Blue.
  5. Click OK to exit the dialog box.
  6. The next step is to apply this color scheme to all the parent graphs and inset graphs to avoid manually changing them all. Right-click on the customized graph and from the context menu select Copy Format: All Style Format:
    Energy-loss Spectra13.png
  7. Right-click on each remaining graph and select Paste Format from the context menu.
    Energy-loss Spectra14.png

Beginning with Origin 2018b, you can use the Plot Details Common Display controls for simultaneous editing of layer, plot and axis properties in a multi-layer graph. For more information, see The (Plot Details) Layers tab controls.

Using the Layer Management Dialog Box to Link and Customize Axes

The next step is to set the scales on the axes and add axis breaks to show the important parts of the graphs.

  1. Select Graph: Layer Management. In the dialog box that opens there will be a panel named Layer Selection on the left. It lists all six of the layers in this graph - 3 for parent graphs and 3 for inset graphs.
  2. In order to customize one parent graph axis and have the changes implemented on the other two parent graphs, the axes are linked in the Link tab. The first Layer cannot be linked so it is the one that is customized and the other graphs are linked to it. Select Layer 3 and in the Link tab set Link to as 1 and set X Axis Link and Y Axis Link as Straight[1 to 1] as shown below:
    Energy-loss Spectra15.png
  3. Click Apply.
  4. Do the same for Layer 5 and click Apply.
  5. Click OK to exit the dialog box.
  6. Double-click any axis on the first graph to open the Axis Dialog.
  7. Go to Horizontal icon in Scale tab, set From and To to -250 and 1500. Set the Increment Value on the Major Ticks section as 250.
    Energy-loss Spectra07.png
  8. Go to Horizontal icon in the Breaks tab, set Number of Breaks to 1.
  9. Select Break 1 under the Breaks node and create a break From: 850, To: 1250.
  10. On the same page, clear the Auto check box for Position (% of Axis Length) and set it as 75.
    Energy-loss Spectra08.png
  11. Go to Vertical icon in Scale tab, set the scale as From: 0, To: 0.22 with increments of 0.1.
    Energy-loss Spectra09.png
  12. Select OK. All three graphs will now reflect your changes.
  13. To customize the Inset Graphs, zoom into the first one on Layer2 using the Zoom Pan button Button Panning.png on the Tools toolbar. Use the mouse wheel to zoom in.
    Energy-loss Spectra16.png
  14. Once zoomed in, select the Pointer button Button Pointer.png on the Tools toolbar to exit the zoom mode. Double-click on the Inset Graph to open the Plot Details dialog. Select the [Measured]Sheet1!E[X]... graph and on the Drop Lines tab, check the Vertical box. Click OK.
    Energy-loss Spectra17.png
  15. Double-click on any axis.
  16. In the Axis Dialog that opens, set the scale for the X Axis on the Scale tab From: 1350, To: 1450, with increments of 50.
  17. Under the Vertical icon, set the scale From: 0, To: 0.03. Go to Lines and Ticks tab and on the left icon, set the Major Ticks to None and the Minor Ticks to None.
  18. Select OK to exit the dialog box. Select the tick labels on the left Y axis and press Delete to remove them. Do the same with axis labels.
  19. Press CTRL+W to zoom out and return to normal graph size.
  20. Select the customized Inset Graph, right-click and choose Copy Format: All Style Formats from the context menu.
  21. Select, right-click and Paste Format to the other two Inset Graphs, to duplicate the drop lines settings.
  22. Repeat the last two steps, this time selecting Copy Format: Scales to duplicate the axis settings.

Adding Titles, Legend and Text Objects

  1. Activate the first Layer by clicking the layer icon on the top left corner of the graph. Right-click on the graph and from the context menu choose Add/Modify Layer Titles. Type Wurtzite GaN in the box that opens, change the font size and type face as desired and drag to an appropriate position:
    Energy-loss Spectra18.png
  2. Select the legend objects for the second and third graphs and press DELETE.
  3. Select the remaining legend, right-click and choose Properties. In the Text tab of Object Properties dialog box, type Fitted in place of %(1) and Measured in place of %(2). Place both on the same line. Set the font size as desired. Go to Frame tab, and set the Frame to None. Click OK and drag the legend object to an appropriate place.
    Energy-loss Spectra19.png
  4. Delete the first and third Y-axis titles. Double-click the second one and type Intensity [arb. units]. Do the same for the single X-Axis title, labeling it Energy Loss [cm-1].
  5. Right-click on the graph and choose Add Text from the context menu or choose the Button Text Tool.png button on the Tools tool bar. Add text objects as shown below. Use the Button Subscript.png button for writing subscripts:
    Energy-loss Spectra20.png
  6. Select each of the inset graphs and change size or position as desired. Use the Button Arrow Tool.png button on the Tools toolbar to create arrows where desired on the Inset Graphs:
    Energy-loss Spectra21.png
  7. The final graph should appear as shown below:
    Energy-loss Spectra22.png