6.1.7 Smart Peak Labels with Leader Line


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

Summary

For the line/symbol plot in 2D Cartesian coordinate system, Origin supports smart labels which can be auto re-positioned to avoid overlapping. Leader lines (both straight lines and oblique lines) can be added to connect the data points and their labels.

Smart Peak Labels with Leader Line 01.png

Minimum Origin Version Required: Origin 2016 SR0

What you will learn

This tutorial will show you how to:

  • Add smart labels with leader lines
  • Add a special data point and customzie its label

Steps to Add Smart labels

This tutorial is associated with <Origin EXE Folder>\Samples\Tutorial Data.opj.

  1. Open the Tutorial Data.opj and browse to the Smart Peak Labels with Leader Line folder in the Project Explorer.
  2. There are two sheets in A100527IR workbook. 100-52-7-IR is an IR absorbance data and Peak_Centers1 are peak center result found by Origin's Peak Analyzer tool.
  3. Highlight Col(B) in sheet 100-52-7-IR to plot a line graph by selecting Plot > Basic 2D : Line menu.
  4. Double click on layer 1 icon to open the Layer Contents dialog. Select col(pcy) in left panel. Click the dropdown list next to A button in the middle and select Scatter as plot type. Click -> button to add the data into the graph.
    Smart Peak Labels with Leader Line 02v.png
  5. In the Plot Details dialog, select second plot in the left panel, go to Symbol tab, do following settings:
    Smart Peak Labels with Leader Line 03.png
  6. Go to Label tab, check the Enable check box, do settings as below:
    Smart Peak Labels with Leader Line 04.png
  7. Click on the Apply button, you will see the some labels are overlapped.
    Smart Peak Labels with Leader Line 05.png
  8. Go back to Label tab, check the Auto Reposition to Avoid Overlapping check box, select Y for the Reposition Direction drop-down box and set the Leader Lines group as below. Also set Vertical Offset to be 170 so the leader lines are more obvious.
    Smart Peak Labels with Leader Line 06.png
  9. Click OK button to close the dialog. You will see the labels are repositioned smartly.

Steps to Customize a Single Point and its Label

  1. The highest peak's label can't be seen. Double-click on the Y axis to open the Axis dialog, go to Vertical icon in Scale tab, change From and To to -0.05 and 0.8, then click OK to apply the setting.
    Smart Peak Labels with Leader Line 10.png
  2. Press CTRL key down and double click the highest peak's label 1730 to open Plot Details dialog. A node 18 shows on left panel. It's the row indexing of the special point.
  3. Go to Label tab of this point and customize the further.
    Smart Peak Labels with Leader Line 08.png
  4. Go to Symbol tab to change the symbol shape and size.
    Smart Peak Labels with Leader Line 07.png

More Customization Steps

The following steps can further customize the graph to be exactly the same as the image in Summary.

  1. Double click X axis to open Axis dialog. set From and To for X axis to be 400 and 3500.
  2. To show top and right frames around the graph, select Grids tab in Axis dialog. Check Opposite check box under the Additional Lines branch for both Horizontal and Vertical.
  3. To change the layer size, select Format: Layer... from main menu to open the Plot Details dialog. On Size/Speed tab, change the layer size in the Layer Area group as below:
    Smart Peak Labels with Leader Line 09.png
  4. Select legend and press Delete key to delete the legend.