8.8 Adding or Swapping Data Plots in the Graph Layer
Typically, Origin graphs are created by (1) selecting data and (2) clicking on a toolbar button or Plot menu command. Eventually, you may encounter situations in which you would like to manually add or remove one or more data plots in an existing graph and these procedures are discussed below.
The Add Plot to Layer menu commands
This method supports only Line, Scatter, Line + Symbol, Column (or Bar) or Area plots. This is a straightforward method for adding selected worksheet data to the active graph layer. If you select multiple Y datasets (columns), the data are grouped in the layer and plot characteristics automatically increment by dataset.
To learn more, see the topic Adding Data with the Add Plot to Layer Menu Command.
Dragging data into the graph
You can create simple 2D plots by dragging and dropping selected worksheet data onto an Origin graph window. Note that this doesn't work for graphs which require Origin to do some behind-the-scenes calculating, as is the case with statistical chart types.
To learn more, see the topic Adding Data by Drag and Drop.
Adding data by copying and pasting a plot
You can copy a plot from an existing graph window and paste it into the same or another window.
- Click on the plot to select it and press CTRL+C.
- Click on the target graph and press CTRL+V.
Simultaneously, a ClipbN worksheet is created. You can open this worksheet by double-clicking on the plot, then clicking the Workbook button at the bottom of Plot Details; or right-click on the plot in the graph window or in the Object Manager and choose Create worksheet ClipbN.
You can also "paste" a copied plot to a worksheet cell. Select a cell and press CTRL+V to fill the column(s) with plot data.
The Layer Contents dialog box
The Layer Contents dialog box is useful for:
- Easy adding and removing of datasets (data plots) from the active graph layer
- Filtering the list of available data, and sort by book, sheet, or long name etc to easily locate desired datasets
- Changing the order of datasets in the layer (affects plot drawing order)
- Grouping (or ungrouping) of datasets
- Editing the plot range
To learn more, see The Layer Contents Dialog Box.
The Plot Setup dialog box
The Plot Setup dialog box provides a flexible interface for:
- adding or removing of datasets (data plots) from any layer in the graph window
- specifying or modifying the plot type
- grouping (or ungrouping) of datasets
- editing the plot range
To learn more, see The Plot Setup Dialog Box.
Direct import of ASCII data
It is also possible to import an ASCII file directly into a graph window. This works only for a few simple plot types (line, line + symbol, column and bar). To learn more about this method, see Adding Data by Direct ASCII Import.
Changing the datasets associated with a plot
You can change datasets associated with a plot, using a context menu command:
- Click on the plot to select, then right-click and point to Change X/ Change Y/ Change Z(only for 3D and Contour Graphs).
- Choose another column from the original worksheet.
Note that you can override the original column plot designation using this method (e.g. you could point to Change X and select a worksheet column that was designated Y).
If you have multiple workbooks, each of which has a worksheet with ...
- identical sheet short names
- identical column short names
- identical column plot designations
- matching column indexes
... you can swap plots by choosing another workbook.
- To choose from datasets in another workbook, click on the plot to select, then right-click and point to Change Worksheet.