Welcome

Welcome to the Origin Reference v7.5

Follow these links to find information on the following topics:

  • The User Files Folder

  • Multimedia Demonstrations

  • New Features in Origin 7.5

  • Software System Requirements

  • Registering Your Copy of Origin

  • Getting Help

  • Origin on the Web

  • Technical Support Contact Information


New Features

Origin's Import Wizard is an interactive dialog box that assists you in developing custom data import routines for ASCII, Binary, and User-Defined file types. As you step through the Wizard pages, you will develop a particular group of settings that will allow for exacting import of your data files.

What's more, you can save these import settings to an Origin Import Filter file (*.OIF) for future use with the same or similarly-structured data files.

To learn more about importing your ASCII, simple binary, and user-defined data files into Origin, see The Import Wizard.

Themes allow apply stylistic elements of an object or a graph to other Origin objects or graphs.

For instance, you might have a collection of graphs that you wished to include in a report, but you see that some stylistic elements were not uniformly applied when the graphs were created. Apply a Theme to these graphs, and they all take on a uniform appearance, thus saving you the trouble of going through each graph and manually adjusting those stylistic details.

In addition, you or your company might develop a System Theme that gives your organization's graphs a consistent and distinctive appearance no matter who is doing the work.

To learn more, see Themes.

When multiple worksheet columns are selected and plotted through the Plot menu (or from one of the graph toolbars), data sets are -- by default -- grouped within a graph layer.

Use Group Incremental Lists to automatically assign a visually distinct set of plot characteristics to each data set in the group. This feature works by incrementing through the members of a style list for each plot element -- Line Color, Symbol Type, Line Style, etc. -- that you have chosen to increment. In addition to choosing which elements to increment, you can customize the Group Incremental Lists themselves, adding, removing, and rearranging list members as needed and you can name and save Group Incremental Lists for future use.

To learn more, see Group Incremental Lists.

The Plot Setup dialog box provides a flexible interface for adding or removing data sets from your graph windows. You can add or remove any data set in the Origin project to your graph and you can do so without the need to change the column Plot Designations that control how the data plot in the graph (as X, Y, error bar, label, etc.).

Additionally, as you add plots to your graph windows, you can use the graph window's current plot type or you can add plots of a different type (within limits) "on the fly." Thus, it becomes a simple process to mix plot types such as line, scatter, line & symbol, column, etc.

The Plot Setup dialog box replaces the Select Columns for Plotting dialog box. Additionally, it duplicates the functionality of the Layer n dialog box (though this dialog box is retained), thus providing an "all-in-one" dialog box for adding or removing data plots from your graph.

To learn more, see The Plot Setup Dialog Box.

Origin's Set Column Values feature allows you to define data set values as a function of data values in other worksheet columns. Formulae can refer to other data in the same worksheet or data in other worksheets. Formulae can contain Origin’s built-in math and statistical functions as well as compiled Origin C functions that take double or vector as an argument.

The new AutoUpdate of Set Column Values feature permits dynamic updates of target data set values whenever source data set values change. Using this feature, you can plot data and see your graph update dynamically as source data change.

To learn more, see AutoUpdate of Worksheet Data.

You can now attach files of any type to your Origin Project (OPJ) files; you are not limited to file types recognized by Origin. So, when sharing files with colleagues -- in addition to Origin C (.c) and LabTalk Script (.ogs) or Excel files -- you can attach Word Documents, PDFs, images, etc. and these supporting files will "travel" with the Origin Project file.

To learn more, see Sharing Your Project Files.

The Layer Tool is useful for a number of graph formatting procedures such as adding new layers, or arranging layers on the graph page. This tool has been redesigned for Origin 7.5.

To learn more, see these and related topics:

  • Adding Layers with the Layer Tool

  • Arranging and Resizing Layers

  • Reference: The Layer Tool

In Origin 7, we introduced the Style toolbar as a means of quickly formatting annotation objects such as text, lines, rectangles, etc. In Origin 7.5, we have added support for changing actual data plot attributes -- line & symbol colors, line style and width, fill patterns and colors, etc.

For grouped data sets, the edge and fill-color drop-down lists support the new Group Incremental List feature, allowing you to quickly apply previously saved, plot-differentiating incremental color lists to your Origin graphs. Apply any number of color or gray-scale schemes to your grouped data plots with just a couple of mouse clicks.

To learn more, see The Style Toolbar.

Speed Mode is method of systematically reducing the number of plotted data points that display on your screen. It is applicable to both 2D or 3D graphs. A new color-coded graph layer icon and optional non-printing graph watermark provide visual cues to remind you when Speed Mode has been enabled (or disabled).

To learn more, see Speed Mode.

Click selection of graph objects -- particularly data plots and graph axes -- has been expanded. For instance, you can now you can individually select X and Y axes in a 2D plot and nudge the axes to achieve offsets.

Origin 7.5 supports direct import of numeric or character arrays and sparse arrays that have been saved to MATLAB *.MAT files.

To learn more, see Importing MATLAB Files.

This feature allows Origin users to issue MATLAB commands from Origin, transfer data between Origin and MATLAB, and open MATLAB workspace files to import data into Origin. To make use of this feature, you must have both Origin and MATLAB installed on your computer.

To learn more, see MATLAB Console and Data Exchange.

This feature allows Origin users to run a LabVIEW Virtual Instrument in the Origin environment, transfer data between Origin and LabVIEW, and open LabVIEW files to import data into Origin.

In order to utilize this feature, you must have both Origin and LabVIEW installed on your computer.

To learn more, see LabVIEW VI Browser and Data Exchange.

The GetN (Get Number) dialog box is a dynamically generated, powerful, and easy-to-use graphical-user-interface device. It supports input from a variety of user-specified interface controls, validates numeric input, then directly stores entered values in a user-defined tree structure. Values stored in the tree structure are subsequently accessible by the calling program. The GetN dialog box includes OK and Cancel buttons and, optionally, an Apply button. Event handling on user entry is also supported.

To create a GetN dialog box, you only need to define an Origin C Tree structure and then pass it as an argument to the Origin C function GetNBox. The tree, and the nodes of the tree, are declared and initialized by calling one of several predefined Origin C macros. Each macro declares a type of node in the tree and each type of node is associated with a particular type of user interface control. The tree is passed to the GetNBox function which, in turn, opens the GetN dialog box and dynamically creates the associated user interface controls for each node in the declared tree.

To learn more, select Help:Programming and search for Index keyword: GetN.

The Microsoft Component Object Model (COM) is a software architecture that allows applications to be built from binary software components. COM is the underlying architecture that forms the foundation for higher-level software services, like those provided by OLE (Object Linking and Embedding). COM provides a means by which two applications can communicate by calling each other’s methods. For example, Microsoft's Internet Explorer web browser supports calling COM objects through script, making it possible to create Web pages that tap into the functionality of other applications.

OriginPro 7 added COM client support to the Origin C programming environment. This allowed OriginPro to access COM components of other applications (such as Microsoft Word, Excel) from OriginPro. While Origin C COM client code could only be compiled in OriginPro, the pre-parsed file (.OP file) was distributable to standard Origin users.

Origin 7.5 adds Automation Server functionality, whereby other applications (such as Microsoft Excel or Internet Explorer) communicate with Origin via COM. Automation Server programming is supported in both the standard and Pro versions of Origin, while OriginPro adds access control for multiple clients (such as multiple web pages) to allow an application to communicate with a single instance of OriginPro.

To learn more, open the Programming Help file (Help:Programming) and look up Index keyword: Automation Server.

User-defined classes allow Origin C programmers to create objects of their own type with user-defined methods and data members. Origin C user-defined classes support the dynamic allocation of objects using the new and delete operators, data and function encapsulation with the access control keywords public, private, and protected, overloading of class methods, class derivation and object inheritance, casting, object containership, and polymorphism (or code re-use) with virtual functions. User-defined objects can self-reference using the this pointer.

For more information, open the Programming Help file (Help:Programming) and look up Index keyword: User-Defined Classes.

You can now embed third-party ActiveX components in the custom dialogs that you create with OriginPro's Dialog Builder technology. For example, some of the new dialog boxes appearing in Origin 7.5 -- the Theme Gallery, the Plot Setup dialog box, and certain pages of the Import Wizard -- incorporate the VSFlexGrid® ActiveX component from ComponentOne.

To learn more, open the Programming Help file (Help:Programming) and look up Index keyword: ActiveX.

New Features

User-Interface Features

  • Data Import Wizard with Support for ASCII, Binary and User-Defined File Types

  • Graph Themes

  • Group Incremental Lists for Customizing Grouped Data Plots

  • A New Plot Setup Dialog Box

  • AutoUpdate of Set Column Values

  • Attaching Supporting Files to the Origin Project File

  • Improved Layer Tool

  • Improvements to the Style Toolbar

  • Speed Mode Indicator for 2D and 3D Graphs

  • Better Click Selection of Graph Objects

  • Direct import of MATLAB .MAT files

  • MATLAB Console and Data Transfer

  • LabVIEW VI Browser and Data Exchange

Programming Features

  • Origin C-based GetN dialog box

  • Automation Server Support

  • User-Defined Classes in Origin C

  • Including ActiveX Controls in Dialog Builder Custom Tools (OriginPro)


Multimedia Demonstrations

Sprinkled throughout this Help file are links to topic-relevant multimedia demonstrations. Wherever you see the camera icon [image], click the hyperlinked text to the right to view a brief feature demo.

If you opted not to install the demonstrations when you installed Origin, you can:

  • Install them by running the Modify portion of the Origin Installation program.

  • View the Multimedia files directly from the Product CD.

These files can also be downloaded from the OriginLab website.

In order to view these demonstrations you will need the Macromedia® Flash™ Player. Click the image below to download the latest player (The player is a plug-in to your IE browser and will not be visible to you).


  1. Select Register now... and click Click here to Register on-line and receive your Registration ID.

  2. Follow the on-line directions to log in to the OriginLab website and register your Origin serial number.

  3. Your Registration ID will be returned by e-mail.

  4. In the Registration dialog box, select I'm already registered. My Registration ID is and enter your Registration ID in the text box to the right.

  5. Click OK.

  1. Select I'm already registered. My Registration ID is and enter your Registration ID in the text box to the right.

  2. Click OK.

Registering Origin

Registering your copy of Origin will ensure your access to:

  • Toll-free technical support.

  • Notification of service releases and new products.

  • Add-On Modules.

  • Participation in the Origin User Forums.

How to Register:

  1. From the Origin menu, select Help: Register on-line...

  2. Proceed to the Registration dialog box.

    • If you have not previously registered your copy of Origin, do this:

    • If you have registered your copy of Origin but have not entered your Registration ID into your Origin software, do this:

Tip: When your Registration ID is returned by e-mail, cut and paste the ID from the e-mail into the Registration dialog box. This eliminates transcription errors.

Note: If you are sharing an Origin copy (multiple users on a single computer), your copy may already have a Registration ID entered into the software. In this case, simply store your Registration ID away; you may need it at some point to download add-on tools, patch files, etc.


Software System Requirements

Recommended System Configuration for Origin 7.5:

  • Microsoft Windows XP Professional.

  • PC with a Pentium III processor.

  • 128 MB of RAM.

Minimum System Requirements:

Operating System: Windows 98SE or Millennium Edition (Windows Me); Windows NT 4.0 with Service Pack 6 (SP6) or later; Windows 2000, or Windows XP or later.

Computer Processor: Pentium 133 MHz or higher processor.

Memory: Windows 98SE, Me, NT (SP6 or later), 2000 with 64 MB of RAM; Windows XP with 128 MB of RAM.

Hard Disk: 100 MB* of free hard disk space.

Drive: CD-ROM drive.

Display: Super VGA (800 x 600) or higher-resolution monitor with 256 colors.

Other: Internet Explorer version 5.0 or later. Internet Explorer need not be your default browser, but it must be installed for viewing Origin's compiled HTML Help.

*Note: Hard disk space requirements will vary depending on the configuration. Additionally, custom installation choices may require more or less hard disk space.


Online Help

Origin's online help system is designed to be a comprehensive and portable reference for your Origin software. Note that your Help browser has four tabs:

  • Contents. The Contents tab provides a outline view of information in the Origin Help file.

  • Index. The Index tab allows you to search on a keyword to find relevant topics.

  • Search. If you do not find what you are looking for in the index, you may well find it using the Search tab. To narrow the search, try enclosing a string in quotes. The search tab supports Boolean searches (AND/OR/NOT).

  • Favorites. Add frequently-visited topics to your Favorites tab. Favorite topics are retained when the Help file is closed.

Getting Help for Dialog Box Controls (Context Sensitive Help)

The online help system has also been designed to provide context sensitive help. Most Origin dialog boxes are linked to a topic in the Help file that describes pertinent concepts and dialog box controls.

To open one these dialog box-linked Help topics:

  1. Make sure that the dialog box is active.

  2. Press the F1 key.

or

  2. Click the [image] button in the top right corner of the dialog box.


Origin on the Web

Online Demonstrations | Real-time online Origin demonstrations.
Knowledge Base | Tips, scripts, technical review articles and more.
Origin User Forums | Share your questions and solutions with Origin users worldwide.
Tech Review Articles | Get an in-depth look at many Origin features.
Graph Gallery | View outstanding graphs created by Origin users in the science and engineering fields.
Audio-Visual Tutorials | Learn Origin tips and tricks.
Add-On Modules | Add-ons extend Origin's functionality.
Training | Jump start your project by learning from the experts.
Consulting | OriginLab provides custom-tailored solutions to your graphing and analysis problems.


Technical Support

OriginLab and our team of international support representatives are committed to providing high quality, free-of-charge standard technical support to our registered users (some inquiries may require a prearranged consultation fee).

  • For registered users in the US and Canada (and in countries that do not have a support representative), click here to reach OriginLab Technical Support or contact us by phone at (800)969-7720 (US) or (413)586-2013 (US and Canada).

  • For European customers, click here to reach your Origin technical support representative.

  • For all other users, click here to reach your Origin technical support representative.


The Origin Workspace

This figure lists the primary components of the Origin user interface. For an introduction to each component, follow the links on the left side of the page.


Windows

Origin provides these moveable, sizeable child windows for organizing, analyzing and displaying your work:

  • Worksheets. The worksheet provides a framework for organizing, analyzing, transforming, and plotting your data. The worksheet may also contain annotations and/or programmable button objects that perform some custom routine. Read more.

  • Graphs. The graph window is used primarily for plotting data. The graph may also contain annotations (text and drawing objects) or button objects that perform some custom routine. Read more.

  • Layout. The layout window allows you to combine and arrange graph and worksheet windows and various annotations onto a single "display panel." It is used primarily for creating presentations. Read more.

  • Function graphs. The function graph is a specialized graph window that displays a curve described by a function. The function graph differs from other Origin graphs in that there is not a dataset of discreet values associated with the plot. Read more.

  • Excel workbooks. Excel workbooks can be opened or created in Origin. Workbooks can be saved separately or as part of your Origin project file. Read more.

  • Matrixes. The matrix is a single dataset of Z values. The matrix is the precursor to creating 3D surface and contour graphs. Read more.

  • Notes. The notes window is a text-only window used for recording information. Read more.


Opening a New Child Window

  1. Click one of the New Window buttons on the Standard toolbar.

or

  1. From the menu, select File: New.

  2. Select the desired Window type in the list box. The Template group registers the Path and Name of the default template file for window type Window.

  3. Click OK.

  1. Select File:New. This opens the New dialog box.

  2. Select the window of type Window from the list box.

  3. Select the desired template from the Template group.

  4. Click Set Default to associate this template with the New Window button on the Standard toolbar.

  1. Click on the child window to ensure that it is the active window.

  2. From the menu, select File: Save Template As...

  3. Choose the Save In folder, give the template a File Name, and Save as Type (*.OTW, *.OTP, *.OGM, etc.).

  1. Select File: New.

  2. Select window of type Window.

  3. Note the Path and Name (Template group). This is the default template of type Window.

  4. Close the New dialog by clicking Cancel.

  5. Click on the window of type Window that you want to save as your default template.

  6. Choose File: Save Template As...

  7. Save the child window using the default Window Path and Name.

  1. Click on your custom child window to make sure that it is the active window.

  2. Choose File: Save Template As...

  3. Choose the Save In folder, give the template a File Name, and Save as Type (*.OTW, *.OTP, etc).

  4. From the Origin menu, choose File: New...

  5. Select the window of type Window.

  6. Click the button to the right of Path.

  7. Browse to the Folder Name that contains your recently saved template file and click OK.

  8. Choose the Name of your custom template from the drop-down list and click Set Default.

  9. Click OK. Origin will now use this template as the default template of type Window.

  • To move a window, drag the window title bar.

  • To manually resize a window, drag a corner of the window with your mouse.

  • To maximize a window, click the maximize button in the upper-right corner of the window.

  • To minimize a window, click the minimize button in the upper-right corner of the window.

To hide or delete a window:

  1. Click Close [image] in the upper-right corner of the window. An attention dialog box prompts you to Delete or Hide the window (or to Cancel the action).

  2. Click Hide to remove the window from the workspace (window not deleted from the Origin project).

or

  2. Click Delete to permanently remove the window from the Origin project.

Alternately:

  1. Right-click on the window icon in Project Explorer and choose Hide Window or Delete Window from the shortcut menu.

or

  1. Toggle between Show Window and Hide Window by double-clicking the window icon in Project Explorer.

  1. From the Origin menu, choose Window: Duplicate.

or

  1. On the Standard toolbar, click Duplicate [image].

Opening a New Child Window

Origin child windows are created using templates. The New Worksheet button [image], for instance, creates a worksheet based on the ORIGIN.OTW template.

Child Window Templates:

  • Open a new window based on a default template.

  • Change the (default) template that is associated with one of these Standard toolbar buttons.

  • Save a custom child window as a template.

  • Save a custom child window using the Path and Name of the default template.

  • Save a custom child window using a new Path and Name and specify this file as your default Window template.

Other Child Window Operations:

  • Move or resize a window.

  • Hide or Delete a window.

  • Duplicate a window.

  • To rename or add a label to a window.


Renaming a Window

window names...

  • must be unique.

  • cannot contain spaces.

  • must begin with a letter.

  • cannot contain special characters (i.e.|, @, #, %, etc.).

  • are limited in length -- worksheet or matrix = 13 spaces; graph, function, or layout = 24 spaces.

  • do not allow spaces between characters.

window labels...

  • do not have to be unique (note that Origin uses the window name to id the window).

  • may contain spaces.

  • are not limited in length.

  • allow special characters.

Renaming a Window

To rename a worksheet, matrix, graph, layout page, or notes window:

  1. Activate the window and then select Window:Rename.

or

  1. Right-click on the window's title bar and select Rename from the shortcut menu.

Both actions open the Rename dialog box. Use this to rename or label (or both) the child window.

Rules for assigning worksheet names and labels:

To rename an Excel workbook window, see Renaming the Workbook.


Duplicating a Window

To duplicate the active worksheet, graph, matrix, or layout page window, click the Duplicate button [image] on the Standard toolbar. When a duplicate window is created, Origin names the window using the default window name syntax:

DefaultWindowNameN

where N is assigned the lowest available number not used by other window names (of the same type) in the project.

Default Window Names

Window | Default Name
Worksheet | WorksheetN
Graph | GraphN
Matrix | MatrixN
Layout Page | LayoutN
Function Graph | FunctionN


Refreshing a Window

Whenever you change the contents of a graph window or a worksheet, or expose a part of a window that was hidden, Origin automatically redraws the affected portion of the window. Occasionally, a portion of the window may not draw or update correctly.

Whenever this occurs, click the Refresh button [image] on the Standard toolbar to refresh the active window.

Note: To control the percentage of the window that must be exposed before Origin automatically redraws the window, select Tools:Options to open the Options dialog box. Select the Miscellaneous tab and then edit the No Redraw (% Covered) combination box.


if the new window is a worksheet, the template determines the number of columns in the worksheet, each column's plotting designation and display type, the ASCII import settings, and any formulas used to set the column values. If the new window is a graph, the template determines the number of layers (sets of XY axes) on the page and their arrangement, the types of data plots in each layer (for example, scatter or bars), the number of data plots, the axes scale type, and text labels and other annotations. Basically the template determines all the attributes of the window, except for the actual data the window will contain.

Window Templates

When you create a new worksheet, graph, or matrix window, (for example, by clicking the [image] , [image] , or [image] button on the Standard toolbar), Origin creates the new window based on a template. The template determines the properties of the new window. For example,

Note that data are not saved with a template.

File Extensions for Origin Child Window Templates:

Window | Template File Extension
worksheet | .OTW
graph | .OTP
matrix | .OTM


Worksheets

The worksheet is a type of Origin child window that serves primarily to organize your data. Data manipulation, exploration, and analysis operations are frequently performed in the worksheet. As with other Origin child windows, you may open and save multiple worksheet windows in your Origin project file.

When you run Origin, the workspace that opens contains, by default, a single Origin worksheet. This single, default Origin worksheet is constructed using a named Origin worksheet template -- ORIGIN.OTW. All Origin worksheets are based on a customizable worksheet template (.OTW) file. In addition to simple format options (e.g. page color, column width, font, etc.), worksheet templates can store file information regarding:

  • Data file import format (no. of header lines, separator, data format, etc.).

  • Column formulae for performing math operations on datasets and extracting data that meet specific criteria.

  • LabTalk scripts that perform a custom routine when triggered by a specific event (e.g. a button click, window refresh, etc.).


Graphs

The primary purpose of the graph window is to plot data. As is the case with worksheets and other Origin child windows, you may open and save multiple graph windows in an Origin project file.

Each graph window is comprised of a single editable page. This page may contain various graph objects including layers, axes, annotations and data plots. Information on the graph page is organized hierarchically.

The graph window (the page) may contain one or more graph layers and each graph layer may contain one or more data plots. Annotations (text and drawing objects) may be attached to the page or to a layer. To learn more about graph layers, see The Layer.

All Origin graphs are based on built-in graph template files. The graph template stores information about graph page size, number of graph layers, axis configuration(s), plot style(s) and colors, etc. Use of these template files simplifies graph creation; many graphs are created with a simple, two-step process.

  1. Select your data in the Origin worksheet.

  2. Click the appropriate graph toolbar button.

You can modify the details of any of these built-in graph templates and save your changes or you may modify a built-in template and save it with another name.


Matrices

  1. Click on the matrix window to activate it.

  2. Select View:Show XY.

  1. Select File:New. This menu command opens the New dialog box.

  2. Select Matrix from the Window Type list box.

  3. Select Origin from the Template drop-down list.

  4. Click OK to open a matrix window based on the ORIGIN.OTM template.

  1. Select File:Open.

  2. Select Matrix (*.OGM) from the Files of Type drop-down list.

  3. Select the file and click Open.

Matrices

The matrix window, like the worksheet window, is used to store and manipulate data. The matrix is a prerequisite for creating 3D surface and contour plots as well as image plots.

A matrix displays a single data set composed of Z values. Instead of displaying the data set as a column in a worksheet, a matrix displays the data as a 2D array (rows by columns). The matrix is...

  • linearly mapped in X by columns.

  • linearly mapped in Y by rows.

By default, the column and row numbers display in the column and row headings. To display X and Y values:

XYZ worksheet data are frequently converted to matrix data. Origin uses a number of methods for converting worksheet data to matrix data depending upon the nature of the worksheet data. These methods include direct conversion, 2D binning, converting regular XYZ data, and converting random XYZ data using gridding.

To open a new matrix:

To open a previously saved matrix window:


Layout Pages

The layout page window is a “display panel” for graphs and worksheets that have been created in other windows. You can add and arrange worksheets, graph pictures, and text and other annotations to your layout page to create presentations for print, for graphic export, or for sharing with other applications via the Windows Clipboard.

To open a layout page window.

To learn more about creating presentations with the Layout Page window, see The Layout Page.

Click here to view a multi-media demonstration


Function Graphs

The function graph window is a customized graph window providing graphical display and manipulation of functions. The user-defined function must be of the form y = f(x).

To learn more about function graphs, see Plotting Functions.


Excel Workbooks

The Excel Workbook Window

The ability to open and edit Excel workbooks in Origin brings Origin's technical plotting capabilities to Excel spreadsheets. To make use of this feature, you must meet these minimal requirements.

When the Excel workbook window is active in Origin, a composite menu bar displays Origin's File, Plot, and Window menus plus Excel's Edit, View, Insert, Format, Tools, Data, Accounting, and Help menus. Likewise, a combination of Excel and Origin toolbars are available.

Shortcut menus pertinent to the Excel workbook window also provide menu command access:

  • A Right-click in the workbook window opens an Excel shortcut menu.

  • A Right-click on the title bar of a workbook window opens an Origin shortcut menu.


Notes Windows

Notes windows are text-only windows used for recording information. Use them for:

  • recording analysis procedures.

  • making notes to students and colleagues.

  • cutting and pasting text to and from other applications.

An Origin project file can have any number of notes windows. You can save the contents of notes windows with the Origin project file or you can save the contents of a notes window as a TXT file.

To save your notes as a text file:


Menus and Menu Commands

The Worksheet Window Menu Bar:

The Graph Window Menu Bar:

The Worksheet and Graph Analysis Menus:

For more information, see Menus by Window Type.

  • Full Menus. All menu commands are accessible. To display all menu commands:

  • Short Menus. A reduced set of menu commands for performing basic operations only. To display a reduced set of menu commands:

  1. From the Origin menu, select Format:Menu:Full Menus (Note that an Excel workbook cannot be the active window).

  1. From the Origin menu, select Format:Menu:Short Menus (Excel workbook cannot be the active window).

If available, the shortcut key displays to the right of the menu command. For example, when a worksheet window is active, you can press CTRL+F5 to access Set All Column Values (Note that you cannot use a shortcut key if the menu is open).

To open a shortcut menu, right-click on the object you want to act on. For example, a right-click on a text label, opens this shortcut menu:

The bitmap indicates that the menu command also has toolbar button access. To access the command from a toolbar, look for the toolbar button represented by the command's bitmap.

Accessing a Command from a Toolbar

Note: Some users running Origin through an interpreter (e.g. VirtualPC MAC systems, Linux/UNIX interpreters) or on remote systems (e.g. Terminal Server systems) experience long delays when opening menus. Turning off toolbar bitmaps may improve performance.

  • To turn off the display of bitmaps in the menus:

  1. Select Tools:Options to open the Options dialog box.

  2. Select the Miscellaneous tab and then clear Display Bitmaps in Menus.

  3. Click OK. You are prompted to save this setting for future Origin sessions or apply the setting only to this session.

Menus and Menu Commands

Origin's menu bar provides commands to perform operations on the active window and to perform general operations such as opening a Help file or turning on the display of a toolbar.

As you use Origin, keep these things in mind:

  • The menu bar is context sensitive; that is, it changes as you change the active window type. This ensures that only window-relevant menus and menu commands display. See an example.

  • Menus are also context sensitive. See an example.

Other menu-related issues to be aware of:

  • Origin provides two levels of menu complexity (and functionality):

  • Some menu commands have associated shortcut keys.

  • Many commands are also available from shortcut menus.

  • Some menu commands also have bitmaps that display to the left of the command.

For information on Toolbars, see Toolbars.


Menus by Window Type

Active Window | Menu Structure
worksheet |
graph |
matrix |
Excel workbook | When an Excel window is active in Origin, the menu bar displays both Origin and Excel menus. The File, Plot, and Window menus are Origin menus. All other menus are Excel menus. See, Excel Shortcut Menus
layout |
notes |


Toolbars

The "Tool-Tip"

The Standard toolbar in a docked position:

The Standard toolbar in a floating position:

The Toolbar Spacer

  • Standard

  • Graph

  • Format

  • Style

  • Tools

  • 2D Graphs

  • Edit

  • 2D Graphs Extended

  • 3D Graphs

  • 3D Rotation

  • Worksheet Data

  • Column

  • Layout

  • Mask

  • Object

  • Arrow

To float a toolbar:

  1. Drag a corner of the toolbar to the desired position (can be outside of workspace).

To dock a toolbar:

  1. Drag a corner of the toolbar to the desired position on the toolbar spacer.

or

  1. Double-click the toolbar title bar.

  1. Right-click in the blank area and select Hide Toolbar Spacer from the shortcut menu.

  2. When you re-activate an Excel workbook window or open a workbook, Origin will automatically create a toolbar spacer.

  1. From the menu, select Tools: Options.

  2. Click the Miscellaneous tab.

  3. Clear Use Toolbar Spacer.

  1. From the menu, choose View: Toolbars.

  2. Select or clear the box adjacent to the toolbar and Close.

If the toolbar is floating, click Close [image] (in the upper-right corner of the toolbar).

  1. From the menu, select View: Toolbars. This opens the Customize Toolbar dialog box.

  • To move a button, drag it to another toolbar.

  • To remove a toolbar button, drag it to the workspace (any place but to another toolbar).

  • To add a button, select the Button Groups tab, select Group, and drag the desired button to a toolbar.

Toolbars

Origin provides toolbar buttons for frequently used menu commands. As with menu commands, toolbars and toolbar buttons are context-sensitive.

When you point to a toolbar button with the mouse, a "tool-tip" displays the button name. A more detailed button description displays in the status bar at the bottom of the workspace.

Toolbars may be docked or floating.

If you work with Excel workbooks in Origin, you may have noticed that deactivating the Excel workbook type (e.g. closing the workbook or activating an Origin window type) leaves a blank area where the Excel toolbars were opened. This area is the toolbar spacer.

These toolbars are open when you first run Origin:

Additional toolbars that can be opened in the workspace:

Origin Toolbar Basic Operations:

  • Dock or float a toolbar.

  • Hide the toolbar spacer.

  • Prevent Origin from using the toolbar spacer.

  • Open or close a toolbar in the workspace.

  • Move, remove, or add buttons to a toolbar.

Click here to view a multi-media demonstration Customizing the Workspace

Click here to view a multi-media demonstration on Creating New Toolbars


Standard Toolbar

The Standard Toolbar

opens a new Origin project. If current project edits are not saved, you are prompted to save your changes.

opens a new worksheet window based on the default worksheet template.

opens a new Excel workbook window.

opens a new graph window based on the default graph template.

opens a new matrix window based on the default matrix template.

opens a new function graph window and simultaneously opens the Function tab of the Plot Details dialog box.

opens a new layout window.

opens a new notes window.

opens the Open dialog box (Generic: OPJ, ORG, OGW, OGG, OGM, TXT, etc.).

opens the Open dialog box (Specific: OTP, OTW, OTM).

opens the Open dialog box (Specific: XLS).

saves the Origin project file.

saves the active window with the name of the template upon which the window is based.

opens the Import ASCII dialog box (TXT, DAT, CSV, *.*).

opens the Import Multiple ASCII dialog box (TXT, DAT, CSV, *.*).

sends the active window to the printer without prompting; the current Page Setup and default printer settings are used.

refreshes the active window.

duplicates the active window.

calls the [Main] section of the editable LabTalk script file, CUSTOM.OGS. [Main] can be your own analysis/graphing routine.

toggles Project Explorer on and off.

toggles the Results Log on and off.

toggles the Script Window on and off.

opens Code Builder, the Origin C Integrated Development Environment (IDE).

adds a new column to the end of the active worksheet.


Graph Toolbar

The Graph Toolbar

zooms in on the graph, centering on the point where you right-click with your mouse (to restore, click [image] ).

zooms out.

restores the graph to the whole page view.

rescales the axes to show all data points. Useful for restoring the graph after using the Enlarger Tool [image] to enlarge a portion of the graph axis.

extracts data plots in the active layer to separate layers.

extracts all layers in the active graph window to separate graphs.

merges all open graph windows onto a single graph page. Graphs may be superimposed or merged as separate panels.

creates a color scale for 3D contour plots and color mapped surfaces.

generates a new graph legend. Primarily useful after adding data plots to a single layered graph.

adds a moveable, sizable scale object to the active graph.

adds the system time and date to your graph window.


Format Toolbar

The Format Toolbar

sets the text label font.

sets the text label font size.

bold.

italic.

underline.

superscript.

subscript.

super/subscript.

Greek letter (Default = TT Symbol Font).

increase font size.

decrease font size.

Note: Text color control is available from the Style toolbar.

For more information on formatting text labels, see Creating and Editing Text Labels.


Style Toolbar

To use the Style toolbar for editing plot attributes, you must first click on the data plot and select it. Note the "handles" on the selected data plot.

  • For ungrouped datasets, clicking on a single data plot selects just that data plot.

  • To select multiple ungrouped data plots, hold down the SHIFT key while selecting plots to edit.

  • For grouped data plots, clicking on any data plot in the group selects the entire group.

Once a data plot or a plot group has been selected, you can edit various attributes of the plot -- symbol color, line style and width, fill patterns, incremental color lists for grouped data plots -- using the Style toolbar. This avoids having to open the Plot Details dialog box.

Note that not all plot attributes can be edited with the Style toolbar (for example, to change plot symbol type, you need to open the Plot Details dialog box).

For grouped data plots, incremental color schemes can be applied:

  1. Click to select the entire plot group.

  2. Open the Color drop-down list, scroll to the bottom of the list and choose an incremental color scheme.

Origin ships with some ready-to-use incremental color schemes. These are actually a type of Theme (see, Creating Themes). To learn how to create a new incremental color list, see Group Incremental Color Lists.

The Style Toolbar

The Style toolbar is useful for formatting text labels and other annotations as well as data plot attributes (line style, line color, symbol color, fill pattern, etc.).

Notes on use of the Style Toolbar to edit plot attributes

sets the font/line/border color of the selected object.

sets the line/border style of the selected object.

sets the line/border width (pt. size) of the selected object.

sets the fill pattern of the selected 2D object.

sets the fill color of the selected 2D object.

sets the fill pattern width of the selected object.

sets the fill pattern color of the selected object.


Tools Toolbar

The Tools Toolbar

The Tools toolbar provides text, arrow, line, and other annotation buttons. It also provides buttons to enlarge a region of a graph.

used in the default object selection mode.

enlarges a portion of the axis scale.

restores the axis scale values to their previous From and To values.

read the XY (and Z, if 3D or contour) location on the page.

read the XY (and Z) location of a data point.

define a range of data.

draw a data plot.

creates text objects.

creates arrow objects.

creates curved arrow objects.

creates line objects.

creates a rectangle.

the Rectangle tool in "region of interest" mode. Use it to select a region of the image to crop, copy, or duplicate. The region of interest mode is controlled from the Tools:Show Tools as ROI menu command.

creates and circle/ellipse.

creates a polygon.

creates an freehand closed object (region). Click and drag to create a region; release the button to complete the object.

creates a polyline. Click once to create an anchor point; double-click to end the line.

creates a free form line. Click and drag to create a line; release the mouse button to end the line.


2D Graphs Toolbar

  • When a worksheet or Excel workbook is active, select the data that you want to plot, then click a button on the 2D Graphs toolbar to plot your data.

  • When a graph window is active, you can change the graph type (for example, from a scatter plot to a column plot) for the active data plot. To activate a data plot:

  1. Select the data plot from the Data menu.

  2. Click the button on the 2D Graphs toolbar to change the graph type.

The 2D Graphs Toolbar

The 2D Graphs toolbar buttons are available when a worksheet, Excel workbook, or graph window is active. Buttons provide quick access to common 2D graph templates. The Template button opens the Template Library, providing access to built-in and custom graph templates.

To use the Graphs toolbar buttons:

creates a line graph from the selected data.

creates a scatter graph from the selected data.

creates a line & symbol graph from the selected data.

creates a bar graph from the selected data.

creates a column graph from the selected data.

creates a pie chart from the selected data.

creates an area graph from the selected data.

creates a fill area graph from the selected data.

creates a polar graph from the selected data.

creates a ternary graph from the selected data.

creates a Smith Chart from the selected data.

creates a high-low-close chart from the selected data.

creates a XYAM (X,Y, angle, magnitude) vector graph from the selected data.

creates a XYXY (start X, start Y, end X, end Y) vector graph from the selected data.

opens the Select Template dialog box (Template Library).


Edit Toolbar

The Edit Toolbar

cuts the selected data or object.

copies the selected data or object.

pastes the contents of the Clipboard.


2D Graphs Extended Toolbar

The 2D Graphs Extended Toolbar

The 2D Graphs Extended toolbar buttons are available when a worksheet, Excel workbook, or graph window is active.

creates a vertical drop line graph.

creates a 2 point segment graph.

creates a 3 point segment graph.

creates a vertical step graph.

creates a horizontal step graph.

creates a spline-connected graph.

creates a double Y axis graph.

creates a line series graph.

creates a waterfall graph.

creates a zoom graph.

creates a scatter graph with Y error bars.

creates a scatter graph with X and Y error bars.

creates a stacked bar graph.

creates a stacked column graph.

creates a floating bar graph.

creates a floating column graph.

creates an indexed size (bubble) graph.

creates a color mapped graph.

creates a bubble + color mapped graph.

creates a box chart.

creates a QC (X-bar R) chart.

creates a histogram.

creates histogram + probabilities.

creates stacked histograms.

creates a vertical 2 panel graph.

creates a horizontal 2 panel graph.

creates a 4 panel graph.

creates a 9 panel graph.

creates a stack graph.


3D Graphs Toolbar

The 3D Graphs Toolbar

creates a 3D scatter graph from XYZ worksheet data.

creates a 3D trajectory graph from XYZ worksheet data.

creates a 3D XYY bar graph from XYZ worksheet data.

creates a 3D ribbon graph from XYZ worksheet data.

creates a 3D wall graph from XYZ worksheet data.

creates a 3D waterfall graph from XYZ worksheet data.

creates a 3D color fill surface graph from a matrix of Z values.

creates a 3D X constant with base graph from a matrix of Z values.

creates a 3D Y constant with base graph from a matrix of Z values.

creates a 3D color mapped surface graph from a matrix of Z values.

creates a 3D bar graph from a matrix of Z values.

creates a 3D wire frame graph from a matrix of Z values.

creates a 3D wire surface graph from a matrix of Z values.

creates a 3D contour color fill graph from a matrix of Z values.

creates a 3D black and white contour graph from a matrix of Z values.

creates a 3D gray scale contour graph from a matrix of Z values.

creates an image plot from a matrix of Z values.

creates a profile plot from a matrix of Z values.


3D Rotation Toolbar

The 3D Rotation Toolbar

The 3D Rotation toolbar is available when a 3D graph is active (worksheet- or matrix-derived). Toolbar buttons rotate the graph and change the perspective.

Rotate counterclockwise about the Z axis the specified rotation angle.

Rotate clockwise about the Z axis the specified rotation angle.

Tilt the top of the graph counterclockwise the specified rotation angle.

Tilt the top of the graph clockwise the specified rotation angle.

Rotate downward about the X axis the specified rotation angle.

Rotate upward about the X axis the specified rotation angle.

Increase the perspective angle by 3 degrees.

Decrease the perspective angle by 3 degrees.

Fit the graph to the layer frame.

Reset the rotation angles.

Select or type a rotation angle (in degrees) for the rotation buttons.

For more information, see Controlling the 3D Axis Length, Rotation, and Perspective in a Layer.


Worksheet Data Toolbar

The Worksheet Data Toolbar

The Worksheet Data toolbar buttons perform statistics on columns or rows of data, sort columns of data, use functions to set column values or mathematically transform data, update these column values, and fill columns with row numbers or random numbers.

calculates descriptive statistics on selected columns.

calculates descriptive statistics on selected rows.

opens the Nested Sort dialog box.

opens the Set Column Values dialog box.

updates all worksheet column values.

fill selection range with row numbers.

fill selection range with uniform random numbers.

fill selection range with normal random numbers.


Column Toolbar

The Column Toolbar

The Column toolbar is available when a worksheet column is selected. It provides buttons to set the column plotting designation and to move columns.

designates the selected column(s) as X.

designates the selected column(s) as Y.

designates the selected column(s) as Z.

designates the selected column as a Y error bar column.

designates the selected column as a label column.

designates the selected column(s) to be disregarded.

moves the selected column to the first worksheet column position.

moves the selected column one column to the left.

moves the selected column one column to the right.

moves the selected column to the last worksheet column position.

For more information, see

  • Designating a Column as X, Y, Z, Error, Label, or None

  • Arranging the Worksheet.


Layout Toolbar

The Layout Toolbar

Use the Layout page buttons to add pictures of graphs or worksheets to the layout page.

opens the Select Graph Object dialog box.

opens the Select Worksheet Object dialog box.

For more information, see Adding a Graph or Worksheet Picture to the Layout Page Window.


Mask Toolbar

The Mask Toolbar

Use the Mask toolbar to mask worksheet or graph data from analysis.

activates the Data Reader tool on the Tools toolbar. Toggle masking on/off for a single point in your graph.

activates the Data Selector tool ( Tools toolbar), when a graph is active; select a range of data to be masked. If a worksheet is active, clicking this button masks the selected worksheet data.

activates the Data Selector tool (Tools toolbar), when a graph is active; select a range of masked data and remove the mask. If a worksheet is active, clicking this button removes the mask from the selected worksheet data.

applies mask to data that is currently unmasked and removes masking from data that is currently masked (graph only).

changes mask color (worksheet or graph).

hides/shows masked points (graph only).

enables/disables masking (worksheet or graph).

For more information, see Masking Data from Analysis.


Object Edit Toolbar

The Object Edit Toolbar

The Object Edit toolbar is available when one or more annotation objects are selected in the active window, or when more than one picture is selected in a layout page. The toolbar provides buttons to align the selected objects/pictures, and to change the drawing order of the objects/pictures. Buttons are provided to group objects so that you can move or align the group. Additionally, buttons are provided to change the drawing order of objects relative to data plots.

aligns selected objects along the left edge of the last-selected object.

aligns selected objects along the right edge of the last-selected object.

aligns selected objects along the top edge of the last-selected object.

aligns selected objects along the bottom edge of the last-selected object.

aligns selected objects vertically along the vertical axis of the last-selected object.

aligns selected objects horizontally along the horizontal axis of the last-selected object.

adjusts the horizontal dimension of selected objects to that of the last-selected object.

adjusts the vertical dimension of selected objects to that of the last-selected object.

brings the selected object(s) to the front.

pushes the selected object(s) to the back.

draws the selected object(s) in front of the data.

draws the selected object(s) in back of the data.

group the selected objects.

ungroup the selected objects.

For more information, see Arranging and Aligning Objects.


Arrow Toolbar

The Arrow Toolbar

Use the Arrow toolbar to align multiple lines/arrows, and to customize the arrow head.

aligns the selected lines/arrows horizontally.

aligns the selected lines/arrows vertically.

widens the arrow head of the selected object.

narrows the arrow head of the selected object.

lengthens the arrow head of the selected object.

shortens the arrow head of the selected object.

For more information, see Drawing Lines and Arrows and Arranging and Aligning Objects.


The Status Bar

The status bar displays:

  • The name of the System Theme, if any exists.

  • Descriptions of Origin and Excel tools.

  • Information pertinent to the active window, including:

    • worksheet (column number:dataset(rows), window name, angular units).

    • Excel workbook (workbook name, angular units).

    • graph (data list number of active data set:data set(rows) or matrix window name, graph window name, angular units).

    • matrix (window name, matrix dimensions, matrix window name, angular units).

  • Angular Units (radians, degrees, or gradians).


Project Explorer

Project Explorer is a tool to help you organize your Origin projects. It is particularly useful if you are working with a project that contains numerous child windows. Use Project Explorer to develop a folder structure to organize the child windows in your project.


Display of Project Explorer

When you first start Origin, Project Explorer displays docked to the bottom edge of the workspace. You can dock it to any other edge or float it in the workspace. To prevent Project Explorer from docking when positioning it as a window, press CTRL while dragging.

Because Project Explorer uses some of your workspace, you may want to close Project Explorer, even if you have already created a folder structure. To close Project Explorer:

  1. Click the Project Explorer button [image] on the Standard toolbar.

or

  1. Press ALT + 1.

When Project Explorer is closed, Origin continues to use your folder structure and view settings to control the display of windows in your workspace. If you are working with a project that contains subfolders and the view mode is set to view only the active folder's windows, then Origin will display only the windows in the current folder.


Hiding a Window

To maximize the use of your workspace, you can hide windows from view - without deleting them from the project.

To hide a window in the workspace:

  1. Select the desired window icon on the right side of Project Explorer and then double-click on this icon. Note that the icon is now grayed-out.

To return the window to the normal view mode:

  1. Double-click on the grayed-out window icon.

These view controls are also available by right-clicking on the window icon in Project Explorer, or by right-clicking on the window title bar.


Creating a New Folder

To create a new folder:

  1. Right-click on the project folder (or a subfolder) on the left side of Project Explorer.

  2. Select New Folder from the shortcut menu.

Once you have created one or more subfolders, you can move windows between folders.

To access windows in other folders:

  1. From the Origin menu, select Window:Folders:Folder Name to view the windows in the selected Project Explorer folder. The window list at the bottom of the Window menu updates to reflect the windows in the Folder Name folder.

Accessing Folders and Windows from the Menu Bar


Controlling the View of Windows

In addition to adding and moving folders, Project Explorer also controls the view of your workspace. By default, only the windows in the active Project Explorer folder display in your workspace. This minimizes workspace clutter.

To control the view of the windows in your workspace:

  1. Right-click on a Project Explorer folder or right-click in a blank space on the left side of Project Explorer.

  2. Select View:View Mode to alter the view mode.

or

  1. Select View:View Windows:View Mode from the Origin menu bar.


Finding Windows

After you organize your windows into multiple folders, Project Explorer's Find dialog box helps you locate windows in your project.

To open this dialog box:

  1. Right-click on the Project Explorer folder that you want to start your search from and select Find from the shortcut menu.

or

  1. If you are unsure of the window location within your Project Explorer folder structure, right-click on the main project folder and select Find.


The Windows dialog box

  1. Double-click on the window in the list box or click once on the window and click Activate.

  2. Click Close to close the dialog box and view the active window.

  1. Click the respective button (column heading) at the top of the list box.

  1. Select the window from the list box.

  2. Click Minimize Window or Restore Window.

  1. Select the window from the list box and click Close Window.

  2. To verify closure, click Yes in the Attention dialog box.

To disable the display of the Attention dialog box, select the Disable Close Prompt check box.

The Windows Dialog Box

If you have more than nine windows in your current Project Explorer folder and you want to view a window that is not currently listed in the window list at the bottom of the Window menu, select Window:More Windows. This menu command opens the Windows dialog box.

The Windows dialog box can be resized by dragging the edge of the dialog box. The dialog box displays the names (and/or labels), window type, and current status of all windows in the current Project Explorer folder, or the current folder and subfolders, depending on your Project Explorer viewing mode.

  • To activate a window:

  • To sort the windows alphabetically by name (or label) or by window type or state:

  • To minimize or restore a window:

  • To close a window so that it is no longer part of the project:


The Results Log

Origin automatically types most analysis and fitting results to the Results Log. Each entry in the Results Log includes a date/time stamp, the window name, a numeric stamp which is the Julian day, the type of analysis performed, and the results.

See Display of the Results Log.


Display of the Results Log

  1. Click the Results Log button [image] on the Standard toolbar.

or

  1. From the Origin menu, select View:Results Log.

or

  1. Press ALT + 2.

Opening and closing the Results Log only controls its view state. You do not lose results by closing the log.

  1. Press CTRL while dragging the Results Log.

Note: When you close the Results Log after it has been docked to the edge of the workspace, the toolbar region may display a blank area where the log was located. To hide this spacer, right-click in this region and select Hide Toolbar Spacer from the shortcut menu.

The Results Log Shortcut Menu

Display of the Results Log

In most cases, when results are typed to the Results Log, it opens automatically. To manually open (and close) the Results Log:

When the Results Log first opens, it displays docked to the bottom edge of the workspace. You can dock it to any other edge or display it as a window in the workspace. To prevent the Results Log from docking when positioning (floating) it as a window:

You can right-click in the Results Log to open a shortcut menu with commands to copy, print, clear, and view additional results.


Code Builder

Origin's programming language is called Origin C. Origin C supports a nearly complete ANSI C language syntax as well as a subset of C++ features including internal and DLL-extended classes. In addition, Origin C is "Origin aware". This means that Origin objects such as worksheets and graphs are mapped to classes in Origin C, allowing direct manipulation of these objects and their properties from Origin C.

Origin C's integrated development environment (IDE) is called Code Builder.

To open Code Builder:

  1. Click the Code Builder button [image] on the Standard toolbar.

Code Builder provides tools for writing, compiling, and debugging your Origin C functions. Once an Origin C function is compiled, the function becomes accessible from Origin.

Click here to view a multi-media demonstration

To learn more about programming in Origin, select Help:Programming and review the sample Origin projects located in the \Samples\Programming folder.


Script Window

The Script Window is useful for:

  • simple calculations.

  • math on and between datasets.

  • executing LabTalk commands.

  • getting or setting the value of a variable.

To open the Script Window, click the Script Window button [image] on the Standard toolbar. Note that when you save an Origin project, the Script Window contents are not saved with the project.

The Script Window

Click here to view a multi-media demonstration

To learn more about programming in Origin, select Help:Programming and review the sample Origin projects located in the \Samples\Programming folder.


Available Page Viewing Modes: Speed vs. Accuracy

Origin provides different viewing modes for two major reasons:

  • Minimize screen redraw time.

  • Maximize accuracy of object placement on the page.

Minimizing the screen redraw time is desirable when you are working with very large data sets. Though speed is also desirable when creating graphs which include multiple objects, verifying the accuracy of object placement on the page is essential. Origin offers different view modes to facilitate the overall desire for speed and the final check of object placement.


How Origin Generates Screen Images

Depending on the selected view mode, Origin uses either the screen driver or the printer driver to generate the screen image. When Origin uses the screen driver to draw the screen, the page layout information is interpreted by the screen driver. The screen driver has a resolution which is generally lower than the printer driver resolution. Thus, when Origin uses the printer driver for the page layout information, what you see on screen will be closer to what you will see in the printed copy.

The view mode is set individually for each graph window and does not affect the quality of the printed output. Printed output always shows the high quality, WYSIWYG Print View image.

By the same token, since some of Origin's view modes are not WYSIWYG, you should not attempt to use anything but Print View to make final adjustments before printing or exporting your graph.


Full Screen

Full screen view mode expands the page in the active graph window to fill the entire screen. This is a display-only view mode. You cannot edit a graph in Full Screen mode. Toolbar buttons are not visible in Full Screen view mode.

To change the active window to Full Screen view mode, select View:Full Screen . To exit Full Screen view mode, click once with the mouse.


Draft View

Draft View has the fastest screen update of the four view modes. In Draft View, the page is automatically resized to fill the graph window. This is a convenient mode to use when you are primarily interested in looking at on-screen data.

To display the active graph window in the Draft View mode, do one of the following:

  1. Select View:Draft View.

or

  1. Select Format:Page to open the page's Plot Details dialog box.

  2. Select the Miscellaneous tab and select Draft View from the View Mode drop-down list.

Page rotation is disabled in Draft View. Additionally, text rotation and text formatting (e.g. superscript, subscript, Greek symbols, and text styles and fonts) are not visible in Draft View. All text displays in the system font only. To view text rotation and formatting, switch to Page View or Print View.


Window View

Window View expands the page to fill up the entire graph window. Labels, buttons, or other objects in a graph window that reside in the gray area off the page are not visible in Window View mode.

To display the active graph window in the Window View mode, do one of the following:

  1. Select View:Window View.

or

  1. Select Format:Page to open the page's Plot Details dialog box.

  2. Select the Miscellaneous tab.

  3. Select Window View from the View Mode drop-down list.


Page View

Page View provides faster screen updating than Print View, but does not guarantee exact text placement on the screen unless you are using typeface scaling software (such as Adobe Type Manager). Page layout information is received from the screen driver; this provides for faster screen redraw. If Print View mode seems too slow to you, use Page View mode until your application is ready for printing or copying to another application. Change to Print View mode to check object placement before exporting, copying, or printing.

To display the active graph window in the Page View mode, do one of the following:

  1. Select View:Page View.

or

  1. Select Format:Page to open the page's Plot Details dialog box.

  2. Select the Miscellaneous tab.

  3. Select Page View from the View Mode drop-down list.


Print View

Print View is the WYSIWYG (What You See is What You Get) view mode. Font information is received directly from the printer driver, so that Print View displays a page that, in most cases, is exactly the page that is produced by your hard copy device. On-screen image quality may suffer slightly, as the printer driver fonts must be scaled to fit their positions on the page (this will not harm the appearance of true vector fonts).

Print View may be slow on some systems. If you find that window redraw times are excessive, consider using Print View mode only to preview your work prior to printing.

To display the active graph window in the Print View mode, do one of the following:

  1. Select View:Print View.

or

  1. Right-click in the graph window but outside the page and select Print View from the shortcut menu.

or

  1. Select Format:Page to open the page's Plot Details dialog box.

  2. Select the Miscellaneous tab.

  3. Select Print View from the View Mode drop-down list.


The Origin Project

  1. From the Origin menu, choose File: Open.

  2. Set the Files of Type drop-down list to OPJ, browse to the project file, and click Open.

To save the contents of the current session to the current project file (this is the Origin project file that is named on the program title bar):

  1. Choose File: Save Project.

or

  1. Click Save Project [image] on the Standard toolbar.

To save the contents of the current session to a new path and/or file name:

  1. Choose File: Save Project As...

  2. Specify a Save In folder, File Name and Save as Type OPJ.

The Origin Project

A new project is created each time you start Origin. Until you save the contents of the current session, the project is simply named UNTITLED. Should you attempt to exit Origin without saving the current project file, Origin opens the Save As dialog box, prompting you to choose a path and file name for the current Origin project file.

You can only have one Origin project open in a given Origin session. If you wish to open a second Origin project file you can do one of two things:

  • Append a Project File.

  • Launch another instance of Origin and open the second Origin project file in that instance. You can open as many as six simultaneous program instances.

What do you want to do?

  • Open a project file.

  • Save the contents of the current session to an Origin project file.


Opening an Origin Project File

To open an Origin project file:

  1. From the menu, choose File: Open or click [image].

  2. In the Open dialog box, set Files of Type to Project(*.OPJ).

  3. Choose File Name and click Open.


Deleting a Window

To delete a window from the project, click the X button in the upper-right corner of the window. Origin then asks you if you want to hide or delete the window.

To prevent this verification prompt from displaying, select Tools:Options to open the Options dialog box. Then select the Open/Close tab. In the Window Closing Options group, select how you want Origin to respond when you click a particular window type's close button.

Setting the Close Option for a Window Type


  • Create a compact, editable file, that contains only supporting data. Subsequently, (1) insert this file into another Origin project file, (2) convert the file to a graphic file type (EPS, PDF, JPG, BMP, etc.), or (3) use it to create a custom template file.

  • Graph, (OGG files) contain both the data plot and the supporting worksheet data. If you and another Origin user are working jointly on a manuscript, you could insert the OGG file into a Word document and both graph and supporting data would be mutually available for editing by you or your colleague.

  • Text files can be used to save such things as fitting function formulae, statistical results or analysis procedures for later incorporation into more formal documents.

  1. Click on the child window to activate it.

  2. From the menu, select File: Save Window As...

  3. Choose a Save In folder, a File Name, and click Save.

Saving Child Windows from a Project File

You can save several types of Origin child windows externally from an Origin project file. These OGW, OGG, OGM and TXT files have numerous possible applications:

Window Type | File Extension
Worksheets | OGW
Graphs | OGG
Matrix | OGM
Notes | TXT

To save an Origin child window independently of the Origin project file:

Though not an Origin file type, you can also save Excel workbook files externally from your Origin Project file.


Opening a Window from a File

  1. Click the Open button [image] on the Standard toolbar. This opens the Open dialog box.

  2. From the Files of Type drop-down list, select:

    • ‘Worksheets (*.OGW)’ to open a worksheet window.

    • ‘Graphs (*.OGG)’ to open a graph or function graph window.

    • ‘Matrix (*.OGM)’ to open a matrix window.

    • ‘Text (*.TXT)’ to open a notes window.

When you open a worksheet, graph, matrix, or notes window file in a project, then save the project, the window becomes part of the current project.

  1. Click the Open Excel button [image] on the Standard toolbar.

  2. Select your Excel file. A dialog box opens asking if you want to Open as Excel Workbook or Open as Origin Worksheet(s).

If you open the workbook as a workbook,

If you open the workbook as one or more Origin worksheets,

you can use Excel's spreadsheet tools to process your data, while within the Origin workspace. You also have access to Origin's plotting and analysis tools. When you are ready to save your project, you can save the project with a link to your source workbook, and update the link, or you can save the workbook as part of your Origin project. When you update the link to a (linked) workbook, the updated workbook is available for other applications or other users.

you have no access to Excel's spreadsheet tools in Origin. Furthermore, the data no longer has a connection to the source workbook. Thus, the changes you make to the data are lost to the original workbook.

Opening a Window from a File

If you have a window in one project that you want to include in the current project, you can append the projects. However, this action will add all windows from the appended project to the current project.

To add a single child window from one Origin project to a second Origin project, you must:

  1. Save the child window to a file (To learn how to do this, see Saving Child Windows from a Project File).

  2. Open the saved window in the second project file.

To open a worksheet, graph, matrix, or notes window that was saved to a file:

To open an Excel workbook file:


Opening More than One Project

If you need to open multiple Origin projects, you have two options:

  • You can run multiple instances of Origin, opening a single project in each instance.

  • You can append an OPJ file to the open project file (see Appending Projects).


Appending Projects

The contents of a project can be added to the currently opened project by selecting File:Append or by right-clicking on a Project Explorer folder and selecting Append Project from the shortcut menu.

Appending Projects

After you select the project to append, Origin displays a Reminder Message asking if you want to append the contents of the new project into a new Project Explorer folder or into the current folder.

If duplicate window names exist between projects, Origin automatically changes the name of the appended window by adding an "A" to the window name. For example:


Controlling the Default Window Type when You Open a New Project

Origin allows you to control the type of window that displays when you open a new project. This includes opening a new project from the File:New menu command, the New Project button on the Standard toolbar, and the new project that opens when you start Origin.

By default, Origin displays a worksheet window when you open a new project. To display either an Excel workbook window, graph window, matrix window, or no window at all, or to display a worksheet and a graph window, do the following:

  1. Select Tools:Options when any window other than an Excel workbook window is active. If an Excel workbook window is active, select Window:Origin Options.

  2. Select the Open/Close tab.

  3. Make a selection from the Start New Project drop-down list. To display both a worksheet and graph window when you open a new project, select ORIGIN.OPJ from the drop-down list.


Deleting a Worksheet from a Project

When you delete a worksheet, you delete the worksheet window from the project, as well as all the data contained in the worksheet. Any other visual representations of that data are also deleted from the project. Thus, any data plots based on the deleted worksheet data are deleted from the respective graph windows.

To delete a worksheet from the project, perform one of the following operations:

  • Click the Close Window button in the upper-right corner of the worksheet.

  • Right-click on the worksheet window icon in Project Explorer and select Delete Window from the shortcut menu.

  • Click on the worksheet window icon in Project Explorer and then press DELETE.

Because of the potential for unexpected loss of data, Origin opens a Deletion Confirmation box.

Note: Hiding a worksheet instead of deleting it allows you to visually remove the worksheet from the workspace, but maintain the window and data in the project. If you hide the worksheet, you can re-activate its view in the Project Explorer.


Creating an Automatic Backup of the Project File

To automatically create a backup of your Origin project file:

  1. Give your Origin project a name (i.e. save the project file).

  2. Enable automatic backup.

    1. From the Origin menu, choose Tools: Options.

    2. Click the Open/Close tab.

    3. Select Backup Project Before Saving.

Subsequently, when you save your project file, Origin renames your previously-saved file BACKUP.OPJ and saves the updated file with the Origin project file name.

Recovering the contents of a damaged Origin project file:

If you cannot open your Origin project file, you may be able to recover the contents of the project file, minus whatever changes were made to the project file during the time that it was last open. To do this:


Saving an Origin Project File

  • If you have previously saved your work to an Origin project file, File:Save Project or Save [image] saves your project file, without prompting, to the file of the same name.

  • If you have not previously saved your work to an Origin project file, Save Project or Save [image] opens the Save As dialog box.

  • Choosing Save Project As... opens the Save As dialog box.

  • all child windows on your screen.

  • all child windows in other Project Explorer folders.

  • datasets that make up the information in the child windows.

  • the contents of the Results Log.

  • internally saved Excel workbook files.

  • Any deleted child windows.

  • The contents of the Script window.

  • Externally saved Excel workbook files.

Saving an Origin Project File

To save an Origin project file:

  1. From the menu, choose File:Save, File:Save As..., or click Save [image].

If the Save As... dialog box opens...

  2. Set Files of Type to Project(*.OPJ).

  3. Choose File Name and click Save.

What is saved with the Origin Project File?

What is not saved with the Origin Project File?


Saving Part of a Project

Saving Part of a Project File

If you used Project Explorer to create a folder structure within your Origin project, you can save a folder and its subfolders to a new project file. To do this:

  1. Right-click on the Project Explorer folder that you want to save as a project file.

  2. Select Save As Project from the shortcut menu.

Saving a Project Explorer Folder to an Origin Project File

In this example, the Linked Layers 1 folder and its Raw Data subfolder, all child windows in these folders, plus Results Log output specific to contained child windows, are saved to a new project file.


The Worksheet

The worksheet's primary function is to organize your data but it also facilitates important data manipulation, exploration, analysis, and plotting functions. The worksheet looks much like a spreadsheet, but it differs in some important ways. In a spreadsheet, operations are performed on cells or on a range of cells. In the Origin worksheet, operations are performed primarily on data sets which consist of columns of values.

This section will introduce you to basic concepts of formatting and navigating worksheets:

  • how to add and delete columns, rows, change column width, etc.

  • how to select data for plotting or analysis.

  • how to set column designations (X values, Y values, error bar values, etc.).

  • how to format your data (text, numeric, date, time, scientific and engineering notation).

  • how to save a worksheet template for future use.

Click here to view a multi-media demonstration


Arranging the Worksheet

The format of your worksheet may be altered as needed. Basic format options include:

  • adding columns

  • inserting columns

  • deleting columns

  • inserting rows

  • deleting rows

  • moving columns

  • changing column width

  • changing the row heading width

  • transposing columns and rows

  • other properties that affect the appearance of the worksheet such as text color, heading display options, grid display, etc.


Adding Columns

To append columns to the worksheet, do one of the following:

  1. Select Column:Add New Columns (adds n columns).

or

  1. Click the Add New Columns [image] button on the Standard toolbar (adds 1 column).

or

  1. Right-click inside the worksheet window, to the right of the worksheet grid.

  2. Select Add New Column from the shortcut menu (adds 1 column).

Columns are added as Y column(s), to the right of the last worksheet column. Each new column is named alphabetically (A, B, C, ... X, Y, Z, AA, BB, CC, ...), starting with the first letter that is not already used as a worksheet column name.


Inserting Columns

To add a single column to a specific location in the worksheet:

  1. Highlight the column located to the immediate right of the desired insertion point.

  2. From the menu, select Edit:Insert or right-click and select Insert from the shortcut menu.

The new column is inserted to the immediate left of the highlighted column, and is designated as a Y column, regardless of the designation of the highlighted column. Each new column is named alphabetically, starting with the first letter that is not already used as a column name in the worksheet.

To insert n columns in a specific location in the worksheet:

  1. Repeat the above procedure n times.

or

  1. Highlight n columns to the immediate right of the column insertion point.

  2. Select Edit:Insert or right-click and select Insert from the shortcut menu.


Deleting Columns

To delete one or more columns from the worksheet:

  1. Highlight column(s) to be deleted.

  2. From the menu, select Edit:Delete or right-click and select Delete.

Note that when you delete columns (data sets) from the worksheet, any other visual representation of the data sets will also be deleted from the project. Thus, if you delete a column of data that also displays as a data plot in a graph window, the data plot is deleted from the graph window.

Note: To clear the column values but retain the columns, select Edit:Clear.


Inserting Rows

To insert a single row in a specific location in the workshee:

  1. Highlight the row that is directly below your desired insertion point.

  2. From the menu, select Edit:Insert or right-click and select Insert from the shortcut menu.

The new row is inserted above the highlighted row.

To insert n rows in a specific location in the worksheet:

  1. Repeat the above procedure n times.

or

  1. Highlight n rows to the beneath the row insertion point.

  2. Select Edit:Insert or right-click and select Insert from the shortcut menu.


Deleting Rows

To delete one or more rows from the worksheet:

  1. Highlight the row(s).

  2. From the menu, select Edit:Delete or right-click and select Delete.

After deleting the selected rows, the rows below the selection move up in the worksheet.

Note: To clear the cell contents but retain the row(s), select Edit:Clear instead of Edit:Delete.


Moving Columns

To move a column one position to the right:

  1. Highlight the column.

  2. Click the Move Left [image] or Move Right [image] buttons on the Column toolbar.

To move a column to the first or last position in the worksheet:

  1. Highlight the column.

  2. From the menu, choose Column:Move to Last or Column:Move to First or click the Move to Last [image] or Move to First [image] buttons on the Column toolbar.

Note: Using Cut and Paste will only move the data, not the column or column attributes.


Changing the Column Width

To change the width of a column:

  1. De-select the column (if it is currently highlighted).

  2. Point to the space between the column headings.

  3. When the pointer becomes a double-headed arrow, drag the edge of the column heading.

or

  1. Double-click on the column to open the Worksheet Column Format dialog box.

  2. Enter your value in the Column Width text box. This text box value is in units of characters.

See, Reference: The Worksheet Column Format Dialog Box.


Changing the Row Heading Width

To change the width of the row headings:

  1. Double-click inside the worksheet window but to the right of the worksheet grid. This opens the Worksheet Display Control dialog box.

  2. Type the desired value in the Row Heading Width text box (in the Worksheet Measurement group). The text box value is in units of 1/10 of the text height.


Transposing the Columns and Rows

To transpose the columns and rows in the active worksheet, select Edit:Transpose. This menu command exchanges the worksheet columns with rows, and the rows with columns.

  • Prior to transposing, if the worksheet contains more row values than columns, Origin adds the necessary columns to the worksheet during the transpose process. Origin names these added columns alphabetically, starting with the first letter that is not already used as a column name in the worksheet.

  • Prior to transposing, if the worksheet contains more columns than row values, Origin maintains the extra columns in the worksheet. This default behavior can be altered by selecting a new option from the Delete Empty Columns After Worksheet Transpose drop-down list on the Miscellaneous tab of the Options dialog box (Tools:Options).

Note: To transpose the columns and rows in your worksheet, each of the columns in the worksheet must be of the same "display type." For example, each of the columns must be set to "Text and Numeric" type, or "Numeric" type. The column display type is set from the Display drop-down list in each column's Worksheet Column Format dialog box. Double-click on a column heading to open this dialog box. In the default Origin worksheet, each column is set to the "Text and Numeric" display type.


Aligning Objects with the Page Grid

The Tools toolbar (View:Toolbars) provides a series of tools to add text labels and other labeling objects to Origin's windows. To aid in the placement of these objects on the page of a worksheet window, enable the display of the page grid by selecting View:Show Grid. A check mark appears next to this menu command when the grid is enabled. To ensure that objects that are placed on the worksheet page align with the grid when the object is moved, select Format:Snap to Grid. A check mark appears next to this menu command when Snap to Grid is enabled.


Worksheet Display Control Dialog Box

  1. Double-click inside the worksheet window but to the right of the worksheet grid.

or

  1. Select Format:Worksheet when the worksheet is active.

or

  1. Right-click inside the worksheet window but to the right of the worksheet grid.

  2. Select Properties from the shortcut menu.

Set Color for worksheet Cells and Headings.

Select Use System Fonts to use the Windows system font for the worksheet cells and headings. To use a different font, clear this check box and select the alternate font from the Font drop-down list. Select Pt Size, and (optionally) Bold (for both cells and headings).

Column headings can contain column names and labels. Select or clear the Column Name and/or Column Label check boxes to show or hide names and labels. Column names and labels are assigned in the column's respective Worksheet Column Format dialog box.

Select Multiline Name to display the column name on more than one line. This applies only if a period (.) is inserted before the text to appear on the next line in the Column Name text box of the Worksheet Column Format dialog box.

Note: To view the second line of the column name and the column label in the column label field, you may need to increase the column heading height in the Worksheet Measurement group.

Select Row to enable the display of row numbers.

To customize the background and divider line color for column and row headings, select Background and choose a color (this is distinct from the worksheet page color).

Set Column Heading Height, Row Heading Width, and Gap from Top in tenths of text height (e.g. a value of 12 = 12/10ths, or 120%, of text height). When including a column label, it is necessary to increase the column heading height (Origin will prompt to automatically increase the Column Heading Height value).

Note: The Row Heading Width text box does not affect column width(s).

Select Gap From Top to add space between the worksheet column headings and the worksheet title bar. Space can be added to accommodate text labels or button objects above the worksheet grid (but within the worksheet window).

Controls for the worksheet grid display. Line width is in point size.

When selected, this overrides the Scientific Notation Lower Threshold setting on the Numeric Format tab of the Options dialog box (Tools:Options) for columns set to Display = Decimal with Numeric Display = Set Decimal Digits. Such columns will always display numbers with the specified number of decimal digits, rounding and padding with 0's as needed. For example...

  • 0.00001 (1E-5) would display as 0.0000

  • 0.00005 would display as 0.0001

  • 0.1 would display as 0.1000

...even if the Scientific Notation Lower Threshold setting was -3 (installation time default).

Click Page Color to open the Page Color dialog box. Sets the background color for the active worksheet.

The Worksheet Display Control Dialog Box

Use the Worksheet Display Control dialog box to customize column and row headings, worksheet grids and cell text.

To open the Worksheet Display Control dialog box, do one of the following:

Dialog Box Controls (see figure)

The Text Group

The Heading Options Group

The Worksheet Measurement Group

The Grids Group

The Show 1E-5 as 0.0000 in Decimal Mode Check Box

The Page Color Button

Also, see Reference: The Worksheet Column Format Dialog Box.


Navigating the Worksheet

Plotting and analysis operations are generally performed on selected data in the active worksheet. Consult the following topics for instructions on selecting worksheet data:

Selecting Cells

Selecting Contiguous Columns

Selecting Noncontiguous Columns

Selecting the Entire Worksheet

Selecting Rows

Scrolling to a Specified Row Number


Selecting Cells

To select a range of cells in the worksheet, click-and-drag to select the cells.


Selecting Contiguous Columns

To select adjacent columns in the worksheet, do one of the following:

  1. Click to select the first column heading in the desired range and then drag the pointer to the last column in the desired range. Release the mouse button to select the columns.

or

  1. Click to select the first column heading in the desired range.

  2. Scroll the worksheet (using the scroll bars at the bottom of the worksheet, as needed) to display the last column in the desired range.

  3. Hold down the SHIFT key and click on this last column heading.


Selecting Noncontiguous Columns

To select noncontiguous columns in the worksheet:

  1. Click to select the first column heading.

  2. Hold down the CTRL key while clicking on additional column headings.


Selecting the Entire Worksheet

To select all the columns in the worksheet, do one of the following:

  1. Point to the blank space in the upper-left corner of the worksheet. When the pointer becomes a downward pointing arrow, click once to select all columns (datasets) in the worksheet.

or

  1. Click to select the first column heading, then drag the pointer across all remaining column headings in the worksheet.

or

  1. Click to select the first column heading, scroll the worksheet until the last column is visible.

  2. Press the SHIFT key and click on the last column heading.


Selecting Rows

To select a row range, perform one of the following operations:

  • Click to select the first row heading in the desired range and then drag to the last row in the desired range. Release the mouse button to select the rows.

  • Click to select the first row heading in the desired range, scroll the worksheet to display the last row in the desired range, and then hold down the SHIFT key and click on this last row heading.


Scrolling to a Specified Row Number

To view a specific row in the worksheet:

  1. From the Origin menu, select View:Go to Row.

or

  1. Right-click inside the worksheet window (but to the right of the worksheet grid) and select Go to Row from the shortcut menu.

then

  2. Type the row number in the Go to Row dialog box and click OK.


Worksheet Columns (Data Sets)

A worksheet data set is a one-dimensional array that can contain numeric and/or text values. Each column of worksheet values comprises a data set. Each data set has a unique name formed by combining the worksheet name and the column name, separated by the underscore character, “_”.

WorksheetName_ColumnName

Other pertinent information regarding worksheet data sets:

  • When a data set is created in a worksheet, data values displayed in the worksheet column are a copy of the data set in memory. When the data set is plotted, the data plot is also a representation of the actual data sets in memory. Whenever the data are modified in the worksheet or graph window, the actual data set will be affected, and other representations of the data set will reflect the changes.

  • When a data set is deleted, associated worksheet column values and data plots are also deleted.

  • Data sets may store data plot-type information (referred to as style holders). For example, if a data set is plotted as a line+symbol data plot and a new graph window is opened based on a template which has no data plot style association, the data set displays as a line+symbol data plot when added to the second graph window.


Understanding Column Associations in the Worksheet

Each worksheet column is tagged with a Plot Designation that instructs Origin as to how to treat the data when plotting or performing analyses. Plot Designations are X, Y, Z, X Error (bar), Y Error (bar), Label, or Disregard. These Plot Designations appear surrounded by parentheses in the column heading.

How Origin Uses Column Plot Designations

  • When a worksheet contains one X column, Origin creates an association between the X column and all the Y columns in the worksheet. When any Y column is selected for plotting, Origin uses the associated X column values to create the data plot, even if the X values are not selected for plotting.

  • When a worksheet contains multiple X columns, Origin creates multiple associations. Origin designates the leftmost X column as X1, and all Y columns to the right of the X1 column - but to the left of the next X column - are designated Y1. The second X column is designated X2, and all Y columns to the right of the X2 column - but to the left of the next X column - are designated Y2, etc. When any Y1 column is selected for plotting, Origin uses the associated X1 column values to create the data plot, even if the X1 values are not selected for plotting. Similarly, when any Y2 column is selected for plotting, Origin uses the associated X2 column values to create the data plot.


Designating a Column as X, Y, Z, Error, Label, or Disregard

  1. Right-click on the column heading and select Set As:Designation.

or

  1. Select the column and then select Column:Set as Designation.

or

  1. Select the column and then click the appropriate button on the Column toolbar.

or

  1. Double-click on the column heading to open the Worksheet Column Format dialog box. Select the desired column designation from the Plot Designation drop-down list.

or

  1. Select the column and then select Format:Column. This menu command opens the Worksheet Column Format dialog box. Select the desired column designation from the Plot Designation drop-down list.

  1. Select worksheet columns.

  2. Right-click on the selected columns and choose Set As.

  3. Choose from XYY, XYXY, XYYXYY, XYYYXYYY, etc.

Designation

Description

X, Y, Z:

In a worksheet with one designated X column, the X column provides X values for all Y and Z columns in the worksheet, independent of column locations in the worksheet.

For a worksheet with more than one designated X column, each X column provides X values for all Y and Z columns that are located to the right of the X column (but to the left of an additional X column). In the case of nonadjacent column selection, the selected X column provides X values for the selected Y and the selected Z columns. If an X column isn't included in the selection, Origin finds the first X column to the left of the selected Y column or Z column. If none exists, Origin looks to the right of the selected Y column (Origin will not look to the right for an X column associated with a Z column).

X Error

In a worksheet with one designated X column, values in an X error column set the size of the X error, independent of column locations in the worksheet.

For a worksheet with more than one designated X column, values in an X error column set the size of the X error for the first X column to the left of the X error column. If none exists, Origin looks to the right of the selected X error column. In the case of nonadjacent column selection, the selected X error column provides the X error values for the selected X column. If more than one X column is selected, Origin looks to the left for a selected X column and if none exists, then to the right. If an X column isn't included in the selection, Origin finds the first X column to the left of the selected X error column. If none exists, Origin looks to the right of the selected X error column.

Y Error

Values in the Y error column set the size of the Y error for the first Y column to the left of the Y error column. In the case of nonadjacent column selection, the selected Y error column provides the Y error values for the selected Y column located closest to the left of the Y error column.

Label

Text or numeric values in a label column plot as data labels for the associated Y column values immediately to the left of the label column. In the case of nonadjacent column selection, the selected label column provides data labels for the selected Y column. If more than one Y column is selected, Origin finds the selected column located closest to the left of the label column.

Disregard

Disregarded columns are not plotted, even if selected in the worksheet.

Designating a Column as X, Y, Z, Error, Label, or Disregard

Each worksheet column has one of seven column (Plot) Designations: X, Y, Z, X Error (bar), Y Error (bar), Label, or Disregard. The Plot Designation determines how selected data will plot - as X values, Y values, Z values, data labels (text annotations associated with specific XY coordinates), error bars, or not at all (disregarded).

To change the designation of a single column, do one of the following:

To change the designation of multiple columns, do this:

Possible Column Designations


All Y columns to the right of an X column are automatically associated with that X column. Origin illustrates the association by designating the first X column as X1, with the associated Y columns designated Y1. The second X column is designated X2, and its corresponding Y values are Y2.

When any Y1 column is selected for plotting, it will automatically plot against the column designated as X1. Similarly, columns designated as Y2 will automatically plot against the column designated as X2.

If two or more adjacent columns are designated as X, then Origin will set the designation as follows:

A(X1) B(Y1) C(Y1) D(X2) E(X3) F(Y3) G(Y3)

In this example, if one or both of the Y3 columns are selected for plotting, they will automatically plot against the column designated as X3. No columns will automatically plot against the column designated as X2.

Setting up a Worksheet with Multiple X Columns

To set up a worksheet with multiple X columns, do one of the following:

  1. Select the entire worksheet, or the desired range of columns, and then right-click in the selection range and select Set As:XYY, XY XY, XYY XYY, or XYYY XYYY.

or

  1. Select the desired column or columns (hold down the CTRL key for nonadjacent column selection) and then select Column:Set As X or right-click in the selection and select Set As:X.

When a worksheet has multiple X columns, Origin creates the following association between X and Y columns:


What if the Worksheet has No X Column?

When you create a graph by highlighting the desired worksheet data and selecting Plot:Graph Type or Plot:Template Library, and the worksheet has no X column(s), Origin uses the associated row number [i] as the X value for each data point.

Alternatively, incremental X values can be created for a worksheet that has no X column.

To assign X values from a column which is not designated as an X column in the worksheet, you must plot using the Plot Setup dialog box. This dialog box may also be used to define incremental X values for the plotting instance.


Setting up a Worksheet without X Columns

Worksheets can be created that contain no X columns. To set the worksheet up without an X column:

  1. Select the column(s) currently designated as X.

  2. Change the designation to Y (or other).

When you select one or more Y columns in a worksheet that has no X column and select Plot:Graph Type, Plot:Template Library, or click a button on one of the plotting toolbars, Origin plots the Y data against these default X values:

  • the corresponding row number.

or

  • incremental X values of your choosing.


Creating Incremental X Values

The Set Worksheet X menu command provides a quick way to set worksheet X values that have a regular increment (for example, 0.5, 1.0, 1.5 ...). This menu command is not available if the worksheet already contains an X column.

To set incremental X values for a worksheet with no X column:

  1. Select worksheet columns.

  2. Select Format:Set Worksheet X. This menu command opens the For Selected Columns in Worksheet dialog box.

  3. Set the Initial X value and the Increment in X for the active worksheet.


Displaying Default X Values

To display the default X values in the worksheet:

  1. Select View:Show X Column.

This menu command is operative even if you did not create default X values using the Format:Set Worksheet X menu command. In this case, Origin uses an initial X value and increment of 1.

Note: The View:Show X Column menu command is not available if the worksheet already contains an X column.


and one or more associated Y columns, Origin creates a graph with the X categories as X axis tick labels. These tick labels are organized alphabetically (categories starting with numeric values are first) and are evenly spaced across the X axis. The Y data are plotted at associated X tick values.

then you can map this categorical data to your data plots, displaying categories of data using the same symbol shape, color, size, or other plot attribute.

Categorical Data Support

Origin supports plotting categorical data in both X and Y columns. Before plotting categorical data, you must set the column to data type = Categorical:

  1. Select the column.

  2. From the menu, choose Column:Set as Categorical (or right-click on the selected column and choose Set as Categorical from the shortcut menu.

When you plot a Categorical X column

If your worksheet contains a Categorical Y column,

For more information on plotting categorical data, see Plotting Categorical Data.


Naming Columns and Adding Labels

  1. Double-click on the column to open the Worksheet Column Format dialog box.

  2. Type the name in the Column Name text box.

The column name must be one word (although it can be displayed on multiple lines) and must begin with a letter or a number. The name is also restricted to 18 characters.

  1. Double-click on the column to open the Worksheet Column Format dialog box.

  2. Type the label in the Column Label text box.

  3. Click OK.

You are prompted to automatically display the column label (see, The Heading Options group of the Worksheet Display Control dialog box).

Max number of characters is 63 in a one line label; special characters are permissible.

Naming Columns and Adding Labels

By default, Origin names columns alphabetically, starting with the leftmost column in the worksheet.

To name a column:

The column name does more than visually identify a worksheet column. The column name becomes part of the data set name that it contains. Origin names data sets using the following convention:

WorksheetName_ColumnName

For example, if the worksheet name is Data1 and the column name is A, then the data set in column A is named:

Data1_A

Origin uses this data set naming convention in various locations, including the graph window's Layer n dialog box. This notation is used when writing scripts using LabTalk.

The column label provides additional information about the data set. If a column label exists, it displays in the default legend for most of the graph templates (instead of the column or data set name).

To add a column label:

Note: When importing ASCII data into a worksheet, Origin automatically creates column labels using the first and second line of header text, if it exists.


Data Format and Display Characteristics

This section deals with specifying the Format and Display characteristics of your worksheet column data. The column Format can be set to Text & Numeric, Numeric, Text, Time, Date, Month, or Day of Week. Column Display options are Format dependent.

Column (data set) Format and Display are set in the Worksheet Column Format dialog box. To specify column Format and Display, do one of the following:


Reference: The Worksheet Column Format Dialog Box

Moves the column selection one column to the left or right.

The column name must be:

  • one word (although it can be displayed on multiple lines)

  • must begin with a letter or a number. The name is also

  • restricted to 18 characters.

To display the name on multiple lines:

  1. Insert a period (.) where you want the line to break.

  2. Select the Multiline Name check box in the Worksheet Display Control dialog box.

Select this check box to use the name in the current column as the base name for all columns to the right, and then number each of these columns, starting with the current column. For example, if the current column is named "test" and this check box is selected, then the current column is renamed "test1", the first column to the right is renamed "test2", etc.

The Plot Designation Drop Down List

The Format Drop Down List

The Display Drop Down List

The Numeric Display Display Drop Down List (Text & Numeric and Numeric Formats only)

The Internal Data Drop Down List (Numeric Format only)

The Apply to All Columns to the Right Check Box

Determines how the selected data will plot - as X values, Y values, Z values, data labels (text annotations associated with specific XY coordinates), error bars, or not at all (disregarded). Select the desired designation from the Plot Designation drop-down list. After clicking OK, the column heading displays the new designation.

Option | Description
Numeric | Accepts only numeric values.
Text | Accepts any alphanumeric characters. Values in a text column are treated as text, and can not be used in calculations.
Time | Accepts only 24-hour clock values. Enter hours:minutes:seconds:fractions-of-second, separated by colons.
Date | Accepts only calendar-accurate date values. Enter numeric or text values separated by a space, slash, or hyphen. For example, 1/18/99 or Mon Jan 18 1999 are both valid entries. Origin will only display possible dates. For example, 2/31/99 and Thursday 1/18/99 are not actual calendar dates, and thus are invalid entries. Additionally, if a date entry is incomplete, Origin assumes the current date for the missing information. For example, Origin will assume 1/18 is 1/18/99, if the current year is 1999.
Month | Accepts only month values. You can enter months as numeric values (1 - 12) or text values. The latter can be abbreviated to one character, as long as the character represents a unique month. For example, N for November, but Jun for June.
Day of week | Accepts only days of the week. Enter numerically (0 - 6) or as text values (M or Mon, T or Tue, etc.).
Text & Numeric | This is the default data type for all column designations except for "label." Accepts any alphanumeric characters. However, the text values are treated as missing values for all worksheet operations (such as plotting data points and performing mathematical operations), except where cell values are retrieved as text (such as plotting a data label).

Note 1: The default column type in post-Origin 6.0 worksheets is Text & Numeric, whereas the default column type in previous versions was Numeric with an internal data type of Double(8).

Note 2: If you are planning on sharing your Origin project with a colleague who has Origin 4.1, you should not use the Text & Numeric column type. Doing so could cause a loss in data when the project is opened in Origin 4.1. To ensure that all columns in all new worksheets are Numeric type instead of Text & Numeric, select the Use Numeric as Preferred Column Type check box on the Miscellaneous tab of the Options dialog box (Tools:Options).

Format = Numeric or Text & Numeric

Option | Description
Decimal:1000 | (1, 1000, 1E6, 1E9) Note: The threshold for conversion to scientific notation is controlled on the Numeric Format tab of the Options dialog box (Tools:Options).
Scientific:1E3 | (1E0, 1E3, 1E6, 1E9)
Engineering:1k* | (1.0, 1.0k, 1.0M, 1.0G) Origin supports the following Engineering data suffixes:
Decimal:1,000 | (1, 1,000, 1E6, 1E9) Note: The threshold for conversion to scientific notation is controlled on the Numeric Format tab of the Options dialog box (Tools:Options).

*A LabTalk system variable (@EF) is provided to enter engineering notation in a non-engineering column. If you set @EF = 1, and then enter engineering notation in a non-engineering column, Origin will treat the entry as numeric. Otherwise (@EF = 0), Origin will treat the entry as text (default). To learn more about LabTalk system variables, see the LabTalk Help file.

Format = Time

The Display drop-down list provides a display selection of hours, minutes, seconds, fractions-of-second, and an AM/PM indicator.

Format = Date

The Display drop-down list provides a display selection of date values. The entire date value - month, day, and year - is always preserved, but specific sections of the date can be displayed.

The first two date formats from the drop-down list display your Windows regional date setting (the first item is the short regional format and the second is the long regional format). You can customize these Windows regional settings and thus access the custom format in Origin.

Origin's date formats are listed below these regional formats.

The last two date formats in the drop-down list are Origin's available custom date formats. To customize these date formats, edit the Custom Dates Formats group on the Miscellaneous tab of the Options dialog box (Tools:Options).

Origin provides flexibility when entering date values into a worksheet cell. For example, to enter January 20, 1999, you could enter 1/20/99, 1.20.99, 1-20-99, 1,20,99, etc. You could also enter Wednesday, January 20, 1999 or January 20, 1999. Each entry is accepted and Origin displays the date based on the Display drop-down list selection.

Format = Month

Three month display formats are available: J abbreviates the month to a single letter, Jan abbreviates to three letters, and January displays the entire month.

Format = Day of Week

Three day of week display formats are available: M abbreviates the day to a single letter, Mon abbreviates to three letters, and Monday displays the entire word.

suffix | equivalent | quantity
k | kilo | 10^3
M | mega | 10^6
G | giga | 10^9
T | tera | 10^12
P | peta | 10^15
m | milli | 10^-3
u | micro | 10^-6
n | nano | 10^-9
p | pico | 10^-12
f | femto | 10^-15

Note that "u" is Origin's universal notation for micron. The only exception is graph axes tick labels, which support "mu". Note also that Origin 7 does not support "E" and "a" as suffixes.

Option

Description

Default Decimal Digits

Display all digits in a worksheet cell as determined by the Number of Decimal Digits combination box value on the Numeric Format tab of the Options dialog box (Tools:Options).

Set Decimal Places =

The number of digits that display after the decimal place (overrides the Number of Decimal Digits setting on the Numeric Format tab of the Options dialog box).

Type the decimal place value (n) in the associated text box. This value = the maximum number of digits displayed after the decimal point. If the field is blank, the default value is used (value = 5 for Double (8) internal data types).

Significant Digits =

The number of digits displayed. Type the value in the associated text box.

Double(8) allocates eight bytes of storage space to each value.

  • supports missing values.

  • only data type that will work with all math and fitting operations.

Float(4) allocates four bytes of storage space per value.

Integer(2) allocates two bytes of storage space per value.

Long(4) allocates four bytes of storage space per value. However, the value is stored as an integer.

Note: Set the internal data type before you enter the data. Otherwise, you risk losing some precision.

Apply the settings in the Options group to all columns to the right in the worksheet.

Enter the column width. The text box value is in units of characters.

If text is entered in the Column Label text box, it will be displayed in the graph legend instead of the column name. The maximum number of characters in a one line column label is 63. There are no restrictions on the characters entered. The Cut, Copy, Paste, and Undo buttons are available for editing the column label.

After you click OK to close the Worksheet Column Format dialog box, an Attention prompt asks if you want to display the column labels. If you click No, you can activate the display later by selecting Format:Worksheet and selecting the Column Label check box.

Reference: The Worksheet Column Format Dialog Box

Use the Worksheet Column Format dialog box to name or add labels to the column, to set the plot designation (X, Y, Z, etc.), data format and numeric display, and column width.

To open the Worksheet Column Format dialog box:

  1. Double-click on the worksheet column heading.

or

  1. From the menu, select Format:Column.

Worksheet Column Format Dialog Box Controls (see figure)

The Prev and Next Buttons

The Column Name Text Box

The Enumerate All to the Right Check Box

The Options Group


Numeric vs Text & Numeric

The Text & Numeric format uses approximately 20% more memory than type Numeric Double(8). In most cases this difference will not cause problems.

To configure Origin to use, by default, Numeric Double(8) for all columns in new worksheets:

  1. From the menu, select Tools:Options.

  2. Click the Miscellaneous tab.

  3. Select Use Numeric as Preferred Column Type.

If you need to save even more memory (upwards of an additional 50%), you can change columns to Format = Numeric with an Internal Data type of Float(4). To learn more, see Reference: The Worksheet Column Format Dialog Box.

CAUTION: Use of internal data types less than Double(8) may cause problems with various math operations.


  1. From the menu, choose Tools: Options.

  2. Click the Numeric Format tab.

  3. Set the number of Default Decimal Digits.

  1. With the worksheet active, select Format Column, or double-click on the worksheet column heading. This opens the Worksheet Column Format dialog box.

  2. Change Numeric Display from Default Decimal Digits to Set Decimal Places = or Significant Digits =, and enter a number in the text box to the right (max Decimal Places = 13; max Significant Digits = 16).

  3. Optionally, select Apply to All Columns to the Right.

Format and Numeric Display

When the worksheet column is set to Format = Numeric type or Text & Numeric (in the Worksheet Column Format dialog box), the number of displayed digits is determined by a combination of these settings in the Worksheet Column Format dialog box:

  • Display. Specify decimal, scientific, or engineering formats.

  • Numeric Display. This is the number of decimal places or significant digits to display in the column (data set).

If not specified (i.e. Numeric Display is set to Default Decimal Digits), Origin uses...

  • A global Number of Decimal Digits setting in the Numeric Format tab of the Options dialog box.

Note that the Numeric Display settings in the Worksheet Column Format dialog box take precedence over the global setting in the Options dialog box.

To set the number of default decimal digits (global except as specified in the next procedure):


Decimal, Scientific and Engineering Notation

  1. Select Tools:Options.

  2. In the Scientific Notation group, set the Upper Threshold Power and Lower Threshold Power.

Decimal, Scientific, and Engineering Notation

Origin supports display of worksheet data in Decimal:1000, Scientific:1E3, Engineering:1k, and Decimal:1,000 formats. Decimal:1000, Engineering:1k, or Decimal:1,000, Origin use additional controls for the Upper Threshold Power and the Lower Threshold Power for use of these formats .

By default, these control values are set to 6 and -3, respectively. This means:

  • For values in the range of 1x10-3 to 1x106, data will display using the format specified in the Format drop-down list in the Worksheet Column Format dialog box.

  • For values that exceed either the lower or upper conversion thresholds (less than 1x10-3 or greater than 1x106), data will display in scientific notation, regardless of the setting in the Format drop-down list.

To change the default threshold power controls:


Displayed Cell Value vs Actual Cell Value

When you import or type your data into a worksheet, Origin uses the number of digits/decimal places settings to display the data in each cell . Note that this is merely a visual representation of the data set; the actual data values are stored, and when you perform calculations, it is the actual data values that are used, not the displayed values.


A Note on Dates and Times in Origin

Origin interprets dates based upon the Gregorian Calendar. Time is interpreted in hours:minutes:seconds. Origin supports the following date range:

  • When entering four digits for the year, Origin supports a date range of:

1/1/0100 to 12/31/9999.

  • When entering two digits for the year, Origin supports a date range of:

0 to 44 = 2000 to 2044

45 to 99 = 1945 to 1999

Origin's mathematical system for dates and time is based on Astronomical Julian Day Numbers. This defines -4712 January 1, 12 hours Greenwich Mean Time as zero. Origin uses a 12 hour offset in order to have 0 hours coincide with midnight. No assumptions are made about time zones or any time shifting scheme (such as Daylight Savings).

In this system, for example:

11 June 1998 at 21:23:01

has an Origin Julian Day Number of

2450975.890984.

Add .5 (Origin's 12 hour offset) to get the true Julian Day Number of 2450976.390984.


Dates and Times in the Worksheet

Format is set to... | Display is set to... | Entering this... | Displays this... | Numeric Value
Date* | 06/12/1998 Friday, June 12, 1998 06/12/1998 hh:mm | 6-12-98 6/12/98 6.12.98 12:30 | 06/12/1998 Friday, June 12, 1998 06/12/1998 12:30 | 2450976 2450976 2450976.5208333
Time* | hh:mm hh:mm pm | 6 3 a | 06:00 03:00 AM | .25 0.1354167
Month* | January Jan | Ja 10 | January Oct | 1 10
Day of Week* | Monday Mon | Friday 2 | Friday Tue | 5 2

*internal numeric values are Julian Day Numbers.

*internal numeric values are ordinal numbers.

These internal numerical values become important when performing math operations with any of the Date/Time column types.

0 to 44 = 2000 to 2044

45 to 99 = 1945 to 1999

If you select a two digit year date display format from the Worksheet Column Format's Format drop-down list (for example, MM/DD/YY), and then enter a four digit year that is outside of this implied year range, Origin will display all four digits in the year.

As an example,

if you select MM/DD/YY, and then type 3/4/2045 in a worksheet cell, Origin will display 3/4/2045. However, if you type 3/4/1945 in a worksheet cell, Origin will display 3/4/45. In the first case, the four digit year was outside of the implied range, so Origin displayed all four digits to avoid confusion. In the second case, the four digit year was within the implied range, so Origin displayed the two digit year.

Dates and Times in the Worksheet

Origin's worksheet supports Date and Time as Format types and will display various specific date and time formats. Month and Day of Week are also supported.

Note that there is a difference between the date- and time-formatted text that displays in the worksheet column and the underlying numeric value that is used for plotting and calculation.

Dates and Times for Given Format and Display Settings:

When you import an ASCII file, Origin may initially treat a column as Text when it should be treated as Date or Time values. By changing the Format, Origin will convert the data to a proper Date/Time format.

Note: When you enter a two digit value for the year, Origin uses an implied year range:


Worksheets: Windows and Templates

Origin worksheets can be saved as two distinct file types, each with its own distinct applications:

  • Origin worksheet window (OGW) files can be saved independently of the Origin project. These files retain the display properties of the worksheet templates that were used to create them. They also contain data. To learn more about saving and opening child windows, independent of the project (OPJ) file, see Saving Child Windows from a Project File and Opening a Window from a File.

  • Origin worksheet template (OTW) files are always saved independently of the Origin project file (though any worksheet file in the project can become a template file). Unlike worksheet window files, they do not store data. To learn more about Origin worksheet templates, see Worksheet Templates and Attributes Saved with a Worksheet Template.


  1. Select File:Save Template As. This menu command opens the Save As dialog box.

  2. Specify a name (and folder) for the template. The OTW extension is automatically added.

  1. Select File:New. This menu command opens the New dialog box.

  2. Select Worksheet from the Window Type list box.

  3. If necessary, use the browse button to the right of the Path (Template group) to locate the OTW file.

  4. Select the worksheet template from the Name drop-down list.

  5. (Optionally) Specify this as the default worksheet template by clicking Set Default.

Saving a Worksheet as a Template

Worksheets are created from templates. A worksheet template file (*.OTW) contains instructions for constructing the worksheet window. The template file determines such things as the number of columns, column designations, formulas associated with a column, and scripts associated with the worksheet.

To save the active worksheet as a template:

To create a worksheet based on a specific (OTW) template:


Attributes Saved with a Worksheet Template

The Worksheet Display Control and associated Page Color dialog boxes provide customization of the color, style and size of font, and the colors and dimensions of various elements.

To open the Worksheet Display Control dialog box:

  1. select Format:Worksheet when the worksheet is active.

To learn more, see Worksheet Display Control.

The Worksheet Display Control and associated Page Color dialog boxes provide customization of the color, style and size of font, and the colors and dimensions of various elements.

To open the Page Color dialog box:

  1. select Format:Worksheet when the worksheet is active.

  2. Click the Page Color button in the Worksheet Display Control dialog box.

To learn more, see Worksheet Display Control.

The Worksheet Column Format dialog box sets the name, column type, format options, column width, and column label for the active column.

To open this dialog box:

  1. Select Format:Column when a worksheet column is selected.

To learn more, see the Worksheet Column Format dialog box.

When you use the Import Wizard to import data, you have the option of creating and saving an Origin Import Filter file (*.OIF) for later use with the same or similar files. The filter files can be saved to a worksheet template that you set up for importing your data files.

To learn more, see Import Wizard and Saving Import Wizard Filter Files.

In additon, you may want to review Origin's Drag-and-Drop Data File Support for Worksheets.

The ASCII Import Options for Worksheet, Data Import Options for Worksheet, and Import Verification dialog boxes set the default import behavior for a worksheet.

To open these dialog boxes:

  1. Select File:Import:ASCII Options or File:Import:Other Options.

To learn more, see Importing ASCII Files.

Also, see Import Wizard.

The ASCII Import Options for Worksheet, Data Import Options for Worksheet, and Import Verification dialog boxes set the default import behavior for a worksheet.

To open these dialog boxes:

  1. Select File:Import:ASCII Options or File:Import:Other Options.

To learn more, see Importing ASCII Files.

Also, see Import Wizard.

The ASCII Import Options for Worksheet, Data Import Options for Worksheet, and Import Verification dialog boxes set the default import behavior for a worksheet.

To open these dialog boxes:

  1. Select File:Import:ASCII Options or File:Import:Other Options.

To learn more, see Importing ASCII Files.

Also, see Import Wizard.

The ASCII Export Into dialog box sets the default export behavior for the worksheet, including controlling the export of column names and labels, and the data separator.

To open this dialog box:

  1. Select File:Export ASCII.

  2. Click Save (the Export ASCII dialog box).

Origin opens the ASCII Export Into dialog box.

To learn more, see Exporting Worksheet Data.

The equations in the Set Column Values dialog box are saved with the template.

To open this dialog box:

  1. Select Column:Set Column Values.

To learn more, see Using Functions to Set Column Values or Mathematically Transform Values

The equations in the Extract Worksheet Data dialog box, are saved with the template.

To open this dialog box:

  1. Select Analysis:Extract Worksheet Data.

To learn more, see Extracting Data from the Worksheet.

The script in the Worksheet Script dialog box is saved with the template.

To open this dialog box:

  1. Select Tools:Worksheet Script.

To learn more, see Associating Script with a Worksheet and The Worksheet Script Dialog Box.

This would include...

  • the Text Control dialog box.

  • the Label Control dialog box.

  • the Object Properties dialog box.

Attributes Saved with a Worksheet Template

The worksheet attributes that can be saved to a template are controlled from the following dialog boxes:

  • The Worksheet Display Control dialog box.

  • The Page Color dialog box.

  • The Worksheet Column Format dialog box.

  • The Origin Import Filter (*.OIF) file (optional).

  • The ASCII Import Options for Worksheet dialog box.

  • The Data Import Options for Worksheet dialog box.

  • The Import Verification dialog box.

  • The ASCII Export Into dialog box.

  • The Set Column Values dialog box.

  • The Extract Worksheet Data dialog box.

  • The Worksheet Script dialog box.

  • The dialog boxes that control any annotations on the worksheet.


Worksheet Data

There are a number of ways to add data to the worksheet:

  • From the keyboard.

  • Creating data sets of row numbers, random numbers, or incremental X values.

  • Copying and pasting data using the Clipboard.

  • Defining a function to create or transform a column of values (data set).

  • File import.

  • Opening an Excel file as an Origin worksheet.

Click here to view a multi-media demonstration


This feature is controlled by a LabTalk numeric system variable. To disable the # sign display:

  1. Click the Script Window [image] button.

  2. Type the following line in the Script window:

@wc = 1 <ENTER>

(If you do not see a change when you reactivate the worksheet, click the Refresh [image] button).

To reactivate the # sign display, open the Script Window and type:

@wc = 0 <ENTER>

Display of Numbers that Exceed the Column Width

If a worksheet column contains data that exceed the column width, Origin displays cell value(s) as series of pound signs (######). The intent is to avoid confusion caused by the truncated display of cell values. Cell values that display as ###### will revert to numbers when you enter cell editing mode.

To disable this feature:

To change the column width:


A Note on Missing Values in the Worksheet

When spreadsheet programs first appeared it was recognized that there was a need for a special number that was Not-A-Number which would - when used in a calculation - generate itself. Origin has such a number and its internal value is:

-1.23456789E-300

Because this value is out of the range of numeric assignment, this provides a way to enter a missing value in a worksheet and use it in calculations.

Origin displays missing values in a worksheet as "--". However, you shouldn't confuse this display (output) with what you enter as a missing value (input).

  • If the worksheet column Format is set to Numeric, typing any text (for example, "missing" or "--") will set the cell's value to a missing value.

  • For column Formats other than numeric, you must manually enter missing values by typing something that Origin recognizes as invalid for that column type (For example, Origin displays "--" when you type "13" into a cell of a column with Format set to Month).

  • To set a missing value in an equation (for example, in the Set Column Values dialog box), divide anything by zero.

  • If you leave cells blank between the first and last values in a column of data, Origin automatically sets those cell values as missing values. To view the "--" display, you may need to click the Refresh [image] button on the Standard toolbar.


Entering Data using the Keyboard

  1. Select the cell and then press F2.

or

  1. double-click at the desired position to position the cursor in the cell (to prevent overwriting).

  1. Press the Up Arrow, Down Arrow, PAGE UP, PAGE DOWN, ENTER, or TAB keys.

This action also moves the cell activity to the new location.

Key | Description
ENTER | Move the cell activity one cell down.
Left Arrow or SHIFT+TAB | Move the cell activity one cell to the left. If the currently active cell is in the leftmost column of the worksheet, move the cell activity to the rightmost column in the previous row.
Right Arrow or TAB | Move the cell activity one cell to the right. If the currently active cell is in the rightmost column of the worksheet, move the cell activity to the leftmost column in the next row.
HOME | Move the cell activity to the first cell in the column.
END | Move the cell activity to the last cell in the column.
PAGE DOWN | Move the cell activity one page down.
PAGE UP | Move the cell activity one page up.
CTRL+HOME | Move the cell activity to the leftmost cell in the first row of the worksheet.
CTRL+END | Move the cell activity to the rightmost cell in the last row of the worksheet.
CTRL+PAGE DOWN | Move the cell activity one page to the right.
CTRL+PAGE UP | Move the cell activity one page to the left.
CTRL+Down Arrow | Move the cell activity to the cell with the last value in the column.
CTRL+Up Arrow | Move the cell activity to either the cell with the last value in the column, or to the column's first cell, whichever is the first one upward from the current cell.
CTRL+Left Arrow | Move the cell activity to the cell in the leftmost column in the same row.
CTRL+Right Arrow | Move the cell activity to the cell in the rightmost column in the same row.
Key | Description
DELETE | Delete one value to the right of the cursor, or delete all highlighted values.
BACKSPACE | Delete one value to the left of the cursor or delete all highlighted values.
HOME | Move the cursor to the leftmost position in the cell.
END | Move the cursor to the rightmost position in the cell.
Left Arrow | Move the cursor one character to the left.
Right Arrow | Move the cursor one character to the right.

Entering Data using the Keyboard

To enter data directly into the worksheet, type the value into the cell.

  • Press ENTER (or the down arrow) to move to the next cell in the same column,

  • press TAB (or the right arrow) to move to the next cell in the next column

or

  • Click with the mouse in any cell in which you want to enter a value (you are not limited to a neighboring cell).

If you make an error when typing data, or want to change a value in a cell, left-click once in the cell to highlight the cell value and type the correct value. Origin automatically overwrites the value in the cell.

To edit a cell value:

To exit the cell editing mode:

Keys Used for Worksheet Navigation


Deleting Data

  1. Select the desired cells/column(s)/row(s).

  2. Select Edit:Delete.

Both worksheet values, as well as the worksheet cells, are deleted.

  1. Select the cells containing the data you want to delete.

  2. Press the DELETE key.

or

  2. select Edit:Clear.

Missing values (--) fill the selected cells.

Deleting Data

To clear the entire contents of a worksheet (does not delete data sets):

  1. Select Edit:Clear Worksheet.

An Attention box asks you to confirm clearing the selected cells.

To delete a range of cells, a column, or a row from the worksheet (delete both values and cells):

To delete data from the worksheet without deleting the corresponding cells:

See, A Note on Missing Values in the Worksheet.


Exchanging Worksheet Data Using the Clipboard

Copying Worksheet Data

Pasting Data into Origin

Exchanging Data Between Worksheets

Using the Script Window to Exchange Data


Copying Worksheet Data

To copy worksheet data to another application using the Clipboard:

  1. Highlight the desired data range and select Edit:Copy.

The worksheet data can then be pasted into another Windows application.


Pasting Data into Origin

  1. Select a cell (or range of cells) in the target worksheet.

  2. Select Edit:Paste.

  1. Click on the target cell.

  2. Select Edit:Paste.

  1. Select the cell that is to be the upper-left corner of the range.

  2. Select Edit:Paste.

  1. Select the cell that is to be the upper-left corner of the range.

  2. Select Edit:Paste Transpose.

To link the data when pasting into the destination cells:

  1. Select the cell that is to be the upper-left corner of the range

  2. Select Edit:Paste Link.

This command establishes a DDE (Dynamic Data Exchange) link with the source data file.

When the source data changes, the Origin worksheet is updated. When you close an Origin project that has a DDE link, Origin reminds you that this project is linked to another document. The next time you open the project, Origin opens the Start DDE Link dialog box. This allows you to re-establish the link with the source file.

If you click Yes in the Start DDE Link dialog box when the source application is closed, Origin will re-open the source application and file only if the source application is in the DOS path and instead opens the Origin file without the external link. To ensure that the link to the source file is correctly re-established:

  1. Open the source application and file.

  2. Return to Origin and click Yes in the Start DDE Link dialog box.

Pasting Data into Origin

Use the Clipboard to...

  • Paste

  • Transpose and Paste

  • Paste and Link

...data in the worksheet.

To paste the contents of the Clipboard into a worksheet:

To paste a single value into the worksheet:

To paste a range of values into the worksheet,


Exchanging Data Between Worksheets

Data can be exchanged between Origin worksheets, or within a single Origin worksheet, via the Clipboard, or by entering commands in the Script window. When exchanging data via the Clipboard, Origin provides a paste transpose option.

Note: When you enter a numeric value in a worksheet cell, Origin rounds off the displayed value if the number of digits after the decimal place exceeds the value specified in the Numeric Display text box, when Set Decimal Places is selected from the Numeric Display drop-down list, both of which are located in the Worksheet Column Format dialog box. Origin uses the entered value in calculations. However, only the rounded off value is exported to a file or copied to the clipboard.

Using the Clipboard to Exchange Data

Using the Script Window to Exchange Data


Using the Script Window to Exchange Data

LabTalk script can be entered in the Script window for immediate execution. The LabTalk copy command can be used to copy a data set from one worksheet to another.

Using LabTalk to Copy Data Sets

  1. Click the New Project button on the Standard toolbar to open a new project.

  2. Open a second worksheet by clicking the New Worksheet button on the Standard toolbar.

  3. Type numeric values in the first four rows of columns A and B in the Data1 worksheet.

  4. Click the Script Window button on the Standard toolbar to open the Script window.

  5. In the Script window, type the following command and then press ENTER (script is not case-sensitive):

COPY DATA1_A DATA2_A

Execution of this command copies column A of the Data1 worksheet to column A of the Data2 worksheet. If the script does not execute:

  1. Check that the Script Execution menu command (Edit:Script Execution) is selected from the Script window menu bar.

  2. Click on the menu command if it is not checked.

  3. Place the cursor at the end of your line of line of code in the Script window.

  4. Press ENTER to execute the script.


Assigning Incremental X Values

Use the For all Worksheet Columns dialog box to create an X dataset of values with a regular increment (for example, 1, 2, 3, ... , 5, 10, 15, ...) This option is available only if the worksheet has no X columns.

To open the For all Worksheet Columns dialog box:

  1. Select Format:Set Worksheet X.


Filling Columns with Row Numbers or Random Numbers

  1. Click the Set Column Values According to Row Number [image] button on the Worksheet Data toolbar.

or

  1. Select Column:Fill Column With:Row Numbers.

or

  1. Right-click and select Fill Column With:Row Numbers.

  1. Click the Set Column Values with Uniform Random Numbers [image] button on the Worksheet Data toolbar.

or

  1. Select Column:Fill Column With:Uniform Random Numbers.

or

  1. Right-click and select Fill Column With:Uniform Random Numbers.

For the uniform random number fill, the minimum and maximum numbers generated are determined by the UNIFORM_MIN and UNIFORM_MAX variables. By default, these variables are set to 0 and 1, respectively.

  1. Click the Set Column Values with Uniform Random Numbers [image] button on the Worksheet Data toolbar.

or

  1. Select Column:Fill Column With:Normal Random Numbers.

or

  1. Right-click and select Fill Column With:Normal Random Numbers.

For the normal random number fill, the mean and the standard deviation are controlled by the NORMAL_MEAN and NORMAL_SIGMA variables in the [FillColumn] section of the ORIGIN.INI file. By default, these variables are set to 0 and 1, respectively.

Filling Columns with Row Numbers or Random Numbers

You can fill a column, or a selected range of cells, with:

  • Row Numbers. To fill with row numbers:

  • Uniform Random Numbers. To fill with uniform random numbers:

  • Normal Random Numbers. To fill with normal random numbers:


Using Functions to Set Column Values or Mathematically Transform Values

  1. Select a worksheet column or a range of cells in a worksheet column.

  2. From the menu, choose Column:Set Column Values.

or

  2. Right-click on the worksheet column and choose Set Column Values from the shortcut menu.

If you select a column or a range of cells in a column prior to opening the Set Column Values dialog box, the beginning and ending worksheet row numbers will automatically register in the For Row (i) and To text boxes.

To alter the selection range, overwrite the values in these text boxes. Your function will affect only the cells that fall within rows For Row (i) and To.

To learn more about how the For... and To settings affect AutoUpdate behavior, see AutoUpdate of Set Column Values.

Use the Add Function and Add Column controls to add mathematical and statistical distribution functions, or data sets within the same worksheet, to the ColumnName= text box (without typing out function or data set names).

The Add Function list includes Origin's built-in mathematical and statistical distribution functions. When you select a function from the drop-down list, a function summary including a description of the function arguments displays in the left view box. To select a function so that it displays in the ColumnName= text box:

  1. Select your function from the Add Function list.

  2. Click the Add Function button.

If text was highlighted in the ColumnName= text box, that text becomes the (last) argument for the chosen function. If no text was highlighted, the function is entered at the last active cursor location.

The Add Column list includes an entry for each column in the active worksheet*. To add a dataset to an expression in the ColumnName= text box:

  1. Select a column from the Add Column list.

  2. Click the Add Column button.

If text was highlighted in the ColumnName= text box, Origin overtypes this text with the chosen column name. If no text was highlighted, the column name is entered at the last active cursor location.

*Reference data sets in other worksheets using the WorksheetName_ColumnName syntax. For example, to specify the C column in the Data3 worksheet, you can type Data3_C.

Define an expression that creates a dataset in the selected worksheet column cells. The expression can reference any data sets (columns) in the project. Definitions must use the standard Origin arithmetic operators and Origin built-in or LabTalk-callable user-defined Origin C functions.

Use the variable i in your expression to indicate row number. For example, the expression col(A)=i fills column A with row number values.

Reference data sets in other worksheets using the WorksheetName_ColumnName syntax. For example, to specify the C column in the Data3 worksheet, you can type Data3_C.

Note: LabTalk expressions end with a semi-colon. However, you do not include a semicolon after the expression entered in the Set Column Values dialog box.

  • Use any of Origin's built-in functions, following the syntax described in the LabTalk Language Reference Section of the Programming Help file (Help:Programming).

  • Use a LabTalk variable.

  • Use a LabTalk-callable Origin C function.

Closes the dialog box and sets the values for the selected cells according to the expression in the ColumnName= text box.

Undo/Redo the last change made to the expression in the ColumnName= text box.

Note: You can enable an AutoUpdate of column values when source data are changed; by default, AutoUpdate is disabled. If AutoUpdate is disabled, you can update all data sets in the active worksheet by:

  1. Selecting the the menu command Analysis:Set All Column Values.

  2. Selecting the Set All Column Values button [image].

Values in the active worksheet are updated, starting from the left-most column and moving to the right.

AutoUpdate is not sensitive to column position and allows references to source data in other worksheets (Set All Column Values acts only on the active worksheet).

Using Functions to Set Column Values or Mathematically Transform Values

Use the Set Column Values dialog box to define a mathematical expression that creates a data set. Your mathematical expression can reference other Origin data sets and can include Origin built-in functions, user-defined and compiled Origin C functions, and LabTalk variables.

To open the Set Column Values dialog box:

Dialog Box Controls (see figure)

For Row (i) and To

Add Function and Add Column

The ColumnName= Text Box

The OK Button

The Undo/Redo Button

The AutoUpdate Check Box

Click here to view a multi-media demonstration


Auto Update of Worksheet Data

You have two worksheets named Data1 and Data2. You open the Set Column Values dialog box for column B of worksheet Data2 and you enter:

Col(B) = Col(A) + Data1_B;

Whenever Col(A) of worksheet Data2 and/or Col(B) of worksheet Data1 changes, values in column Data2_B are updated.

The AutoUpdate process occurs while Origin is idle. When using this feature in the user-interface -- as when you are modifying source data by direct edit, by copy/paste, or by data import -- the destination column(s) will be seen to update immediately.

This does not occur in the programming environment. If you programmatically change the source data, and want the column values updated before executing the next command/statement, you must force an AutoUpdate.

In Origin C, there is a Project.Run() method for forcing an AutoUpdate.

In LabTalk, the equivalent command is run –p au.

Note that forcing an update will update all destination columns whose source data has changed.

Sample LabTalk code:

data1_a=normal(30);

run -p au;

sum(data1_b);

sum.total=;

In this example...

  • It is assumed that column data1_b will AutoUpdate when changes occur in data1_a.

  • The run –p au command on the second line ensures that data1_b is updated before subsequent lines of code use the values in data1_b.

  • Leaving out the run –p au line will result in old values of data1_b being used for the subsequent computations.

Note: A system variable, @au, controls AutoUpdate behavior. By default, @au = 1, in which case AutoUpdate is performed on idle. If you set @au = 0, AutoUpdate must be triggered manually (as with the run –p au command).

AutoUpdate of Worksheet Data

This feature lets you create a mathematical relationship between data values in two or more worksheet columns and to have the values in the target (dependent) column(s) update automatically any time data in the source column(s) are modified. AutoUpdate supports referencing of any worksheet data set in the Origin project (see below).

Mathematical relationships are established via the Set Column Values dialog box. To open the Set Column Values dialog box for a worksheet column:

  1. Select the column and choose Set Column Values from either the shortcut menu or from the Column menu (Column:Set Column Values).

  2. Enable AutoUpdate by selecting the box at the bottom of the dialog.

If AutoUpdate is selected, column values in rows For Row (i) to To (of the Set Column Values dialog box) are updated whenever values in other columns referenced in the col(ColumnName)= text box are changed.

Col(ColumnName) formulae can refer to:

  • Other columns in the same worksheet (using the col(ColumnName) notation).

  • Columns in other worksheets (using the WorksheetName_ColumnName notation).

Example:

Click here to view a multi-media demonstration

Note: Cyclical referencing is checked for, reported, and not permitted.

When AutoUpdate is enabled for a column of data, the column is locked for editing. This condition is indicated by the lock icon on the column header. AutoUpdate is disabled by default.

When AutoUpdate is enabled, the default value of For Row (i) and To is Auto (internally, this value = -1); this is to indicate that all rows auto-track the source column(s). You can specify a subrange of rows manually. In such cases, any change to data in a source column(s) will trigger the AutoUpdate routine, but only changes in source data within the destination column's For Row (i) and To range will update values in the destination column.

Note that you can use this feature to call Origin C functions in the Set Column Values dialog box that take double or vector as an argument. To see an example of an OPJ with an attached OC file, whose functions are used in the Set Column Values dialog box with AutoUpdate enabled, see the project \Samples\Programming\Passing Vectors\PassingVectors.OPJ

Programming Notes:


Importing Data into a Worksheet Window

Data can be imported into the worksheet in a variety of formats and in a variety of ways:

For Data Files of Type...

See These Topics...

ASCII

  • Importing ASCII Files

  • Import Wizard

binary

  • Import Wizard

database

  • Importing Data from a Database Using ODBC

dBASE

  • Importing dBASE Files

DIF

  • Importing DIF Files

Kaleidagraph (binary data files)

  • Importing Kaleidagraph Binary Data

LabTech

  • Importing LabTech Files

Lotus

  • Importing Lotus Files

Mathematica (vectors and matrices)

  • Importing Mathematica (Vectors and Matrices)

MATLAB (numeric, character, sparse)

  • Importing MATLAB Files

pCLAMP

  • Importing pCLAMP Data Files

Minitab

  • Importing Minitab Data

SigmaPlot

  • Importing SigmaPlot Files

sound

  • Importing Sound Files

Thermo Galactic SPC

  • Importing Thermo Galactic SPC Data Files

user-defined

  • Import Wizard

  • Origin's Drag-and-Drop Data File Support for Worksheets

Note: You do not import MS Excel files, but rather you open them in the Origin workspace. To open the Excel workbook as a workbook or as an Origin worksheet, select File:Open Excel from the Origin menu. For more information, see Working with Excel in Origin.


Importing ASCII Files

There are several ways in which you can import ASCII files into a worksheet:

  • For import of single, space or tab-delimited data files with simple or non-existent header information, see Importing a Single ASCII Data File into the Worksheet.

  • For multi-file import of space or tab-delimited data files with simple or non-existent header information, see Importing Multiple ASCII Data Files into a Single or Multiple Worksheets.

  • A partial file import of ASCII data can be set up using either the Import Wizard (recommended) or by selecting the Partial Import check box in the Import ASCII dialog box.

  • For import of more complex ASCII files or to create filters for repeat use with the same or similarly structured ASCII files, use Origin's interactive Import Wizard.

  • For information on dragging and dropping ASCII files into Origin, see Origin's Drag-and-Drop Data File Support for Worksheets.


Importing a Simple Single ASCII Data File into the Worksheet

The File:Import:Simple Single ASCII/Multiple ASCII methods are an older Origin feature. For import of ASCII, as well as binary and user-defined file types, we recommended that you use the Origin Import Wizard. The following information is provided simply for those who choose to use the older ASCII Import methods.

To import a single ASCII file into the active worksheet:

  1. Click the Import ASCII button [image] on the Standard toolbar.

or

  1. Select File:Import:Simple Single ASCII. This menu command opens the Import ASCII dialog box.

  2. Select the file extension from the Files of Type drop down list, specify a File Name, and click Open.

Origin uses the default import settings specified in the ASCII Import Options for Worksheet dialog box to import the data file. In many cases, the default import settings are adequate to import your data file (Origin examines the data file, looks for columns of numbers and ignores anything else).

This method will prove inadequate for more complex files, in which case, you will need to specify the data structure and import settings explicitly. You can take either of two approaches:

  • Use the Import Wizard to show Origin how to parse your data file (recommended). Optionally, create a filter file and save it for future use with the same or similar data files. For information on using the Import Wizard to import your ASCII files, see The Import Wizard.

or

  • You could customize the ASCII Import Options for Worksheet dialog box settings and try re-importing the file. For information on customizing the import settings, see Customizing the Default ASCII Import Settings.


Customizing the Default ASCII Import Settings

There are two types of ASCII files: those in which data are delimited by a character (typically a comma, tab, or white space), and fixed column files that specify the width of columnar fields. Origin can usually guess the correct file structure when importing a file, but will sometimes have difficulty with very complex files. You can often solve the problem by specifying the file structure, if known.

For a delimited file, select a delimiting character from the Delimited, Delimiter drop-down list, or select Other from the drop-down list and enter the delimiting character in the associated text box. If you select Unknown, Origin will search your file, looking for a consistent delimiter. If the file uses a consistent delimiter, Origin will determine the file structure.

For a fixed column file, specify the width of each columnar field in the associated text box. Separate each value with a comma. Origin uses the last number entered to set the width for all remaining columns. If you enter a single width value, Origin sets all columns to that width.

When the Automatic Determination of Column Types check box is selected, Origin automatically determines whether each column contains text or numeric data, and sets each worksheet column type accordingly. When the check box is cleared, Origin retains the column type settings of the worksheet into which you are importing data.

Specify the number of lines used for structure testing in the associated text box. Enter a number which is greater than the header size, but smaller than the size of the file.

If your data file contains zero-padded data (data with leading zeros), select the Support Numbers with Leading Zeros check box to properly import the data.

When importing a file, Origin looks at the contents of the first few cells to determine if a column contains numeric or non-numeric information. The When Non-Numeric is Found in Numeric Fields drop-down list selection controls how Origin proceeds if non-numeric information is encountered in a numeric column after the header. Select an option from the associated drop-down list.

The number of lines that should be ignored before Origin starts importing data is specified in the Skip Main Header, Number of Lines text box. Select the Auto Determine to Skip more Header Lines radio button to cause Origin to skip lines until it encounters a consistent and recognizable file structure. You can also select a specific number of sub-header lines to skip by selecting the Specify Known Subheader Lines (0,1...) radio button and editing the associated text box.

You can store text from the file header in the worksheet’s column labels. This option is provided by the “Max # of Lines to Store in Column Labels” text box. By default, up to seven lines of header text can be stored in the column labels.

When the Unknown radio button is selected, Origin imports all columns in the file. You may also specify x number of columns for Origin to import. If the file you want to import contains more than x columns, only the first x columns import. If the file contains less than x columns, the entire file imports. Origin does not create additional worksheet columns.

This option determines how the imported data is added to the active worksheet. The New Data option enables overwriting of the existing worksheet data. The New Columns option adds new columns to the right of the current columns in the worksheet, as necessary, to accommodate the data. The New Rows option adds new rows to the bottom of the worksheet, as necessary, to accommodate the data.

Note: If you are importing your data into new columns and a column name in your file duplicates a column name already used in the worksheet, you can append the file’s column name into the worksheet column’s label field. To do this, open the Data Import Options for Worksheet dialog box (File:Import:Other Options), and select the Create Column Labels from Header check box. Now when you plot your data, Origin will automatically include the column label information in the graph legend.

Click Import Now to import the ASCII file after you are satisfied with the dialog box settings. Origin updates the worksheet and opens the Import ASCII dialog box, from which you select an ASCII file. The file is imported using the current dialog box settings.

Click Update Options to save the current settings into the active worksheet and close the dialog box.

The Data Import Options for Worksheet Dialog Box (see figure)

The Rename Columns if 1st Line Contains Labels Check Box

The Rename Worksheet to Data File Name Check Box

The Apply New Range to Associated Data Plots Check Box

The Create Column Labels from Header Check Box

A Note on Importing Your Data Set and Displaying File Labels in the Column Name and Column Label Fields

If selected, this check box directs Origin to take the first line of the imported file that contains text, and use the text to name the worksheet columns.

If selected, this check box directs Origin to change the name of the active worksheet to the name of the imported file.

If this check box is selected, the display range is set to encompass all of the imported data. If this check box is cleared, the current worksheet display range settings remain in effect. Clearing this check box lets you view a specific range of data from a series of imported data files. For example, if you have plotted a column of worksheet data and set the display range from row 10 to row 35, only imported data points in these rows display.

If selected, this check box directs Origin to append the import file column names to the associated worksheet column labels. Origin automatically displays the column labels after importing the file.

If your data file includes two lines of column information, such as the following data file, you can display the file’s column names (Thrust and Pitch) in the worksheet column name field, and both the file’s column names and labels (Thrust and Pitch, Lbs and Deg) in the worksheet column label field. Doing this allows you to maximize the data set information displayed by default in the graph legend.

Thrust Pitch

Lbs Deg

1 4

2 56

3 42

etc…

To display the file’s names and labels in the worksheet, select the Rename Columns if 1st Line Contains Labels check box and the Create Column Labels from Header check box in the Data Import Options for Worksheet dialog box. After importing the data file, Origin automatically displays both header lines in the worksheet column label fields.

Thrust(X) Pitch(Y)

Thrust Pitch

Lbs Deg

1 4

2 56

3 42

etc…

When you highlight and plot the data, the worksheet’s column labels display in the graph legend by default.

Customizing the Default ASCII Import Settings

The File:Import:Simple Single ASCII/Multiple ASCII methods are an older Origin feature. For import of ASCII, as well as binary and user-defined file types, we recommended that you use the Origin Import Wizard. The following information is provided simply for those who choose to use the older ASCII Import methods.

To view the default import settings ASCII import settings for the active worksheet window:

  1. From the Origin menu, select File:Import:ASCII Options.

or

  1. Click Options in the Import ASCII dialog box (this dialog box opens when you select File:Import:Simple Single ASCII or Multiple ASCII.

The default settings in the ASCII Import Options for Worksheet dialog box are stored with the worksheet template and are modifiable.

  • To modify import settings for the active worksheet, make your changes and click Update Options.

  • To establish new default settings, you must save the active worksheet as a template. To save the worksheet as a template, select File:Save Template As.

The ASCII Import Options for Worksheet Dialog Box (see figure)

The File Structure Group

The File Header Group

The # of Columns Group

The Import Into Worksheet as Drop-down List

The Import Now Button

The Update Options button

Click the Other Options button to open the Data Import Options for Worksheet dialog box. This dialog box provides additional control for importing ASCII files.


Select the Partial Import check box to import a range of the ASCII file.

Specify the file import range by typing the desired From and To limits in the Column and Row text boxes.

Select the Replace Existing Data from Row 1 Column 1 radio button to replace the existing data in the destination worksheet.

Select the As New Columns from 1st Empty Column radio button to add the import data to the first empty column to the right in the worksheet. This column is created if necessary.

Select the Append to End of Existing Data from Column 1 radio button to append the import data to the first available row in the worksheet, starting with column 1.

Importing a Range of an ASCII File

The File:Import:Simple Single ASCII/Multiple ASCII methods are an older Origin feature. For import of ASCII, as well as binary and user-defined file types, we recommended that you use the Origin Import Wizard. The following information is provided simply for those who choose to use the older ASCII Import methods.

To import a selected range of an ASCII file:

  1. Select the Partial Import check box in the Import ASCII dialog box (File:Import:Simple Single ASCII). After selecting your file and clicking Open, Origin opens the Import Verification dialog box. Edit this dialog box to specify a range for partial import.

The Import Verification Dialog Box (see figure)

The path and file name for the data file is displayed at the top of this dialog box. In addition, the number of columns and rows in the file are displayed in the associated list boxes.

The Partial Import Group

The Import Data Group

Note: The Import Wizard also supports partial import of files. For more information, see Import Wizard.


Importing Multiple ASCII Data Files into a Single or Multiple Worksheets

  1. Select File:Import:Multiple ASCII when a worksheet is active.

or

  1. Click the Import Multiple ASCII button [image] on the Standard toolbar when a worksheet or graph window is active.

This opens the Import Multiple ASCII dialog box (see figure).

  2. Press CTRL or SHIFT + select to select your files, then click the Add Files button.

    • To import the files into separate columns of the active worksheet, select New Columns from the Import Each File As drop-down list.

    • To append each file to the previously imported file in the active worksheet, select New Rows from the Import Each File As drop-down list.

    • To import the files into separate worksheets, select New Worksheet from the Import Each File As drop-down list.

Note that if you choose New Worksheet, you can specify a separate worksheet template for each imported file.

In addition to specifying a separate worksheet template for each imported file, you can apply your Template selection to some or all of the data files in the list box.

  • To apply the selection to all data files, right-click on the template in the Template column and select Apply Template Template to All from the shortcut menu.

  • To apply the selection to selected data files, select the data files in the list box, then right-click on the template in the Template column and select Apply Template Template to Selection.

Note that you can also set the selection to the Default template from this shortcut menu. The default template is controlled by the Default Multi-ASCII Import Template selection on the Miscellaneous tab of the Options dialog box (Tools:Options).

Importing Multiple ASCII Data Files into a Single or Multiple Worksheets

The File:Import:Simple Single ASCII/Multiple ASCII methods are an older Origin feature. For import of ASCII, as well as binary and user-defined file types, we recommended that you use the Origin Import Wizard. The following information is provided simply for those who choose to use the older ASCII Import methods.

You can use the File:Import:Multiple ASCII menu command to import multiple ASCII data files into the same worksheet (as new columns), or into separate worksheets.

  • When importing into the same worksheet (as new columns), Origin uses the Import ASCII Options for Worksheet dialog box settings for the active worksheet to determine the data file structure.

  • When importing into separate worksheets, you can select the worksheet template for each data file. Thus, for each data file, Origin uses the Import ASCII Options for Worksheet dialog box settings for the selected worksheet template to determine the data file structure.

To learn about the Import ASCII Options for Worksheet dialog box, see Customizing the Default ASCII Import Settings.


Importing dBASE Files

Origin supports dBASE ll, dBASE lll, dBASE lll Plus, and dBASE lV.

To import a dBASE file into the active worksheet:

  1. Select File:Import:dBASE.


Importing DIF Files

To import a DIF file into the active worksheet:

  1. Select File:Import:DIF.


Importing Kaleidagraph Binary Data

To import Kaleidagraph binary data into the active worksheet:

  1. Select File:Import:Kaleidagraph.


Importing LabTech Files

To import LabTech binary real and binary integer formats into the active worksheet:

  1. Select File:Import:LabTech.

Note: Other LabTech formats are text-based and are imported as ASCII files.


Importing Lotus Files

Origin supports Lotus version 1.x, 2.1, 3.x, 4, and 5.

To import a Lotus file into the active worksheet:

  1. Select File:Import:Lotus.


Importing Mathematica (Vectors and Matrices)

To import Mathematica (vectors and matrices) into the active worksheet:

  1. Select File:Import:Mathematica.

Note: An "Origin Link for Mathematica" tool is also available from the File Exchange page of the OriginLab website. A summary of this tool follows:

"This link between Origin and Mathematica 4.0 combines the computational power of Mathematica with the intuitive graphing capabilities of Origin. The link provides a multi-tabbed dialog box that allows transfer of data and expressions between Mathematica and Origin. Any Mathematica expression can be entered and results viewed in a scrollable window. You can use Mathematica's kernel to transform your data and then use Origin to graph the results. The link provides a complete solution for advanced mathematical analysis and flexible, interactive graphing."


Importing MATLAB Files

To import MATLAB data variables that have been saved in a MATLAB Workspace file (*.MAT):

  1. Select File:Import:MATLAB. This opens the Open dialog.

  2. Browse to the saved file, select it, and click OK.

This opens the MATLAB Import dialog box. This dialog box is the same as that launched by the Import button on the MATLAB Console dialog box, available from the Tools menu (Tools:MATLAB Console...). However, the Import button on the Console allows import of variables from the current MATLAB workspace. The File:Import:MATLAB menu command only allows import of variables from a saved workspace file.

Click here to view a multi-media demonstration

Note1: The File:Import:MATLAB menu command does not require that you have MATLAB installed on your computer.

Note 2: Origin 7.5 supports import of numeric or character arrays and sparse arrays. It does not support import of 3D (or greater) arrays, cell arrays, structures or objects.


Importing pCLAMP Data Files

To import Axon Scope Binary Files (*.ABF) and Axon (binary) Data Files (*.DAT):

  1. Select File:Import:pCLAMP. This menu command opens the pCLAMP Import dialog box.

  2. Select one or more files for import.

  3. Click OK.

Origin opens the pCLAMP Options dialog box.

The pCLAMP Options Dialog Box (see figure)

If one file was selected from the pCLAMP Import dialog box, then that file's header is read into the pCLAMP Options dialog box. Origin displays the number of channels, number of episodes, episode size, and channel in the File/Channel Information group.

Specify importing the file in Episode or Channel mode. When importing in Episode mode, if the file contains more than one channel you can select the desired channel from the Channel spin box in the File/Channel Information group. If your file has tag information, you can display that tag information in the Results Log by selecting the Display Tag Info in Results Log check box. The Results Log will open automatically (if not already open) upon importing the file.

If more than one file was selected from the pCLAMP Import dialog box, then all controls are unavailable except the Channels and Episodes radio buttons. Select the desired radio button and click Import to import the data.


The Scale object is a movable XY scale which displays the current X and Y axis scales. This object provides an extra display of the current axis scales anywhere in the graph window. To move the Scale object, drag the object to the desired location. To modify the range of the Scale object, click Resize Scaler on the pCLAMP graph window. Select the desired Scale object range in the Set Scaler Range dialog box. Click OK to close the dialog box and display the modified object.

To customize the display of the Scale object, double-click on the object to open the Scale Object dialog box. The Scale Object dialog box provides options to customize the titles, scale, range, color, line width, ticks, gaps, and font of the Scale object.

The X Value Indicator consists of a vertical line on the graph and an X Value display object. The display object reflects the X value of the vertical line. To display the X value within the graph window, drag the line to the desired area.

To edit the display of the vertical line, double-click on the line to open the Arrow Control dialog box. Select the desired dialog box settings and click OK to close the dialog box and update the vertical line.

Plotting PCLAMP Data

A special graph template, PCLAMP.OTP, is provided for plotting your pCLAMP data.

To plot your pCLAMP data using the PCLAMP.OTP template:

  1. Select your worksheet data.

  2. From the menu, choose Plot:Template Library. This opens the Select Template dialog box.

If you have not added the PCLAMP.OTP graph template to your template library, it will not be visible.

To add PCLAMP.OTP to your template library and plot with the template, do the following; if you have already added PCLAMP.OTP to your template library, skip to step 8.

  3. In the Category group, click New.

  4. In the Add New Category dialog box, type the word pCLAMP.

  5. With the pCLAMP category highlighted, click Add in the Template group. The Open dialog box opens.

  6. Browse through the list of OTP files in your Origin folder and select PCLAMP.OTP.

  7. Click Open.

  8. With the PCLAMP template highlighted, click Plot.

Your pCLAMP data is plotted to PCLAMP.OTP. A Reminder Message may tell you that your graph is displayed in Speed Mode.

The pCLAMP graph window includes two tools to aid in examining regions of your data: the Scale object and the X Value Indicator object.


Adding a Scale Object to Your Graph

Type the desired X and Y axis title in the X Title and Y Title text boxes.

Control the display position of the object's X and Y axis titles by selecting the desired radio button in this group.

Control the position of the object's X (or Y) axis by selecting the desired radio button in this group. To disable the X (or Y) axis display, select Off.

Control the object's X (or Y) range by typing the desired value in this text box.

Select the desired object color from this drop-down list.

Select the desired line width for the display of the object's axis from this drop-down list.

Control the display of major and minor X (or Y) axis ticks in this group. Set the total number of major ticks in the Number text box.

Set the distance between the edge of the page and the object's X axis in the X to Edge text box. Set the distance between the object's X axis title and the X axis in the X to Axis text box.

Set the distance between the edge of the page and the object's Y axis in the Y to Edge text box. Set the distance between the object's Y axis title and the Y axis in the Y to Axis text box.

Select the Dialog radio button to display the object's axis title using a font which can be adjusted to incremental sizes. This selection is preferred when displaying a small font size. Select the Scalable radio button to display the object's axis title using a font which can be adjusted to any size. This selection is preferred when displaying a larger font size.

Select the desired font size from the Points text box. To bold the axis titles, select the Bold check box.

Adding a Scale Object to Your Graph

The scale object is intended for use with the pCLAMP plotting template (PCLAMP.OTP). The scale object aids in display and analysis of the pulse waveforms common to electrophysiology work.

To add an XY scale object to your graph:

  1. Click the Add XY Scale button [image] on the Graph toolbar to add a movable XY Scale to your graph.

Once added, you can move the object anywhere on the graph.

By default, the XY Scale displays the scale of the current X and Y axes' major tick scales. You can customize the object's X and Y scale range by double-clicking on the object to open the Scale Object dialog box. This dialog box also provides controls for adding titles and ticks to the XY Scale object.

Note: After making changes to the XY Scale object dialog box and clicking OK, you may need to select Window:Refresh to view the changes to the XY Scale object.

The Scale Object Dialog Box (see figure)

The Axis Titles Group

The X (and Y) Scale Group

The X (and Y) Range Text Box

The Color Drop-Down List

The Line Width Drop-Down List

The X (and Y) Ticks Group

The Gaps Group

The Font Group


  1. Select File:Import:Minitab.

  1. Select your file(s) in Windows Explorer.

  2. Drag the file(s) to the Origin taskbar button and hold there until the Origin workspace is restored.

  3. Drop the files onto the Origin workspace.

Minitab data files are always imported into a new worksheet, regardless of where you drop them in the workspace.

Importing Minitab Data

To import a Minitab worksheet or project using a menu command:

To import a Minitab worksheet or project by drag-and-drop:


  1. Select File:Import:SigmaPlot.

  1. Select your file(s) in Windows Explorer.

  2. Drag the file(s) to the Origin taskbar button and hold there until the Origin workspace is restored.

  3. Drop the files onto the Origin workspace.

SigmaPlot data files are always imported into a new worksheet, regardless of where you drop them in the workspace.

Importing SigmaPlot Files

Origin will import these SigmaPlot files:

  • SP5, SigmaPlot for DOS.

  • SPW, SigmaPlot for Windows (v.1 and 2).

  • JNB, SigmaPlot for Windows (v.3, 2000, and 2001).

To import a SigmaPlot file into the active worksheet using a menu command:

To import a SigmaPlot file by drag-and-drop:


Importing Sound Files

To import a Sound (WAV) file into the active worksheet:

  1. Select File:Import:Sound.


  1. Select File:Import:Thermo Galactic (SPC).

  1. Select your file(s) in Windows Explorer.

  2. Drag the file(s) to the Origin taskbar button and hold there until the Origin workspace is restored.

  3. Drop the files onto the Origin workspace.

SPC files dropped into a worksheet are imported into that worksheet. Files dropped into an empty portion of the workspace are imported into a new worksheet.

Importing Thermo Galactic SPC Data Files

To import Thermo Galactic SPC data files from the Origin menu:

To import Thermo Galactic SPC data files by drag-and-drop:

Origin supports both single and multiple data arrays.

  • If the data file contains an array of X values, then Origin assigns those values to an X column.

  • If the initial X value and the increment are stored in the header, then Origin creates a hidden X column with the correct starting value and increment.

To view or edit the starting value and increment in Origin, do one of the following:

    • Double-click on the page symbol [image] located in the upper-left corner of the column heading. This opens the Column Additional Information dialog box. You can modify the EvenX Initial Value and EvenX Increment in the associated text boxes.

    • Click on the worksheet column heading to select the column, then select Format:Set Worksheet X. This menu command also opens a dialog box for modifying the starting X value and increment.


Origin's Drag-and-Drop Data File Support for Worksheets

Origin's Drag-and-Drop file import routines are handled by one of two methods:

  • The older method involves calling a LabTalk section in a file called DOFILE.OGS (see A Note on Adding Drag-and-Drop Support for New File Types, below). This user-modifiable file is installed as part of your Origin software. This file has been used by Origin to import SigmaPlot, Minitab, and Thermo Galactic SPC data files and you may have modified this file yourself, adding your own LabTalk script to handle drag-and-drop import of unrecognized (by Origin) data files.

  • The newer method relies on user-created Origin Import Filter (OIF) files, created using the Origin Import Wizard.

When ASCII, binary, or user-defined file types are dropped into the Origin workspace, Origin first looks for data handling instructions in DOFILE.OGS. If they are not found there, Origin looks for an appropriate OIF file. If no OIF file exists, the Import Wizard is opened.

If Origin does find that an appropriate OIF exists for handling the "dropped" file, it will import the file automatically (without opening the Import Wizard) into the OIF Target Window.

  • If the file is dropped onto an active Target Window, data are imported into the Target Window regardless of whether a custom Target Window Template was specified in the OIF.

  • If the file is dropped onto an empty portion of the workspace or onto a window type that is not the Target Window type, data are imported into the Target Window Template (which is the default Origin worksheet template unless otherwise specified).

  • If multiple files are dropped onto an active Target Window, the first file is imported into the active Target Window. Remaining files will go into the same window if the Import Mode is Start New Rows or Start New Columns, or into a new window created from the Target Window Template if Import Mode is set to Replace Existing Data (see Note below).

  • If multiple files are dropped onto an empty portion of the workspace or onto a window type that is not the Target Window type, data are imported into one or more windows (depending on the Import Mode setting) created from the Target Window Template.

As a rule, any time a Target Window needs to be created, Origin does so using the Target Window Template.

Note: If you drop a file onto an active Target Window, existing data in that window will be overwritten if the OIF Import Mode is set to Replace Existing Data. If you do not want existing data to be overwritten, then do not drop onto a Target Window; instead drop the file(s) onto an empty portion of the workspace.

This method requires that you supply the import code in the form of an Origin C function.

Your Origin C function should have the following prototype:

int YourFunctionName(Page& pgTarget, TreeNode& trFilter, LPCSTR lpcszFile, int nFile)

where:

pgTarget: A reference to a Page object of type worksheet or Matrix. This would be what you defined in your filter or on the 1st page of the wizard, as the target window.

Note1: The target window and template specification on Page 1 is only used when creating new windows (as would be the case when you use File:Open or under some conditions during drag-and-drop importing). When choosing File:Import, if your active window is of the same type as your target window specification, no new window is created and a reference to the page object for the active window is passed to your function. If the active window is of a different type, a new window is created using the specified template, and the page reference to this new window is passed.

trFilter: A reference to a TreeNode object that holds all the filter settings from your filter file, or from your wizard specifications, in a tree structure.

lpcsFile: The full path and name of the file that is being imported.

nFile: The file index number in an ordered sequence of imported files (e.g. If you drag-and-drop n files, or try to Open/Import n files, your function gets called n times, and nFile is the file count for the file being processed.

Note2: For an example that illustrates writing a custom function, refer to the OC file \OriginC\OriginLab\EarthProbe.c. This file is used by Origin for importing Earth Probe data.

When any file is dropped onto Origin from Windows Explorer, Origin looks to the DOFILE.OGS script file located in your Origin folder. It then looks for a section named [OnOpenExtension], where Extension is the file extension of the dropped file. If found, that section is executed and the file name is passed as an argument.

To learn more about this method, review the AUTOMATION.OPJ sample project located in your Origin \SAMPLES\PROGRAMMING\AUTOMATION subfolder.

Note: Because Origin looks to DOFILE.OGS before looking to see whether there is an Import Wizard filter (*.OIF) file for the dropped file type, you must remove any previously added file import code from DOFILE.OGS if you plan to use an .OIF file to import your user-defined files.

Origin's Drag-and-Drop Data File Support for Worksheets

Origin supports drag-and-drop import of ASCII, simple binary, SigmaPlot, Minitab, Thermo Galactic SPC, and user-defined file types.

To drag and drop files onto Origin:

  1. Select your file(s) in Windows Explorer.

  2. Drag the file(s) to the Origin taskbar button and hold there until the Origin workspace is restored.

  3. Drop the files onto the Origin workspace.

    • For ASCII, binary, and user-defined file types not handled by DOFILE.OGS, drag-and-drop behavior is dependent upon (a) where the file was dropped and (b) your import filter (OIF) file settings.

    • Thermo Galactic SPC files dropped into a worksheet are imported into that worksheet. Files dropped into an empty portion of the workspace are imported into a new worksheet.

    • SigmaPlot and Minitab data files are always imported into a new worksheet, regardless of where you drop them.

A Note on Adding Drag-and-Drop Support for New File Types

Origin provides two mechanisms by which you can add drag-and-drop support for user-defined file types:

  • Create a filter using the Import Wizard.

  • Add a section to the DOFILE.OGS script file.


Import Wizard

Use the wizard to specify how data is imported when:

  • Opening data files using the File:Open dialog.

  • Importing data files using the File:Import menu.

  • Dragging-and-dropping data files into the Origin workspace.

For the ASCII and binary file types, the wizard leads you through a series of pages on which you select your import options. Origin then uses these options to read your file and subsequently imported files that share the same structure.

For importing of user-defined file types, you supply the import code in the form of an Origin C function.

The Import Wizard supports file import to these Origin child windows:

File Type | Possible Target Window(s) | Paste Clipboard Data?
ASCII | worksheet | Y
Simple binary | worksheet | N
User-defined | worksheet or matrix | Y

Some Wizard options are Target Window sensitive; the option will not be seen if it is not applicable to a the Target Window. Further, you can specify different treatments for files that are dragged-and-dropped onto worksheets, dragged and dropped onto graphs, etc.

All wizard settings can be saved to filters for later use. These filters can be saved in two ways:

  • They can be saved as .OIF (Origin Import Filter) files in the Microsoft XML format.

  • They can be stored in the Target Window template.

When saving as an .OIF file, you can save the filter to the same folder as the data file, or you can save the filter to a general Filters folder in the User Files area. You can define wild cards for each filter file, allowing you to specify that a filter apply to multiple file types.

When you import by drag-and-drop, Origin looks for an appropriate filter for the files being dropped. Origin searches the subfolder containing the data files first, then searches the general Filters folder. If multiple applicable filter files are found, a dialog opens listing all filters in the folder, and the user selects a filter from the list.

The wizard supports multiple file import. In such cases, it is assumed that all files are of the same file type and format. The first-imported file determines which custom settings or filter will be used to import the remaining files. Each file will be imported into separate target windows. If so specified, the data are simultaneously plotted.

The Import Wizard

The Import Wizard provides control over import of ASCII, simple binary (header followed by simple binary structure), and user-defined file types. The wizard can be used to create custom settings for each file type. Wizard settings can be saved as filters for later use with the same or similar files.

Overview of features

Applicable Data Import Methods

Target Page Sensitivity

Saving Your Import Filters

Support for multi-file Import

Click here to view a multi-media demonstration


Page 1, Data Source

Select one of the following:

  • ASCII.

  • Binary.

  • User Defined. User Defined files require that you supply Origin C code for performing the data import.

To import data from an ASCII, Binary, or User Defined file type, select the File radio button. Enter the file name of (or use the browse button [image] to locate) the data file.

  • Check Rename Worksheet to File Name to rename the worksheet with the file name.

  • Check Worksheet Label to File Name to label the worksheet with the file name.

To import ASCII or User-Defined (not Binary) data from the Clipboard, select the Clipboard radio button.

Note: There are some restrictions on the naming of Origin worksheets. Illegal characters will result in truncation or modification of file names when naming worksheets. Be sure to read this note on permissible worksheet names and labels.

Specify a Target Window -- either Worksheet or Matrix -- for the data import.

Name the Template to be used in creating new (supplemental) target windows. New target windows are required for:

  • drag-and-drop operations.

  • when using the File:Open menu command to open data files.

  • when using the Wizard to import multiple files.

If no template is specified, the Origin default worksheet or matrix template is used.

If a filter exists for the named file type and the filter has a template specification, then the new window is created using the template specified in the Import Filters for Current Data Type drop-down list (see next).

If this checkbox is cleared, all filters that are applicable to Data Type are displayed in the Filters drop-down list.

If this checkbox is selected, the Filters drop-down list will display only those filters that also match the name of the file being imported (wild card specification inside the filter should match the file name).

The Import Filters for Current Data Type drop-down list shows all the filter (.OIF) files that are in:

  • the same subfolder as the data file. These filter names are prefixed with the “Data Folder:” tag.

  • the \Filters subfolder of the User Files path. These names are prefixed with the “User Files Folder:” tag.

  • the \Filters subfolder under the Origin installation directory. These names are prefixed with the “Origin Folder:” tag.

Page 1, Data Source

Use the controls on this page to specify a file name, data type, target template and import filter. This page is common to ASCII, binary and user-defined file types. Note that the availability of some controls is dependent upon other settings made on this page. Therefore, it is advised that you proceed systematically through this dialog box, from top to bottom.

Dialog Box Controls (see figure)

Data Type Group

Data Source Group

Target Window Group

List Filters Applicable to Both Data Type and File Name Check Box

Import Filters for Current Data Type Drop-down List

Note: The information provided on this page may be sufficient to complete your data import (in which case, you would click the Finish button when you have selected your page options). If you wish to (a) further customize the import options, (b) define and save a new import filter file, or (c) edit the settings in the chosen filter file, click Next.

For an overview of Import Wizard features see The Import Wizard.

To proceed to the next page (topic) in the Import Wizard dialog box, select one of these links:

  • Page 2, (ASCII) Header Lines

  • Page 2, (Binary) Header Bytes

  • Page 2, (User Defined) User Defined Filters


Page 2, (ASCII) Header Lines

Origin tries to determine the number of header lines in your file and it pre-fills this box. If the number is not correct (as indicated in the preview window at the bottom of the page), you can:

  • Type in the correct number.

  • Pick the number from the drop-down list (list is limited to 0 - 10).

  • Specify this number graphically.

To specify graphically:

  1. Point to the preview window and click on the last header line of your file.

  2. Click the Refresh button [image] to the right of the Number of Header Lines box.

The designated header lines appear in blue in the header window.

Origin looks for a line that appears to contain column names and identifies the column in the associated box (requires consistent use of a tab or comma delimiter). You can overwrite values by:

  • Typing a new row number.

  • Selecting a number from the drop-down list.

  • Graphically specifying the row number.

To specify graphically:

  1. Place your cursor anywhere on the specific line in the preview.

  2. Click the Refresh button [image] to the right of the control.

The designated column name line appears in red in the preview window.

Origin tries to determine which line(s) to use for column labels. Typically, this includes all lines starting with (and including) the line used for the column name and ends with the last header line before the first data line.

You can overwrite values by:

  • Typing a new row number.

  • Selecting a number from the drop-down list.

  • Graphically specifying the row number.

To specify graphically:

  1. Select one or more lines in the preview window and click the Refresh button [image] to the right of the control.

  2. The column name line is colored green in the preview window.

These controls specify which header lines should be saved to the worksheet storage object. The default is All header lines. Edit the From and To values by typing or selecting from the associated drop-down lists.

The saved lines can be retrieved later, from the information stored with the page.

If this check-box is selected, a separate page becomes available upon clicking Next. On this page you can specify that variables be extracted from the header lines of your data file.

Page 2, (ASCII) Header Lines

Dialog Box Controls (see figure)

The Number of Header Lines Combo Box:

The Column Names From Line List Box:

The Column Label Lines From and To List Boxes:

The Save Header Lines: From and To: List Boxes:

The Define Header Variables Check Box

For an overview of Import Wizard features see The Import Wizard.

To proceed to the next page (topic) of the Import Wizard dialog box, click here.


Page 2, (Binary) Header Bytes

This check box sets the byte order of the import data. The default is Little-Endian.

The "Little-Endian" terminology refers to a data storage method in which the least significant byte appears first in the number. This format is commonly used by Intel-compatible CPUs; also known as "reverse byte ordering" (Microsoft Computer Dictionary. 1999. Microsoft Press).

Specify the number of bytes in the binary file header section by typing in a number or select the header section graphically. To select graphically:

  1. Place the cursor at the desired location in either the left window (displays the header in byte form), or the right pane (displays the header in ASCII form).

  2. Click the refresh button [image] to the right of the text box.

In subsequent pages, the header is excluded from the data file display and the binary data import will ignore these header bytes.

Select this box to define and extract variables from the header section of the file. Selecting the box enables other page controls used in defining of variables.

Enter a variable's byte offset (in the header section) in this text box. The hex and ASCII data file displays update to reflect the offset.

You can graphically specify the byte offset by clicking in the hex or ASCII data file views. The text box is updated with the byte offset value.

Once you specify the byte offset:

  1. Highlight the bytes in the display that correspond to your variable.

  2. Select a variable type from the Type list. The value of the variable is displayed in the non-editable Value view box, below.

  3. Click Add to add a variable to the list of variables (the list box to the lower-right) to be stored in the target page.

  4. To remove a variable, select the variable in the box to the right and click Remove.

Variable definitions can be saved to a filter file for future use with the same or similar files. Variable values are placed into the page's information storage object on import, and can be retrieved for later use. After import, variable values can be viewed in the script window by making the target page active and typing the command:

Page.info.=

Variable values can be inserted as strings into text labels using the Insert Info Variables dialog box. The variable values can also be used in LabTalk and Origin C code.

Page 2, (Binary) Header Bytes

Use this page to define the binary file header and to extract variables from the header for later use.

Dialog Box Controls (see figure)

Use Big-Endian Format Check Box:

The Header Length in Bytes Text Box:

The Define Header Variables Check Box:

The Byte Offset Text Box:

The Parameter Definitions Group

For an overview of Import Wizard features see The Import Wizard.

To proceed to the next page (topic) of the Import Wizard dialog box, click here.


Page 2, (User Defined) User Defined Filters

Enter the path to the Origin C file.

The default path for the Origin C file is assumed to be under the \OriginC subfolder of your Origin installation folder. For example

You could specify an absolute path (such as d:\myfiles\myfunction). However, this is not recommended in cases where you intend to share your custom function and import filter with others.

, if your file is called MyFunction.c and it is located in a subfolder called MyFiles under the Origin C subfolder, you should enter MyFiles\MyFunction.c in the text box.

Name the function (in the previously named Origin C Source File) to be used in processing/importing your data to the target window.

Your custom Origin C function should have the following prototype:

int YourFunctionName(Page& pgTarget, TreeNode& trFilter, LPCSTR lpcszFile, int nFile)

where:

pgTarget: A reference to a Page object of type worksheet or Matrix. This would be what you defined in your filter or on the 1st page of the wizard, as the target window.

Note1: The target window and template specification on Page 1 is only used when creating new windows (as would be the case when you use File:Open or drag-and-drop importing). When choosing File:Import, if your active window is of the same type as your target window specification, no new window is created and a reference to the page object for the active window is passed to your function. If the active window is of a different type, a new window is created using the specified template, and the page reference to this new window is passed.

trFilter: A reference to a TreeNode object that holds all the filter settings from your filter file, or from your wizard specifications, in a tree structure.

lpcsFile: The full path and name of the file that is being imported.

nFile: The file index number in an ordered sequence of imported files (e.g. If you drag-and-drop n files, or try to Open/Import n files, your function gets called n times, and nFile is the file count for the file being processed.

Note2: For an example that illustrates writing a custom function, refer to the OC file \OriginC\OriginLab\EarthProbe.c. This file is used by Origin for importing Earth Probe data.

Page 2, (User Defined) User Defined Filters

Use this page to specify your custom Origin C file, and the name of the function within your Origin C file, which will be used during data import.

Dialog Box Controls ( see figure)

The Origin C Source File Text Box

The Origin C Function Name Text Box

To save a filter (remembers your C file location and function name, as well as other settings), see Page 7, Save Filters.

To specify file handling (including drag-and-drop) behaviors, see Page 8, Advanced Options.

Programming Notes:

For an overview of Import Wizard features see The Import Wizard.


Page 3, (ASCII) Header Variables

Select the range of lines in the header that should be scanned for variables.

Enter values by:

  • Typing a new row number.

  • Selecting a number from the drop-down list.

  • Graphically specifying row numbers.

To specify graphically:

  1. Select one or more lines in the preview window and click the Refresh button [image] to the right of the control.

Specify the Names and Values separator in the header lines.

The drop-down lists standard separators such as tab, comma, colon, etc. To use a custom separator, pick Other from the drop-down list and specify your custom character in the adjacent text box.

Scan the specified lines of the header using the specified separator. The results from the scan are entered in the Name/Value list.

The scan is performed twice. On the first pass, a search is done for the separator on each line of the header. If the separator is found in a line, all characters to the left of the first occurrence of the separator are assigned to the variable name, and all characters to the right of the first occurrence of the separator are assigned to the value of that variable. Thus, a header line such as:

Acquisition Date: 10th July 2003

will result in a variable named Acquisition Date and a value for that variable equal to 10th July 2003.

The header lines are then scanned a second time. In this second scan, the lines are searched for the separator, and each token found in the line is treated as a separate variable. The variables are then named by the line number and the token position in which they were found. Thus, for the above example, two variables will be found, having these names and values :

L1V1 Acquisition Date

L1V2 10th July 2003

This scan method allows users to extract variables from header lines which are of the form:

Acquisition Date: 10th July 2003

but also from header lines such as:

10, 20, 100, 40, 5

In the latter case, the second scan will extract 5 variables from this line, thus retrieving all values (assuming comma is used as the separator). Note that the dual scan process can result in unwanted or unnecessary variables in the list.

Page 3, (ASCII) Header Variables

This page is available only if Define Header Variables is selected on the Header Lines page, and there are one or more header lines in your data file. Use this page to specify extraction of variable values -- parameters, date info, etc. -- that may be contained in your file header. The top part of this page gives a preview of the header lines.

The variables generated by the Scan are stored in the information storage object of the destination page. These variables are easily inserted into text labels using the Insert Info Variables shortcut menu command.

Variables can be viewed from the Script window by typing the command:

Page.info.user.=

The information storage object of the page also stores information such as name of the imported file, the file path, the filter name (if used), etc.

These are stored under the Page.info.system node of the storage object and are also visible in the Insert Info Variables dialog box.

See Inserting Variables Extracted from Imported ASCII Files into Text Labels for more information.

Dialog Box Controls (see figure)

Scan Lines (From) and To Combo Boxes

The Delimiter Drop-Down List

The Scan Button

Scan Procedure Notes:

For an overview of Import Wizard features see The Import Wizard.

To proceed to the next page (topic) in the Import Wizard dialog box, click here.

Click here to view a multi-media demonstration


Page 3, (Binary) Data Pattern

Use this list control to define the structure of the datum in a single record of your binary file.

  1. Click to the right side of the Type column heading. A drop-down arrow appears.

  2. Select a data type from the drop-down list (choices are Integer, Unsigned Integer, Real, and String).

Once a data type is chosen, the Size column is automatically filled with typical size for that type (except for string, in which case it is left blank). The Size column text is editable. For instance,

Use the Count column to specify the number of times data columns of this variable type are repeated in the record.

Rows are automatically added as you define your data structure. Insert or Delete rows by clicking the buttons located below this list control.

the default length for int is 4, but you can replace this with 2 if you want a short int. For strings, you should specify the length in characters.

This panel (viewable as ASCII or Hex) displays the data, starting from the 1st byte after the header section. Any time a datum is defined, the bytes/characters corresponding to this definition are marked in blue, allowing you to monitor your progress in defining the structure for your record.

When a (row of) structure definition is complete, the bottom panel displays the imported data as it will look in the resulting worksheet, based on the structure of the record specified thus far. Note that you can right-click on the column headers in the bottom panel to set the Plot Designation and Format for the columns in the target worksheet.

Page 3, (Binary) Data Pattern

On this page, you define the structure of your binary file by specifying the order, type, and datum per record.

Dialog Box Controls (see figure)

The Pattern Group

The Data Display

For an overview of Import Wizard features see The Import Wizard.

To proceed to the next page (topic) in the Import Wizard dialog box, click here.


Page 4, Data Columns

The Delimiter Radio Button/Drop Down List/Text Box

The Fixed Radio Button and Text Box

Origin scans the data file to determine the delimiter for the data in the file. This control is then pre-filled with the delimiter that was found.

Select a different delimiter from the adjacent drop-down list.

To specify a custom delimiter, choose Other, then enter the delimiting character in the adjacent text box. The display in the lower half of this page updates on changing the delimiter. This part of the page displays the data as it would be imported into various columns of the worksheet.

Select this radio button for files that have fixed width settings (the column is n characters wide, and n can vary by column). If you know the column widths, you can enter them in the adjacent text box as a comma separated list (for example). If there are more columns in the file than you have listed column widths for, the specified pattern is repeated for the remaining columns.

When Fixed is selected, the Column Width Preview check box becomes available. See below for information on this control.

, if your file has three columns of width 10, 5 and 7, you would enter “10,5,7” in the edit box and then click the Refresh button to see the result below.

Specify the number of columns to be created in the target worksheet (for the imported data).

  • If Delimiter was chosen, Number of Columns is pre-filled with the value that Origin determines, using the delimiter specification.

  • If Fixed Width is chosen, Number of Columns is calculated using the fixed width string.

You can override this value by entering a value and clicking Apply. If the value entered is greater than the number of columns in the fixed width string, the last width specified in the string is repeated. The bottom display panel is updated to display the entered (overriding) value when you click Apply.

Remove leading zeros from imported data (e.g. 0050 becomes 50).

This option becomes available when Column Separator is set to Fixed. Use these controls to specify the column width pattern in a fixed width (non-delimited) data file.

When selected, the display changes to the Column Width Preview mode. In this mode, the columns in the display can be dragged to adjust column width.

Columns can be added or deleted using the Add Column and Delete Column buttons adjacent to this control.

As you drag and changes individual column widths, the text box next to the Fixed radio control updates and shows the column widths as a comma separated list. Once the column widths are set, clear this checkbox to view the data columns as they will appear in the target worksheet.

This control can be used to set plot designations for all data columns. Make a selection from the drop-down list, then click the Apply button to apply the selected pattern to the columns in the data file. For example, if you choose XYXY, the plot designations of the columns will be set to the repeating pattern of “XYXYXY…”.

Note that you can also set column format and column plot designations for individual columns by right-clicking on a column heading and choosing Set Format or Set Designation from the context menu. The Format and Plot Designation settings will be applied to the target worksheet columns on data import.

Page 4, Data Columns

Use this page to specify the data delimiter and other settings such as column designations.

Dialog Box Controls (see figure)

The Column Separator Group

The Number of Columns Text Box and Apply Button

The Remove Leading Zeros from Numbers Check Box

The Column Width Preview Window

The Column Designations Drop-Down List

For an overview of Import Wizard features see The Import Wizard.

To proceed to the next page (topic) in the Import Wizard dialog box, click here.


Page 5, Data Selection

Select this check box to enable the From and To Column and From and To Row ranges, for partial import. The default From and To settings are 1 and 0, respectively (which will result in all columns and rows being imported).

If non-numeric data is interspersed with numeric data, you can use this control to decide what action should be taken when non-numeric data are encountered (typically, such non-numeric data is used to identify and separate various datasets in a file).

This drop-down has four options:

  • Terminate Import. Import will be terminated when the first non-numeric data item is found within the data.

  • Read as Text. Non-numeric data will be read in as text. If the column Format is set to Text & Numeric, the text will be visible in the resulting worksheet page.

If the column Format is set to Numeric, the text will display as missing values.

  • Start New worksheet. A new worksheet is started if non-numeric data are encountered.

  • Start new Column. A new column is started in the same worksheet.

Determines how the imported data will be treated in the destination worksheet:

  • Replace Existing Data. Imported data replace existing data in the worksheet. This is the default behavior.

  • Start New Columns. New columns are added, as needed, to the existing worksheet

  • Start New Rows. New rows are appended, as needed, to the existing worksheet

Note that use of this setting results in the column Plot Designation and Format settings of the target worksheet to be changed to the settings assigned to columns in the wizard.

Note: Start New Columns and Start New Rows are not available when the Non-numeric Data in Numeric Field... control is set to Start New Worksheet or Start New Columns.

These settings control the which data lines to import.

The default Skip Data Rows = 0. Skip rows must be an integer value greater than or equal to 0.

Read Rows must be an integer value greater than or equal to 1.

  • If Skip Data Rows = 0, no rows are skipped on import. Read Rows is ignored.

  • If Skip Data Rows > 0, then import Read Rows and skip Skip Data Rows. This is repeated until the end of file or Partial Import range settings are satisfied.

Page 5, Data Selection

Use this page to specify a partial file import, and other data handling instructions.

Dialog Box Controls (see figure)

The Partial Import Check Boxes and From and To Column and From and To Row Text Boxes.

The Non-Numeric Data in a Numeric Field Drop-Down List

The Import Mode Drop-Down List

The Skip Data and Read Rows Text Boxes

For an overview of Import Wizard features see The Import Wizard.

To proceed to the next page (topic) in the Import Wizard dialog box, click here.


Page 6, Plotting

Choose from line, scatter, column, or bar.

This non-editable text box displays the column type designations (e.g. XYYYY), set in the previous Wizard pages.

  • File Name: Name of the import file. If multiple files were selected, all files are listed.

  • Layer#: This drop-down list shows all the layers available in the graph. Use this to control the graph layer to which each file is imported. All data sets (columns) in the file are plotted in the specified layer. Note that this setting is not saved with the OIF file.

To activate the Layer# drop-down list:

  • Size: Size of the imported file.

  • Modified Date: Date of last file modification.

Note: This list can be sorted on any column, providing you control over the order of file import and plotting.

  1. Point to the right edge of the (Layer) n list member.

  2. Click once; a drop-down arrow appears.

  3. Click on the drop-down arrow to see a list of the active graph window's layers. Choose the target layer.

Page 6, Plotting

This page is visible only when a graph page was active when the import wizard was initiated. Imported data are placed into a new worksheet, and the data are simultaneously plotted as per the specifications on this page.

Dialog Box Controls (see figure)

The Plot Type Drop-Down List:

The Plot Designations View Box:

The List Control:

Note: The settings on this page are NOT saved with the Import Filter (OIF) file.

For an overview of Import Wizard features see The Import Wizard.

To proceed to the next page (topic) in the Import Wizard dialog box, click here.


Page 7, Save Filters

Select this box to save Wizard settings to a filter file.

  • In the Data File Folder: When selected, the filter file is saved in the same folder where the imported data file is saved.

Use this option if you keep similar data files in your folders; you can define a filter that can apply to all files in your folder. When the wizard is used to import the same file or similar files from the same subfolder, the wizard will give preferentially choose matching filter files in the data folder.

Additionally, during drag-and-drop importing Origin will automatically use suitable filters found in the same folder as the data file. If the data folder has multiple filters that are suitable for the file being dropped, Origin will prompt you for the preferred filter file.

  • In the User Files Folder: If selected, the filter file is saved to the \Filters subfolder in the User Files area. The File Types drop-down in the File:Open dialog will list the filter by name, along with the chosen wild card specification. This option provides the user with a way to add custom file types to the File:Open dialog.

  • In the Worksheet: If selected, the filter is saved to the worksheet. You then save the worksheet as a template (*.OTW) and the filter information becomes part of the template. If the worksheet has a filter saved in it, when the import wizard is invoked with such a worksheet active, the Filter drop-down on the first page will list the option “<User filter in active window>”.

Name the filter file (the .OIF extension is automatically appended).

This control is not available when the In the Worksheet option is chosen. In the other two cases (where the filter is saved to a disk file), the filter files are saved with an OIF (Origin Import Filter) extension, in the XML format. The files are editable with a text editor such as Notepad and can be viewed with any application that supports the XML format (such as Internet Explorer).

Use this box to specify wildcards for data files to which the saved filter should be applied.

Examples:

  • Specify a wildcard such as *.txt, in which case any file of extension .txt will be associated with this filter.

  • Specify wildcards such as Experiment*.t*, in which case files with such names as Experiment1.txt, Experiment2.txt, etc., would be associated with this filter.

  • Specify multiple wildcards using a semicolon separator: *.txt;*.dat;mydata*.*, etc. When you choose to import a file using the Wizard (by any method including drag and drop), wildcards in all filters saved to the various locations are scanned to find those filters that match the name of the import file.

If selected, the Next button (at the bottom of the page) is enabled and another Wizard page is added in which you specify advanced filter options, such as a script to be executed at the end of the import process, etc.

If left cleared, the Next button is disabled. You then click Finish to complete data import.

Page 7, Save Filters

Import Wizard settings can be saved to a filter file for future use with the same file or with files of the same type. Use this page to save a filter, if so desired. The filter file can be saved to multiple locations. You can specify wild cards for data file names.

Dialog Box Controls (see figure)

The Save Filter Check Box

The Filter Name Text Box

The Specify Wildcards... Text Box

The Specify Advanced Filter Options Check Box

For an overview of Import Wizard features see The Import Wizard.

To proceed to the next page (topic) in the Import Wizard dialog box, click here.

Click here to view a multi-media demonstration


Page 8, Advanced Options

  • Do Not Plot in Graph; Open Files in Worksheet/Matrix (default): The data are imported into a worksheet or matrix (whichever is specified on the Wizard's Data Source page). No plot is made.

  • Plot Data into Graph Layer into which Files are Dropped: All imported data columns are plotted to the layer onto which files were dropped (see, The Layer).

  • Plot Data in Graph Using Layers Specified on Plotting Page: This option is available only when the active window is a graph window. This uses the specifications of the optional Plotting page. Note that the settings on the Plotting page are not saved with the OIF file.

  • Open Files in Worksheet/Matrix (no plots are made).

  • Plot Data in Graph with All Files in One Layer.

  • Plot Data in Multi-panel Graph with Each File in One Panel.

  • Plot Data in Multiple Graph Windows with Each File in One Graph.

Type or copy LabTalk code to be executed at the end of the import process, in this text box. The code is saved with the filter, and will execute any time the filter is used.

Page 8, Advanced Options

This page is only visible when you select the Specify Advanced Filter Options check box on the Save Filters page of the Import Wizard.

Use this page to:

  • Specify the action Origin should take when you are importing file by drag-and-drop.

  • Specify LabTalk script that should be run at the end of the import process.

The first three view boxes on this page preset and non-editable. Settings in the next two drop-down lists determine what action to take when files are dropped onto a graph or onto the Origin workspace (outside of any window).

Dialog Box Controls (see figure)

The Drag and Drop Files in Graph Drop Down List

The Drag and Drop files in Workspace Drop Down List

The LabTalk Code Window:

For an overview of Import Wizard features see The Import Wizard.


Importing Data from a Database Using ODBC

Origin's ODBC (Open Data Base Connectivity) allows you to import data from a data source directly into an Origin worksheet.

ODBC Terminology

Origin's ODBC Feature

Importing a Data Source Table into Origin

Maintaining the ODBC

Click here to view a multi-media demonstration


ODBC Terminology

Database: The term database refers to a 'DataBase Management System' (DBMS) such as Microsoft Access. A DBMS provides an efficient way to store and access data.

Data source: The term data source refers to a particular set of data stored and managed by a particular DBMS. For example, you might have one data source named Exp1 saved in the Microsoft Access database, and another data source named Proj1 stored in yet another database.

Tables and Views: A data source consists of tables of data. These tables can be joined using SQL commands to form views. Views are virtual tables that don't take up additional space beyond their component tables and the SQL command that joins them together. For example, a table consisting of names and zip codes can be joined to a table consisting of zip codes and city/state information to form a 'view' of name, city, state, and zip code.

SQL: SQL stands for Structured Query Language. SQL is a standardized language that has evolved for accessing data from a variety of databases. SQL can be used to select particular data from your data source. The result of an SQL 'query' can be saved as a view, or read into another application for examination.

ODBC: ODBC stands for Open Data Base Connectivity. ODBC is a library of functions that provides a common interface for a variety of database systems.

ODBC Driver: Database manufacturers create ODBC drivers that interpret the common ODBC interface functions into a form understandable to their particular database system. In this way, an application such as Origin can use a single common ODBC interface to access a variety of databases, provided they have an ODBC driver.


Origin's ODBC Feature

Origin's ODBC feature allows you to select a data source from any database for which an ODBC driver is installed, including Microsoft Access and Excel, dBASE, FoxPro, and Paradox. Once you have selected your database, you can then select a table or a view from the desired data source. Select all or part of the data source table or view for import into your Origin worksheet.

Origin also provides a DLL (Dynamic Link Library of functions) that can be used to form an ODBC command object. The properties and methods of this command object connect Origin to Microsoft's ODBC interface. This interface is a library of functions that allows you to specify a data source, execute SQL (Structured Query Language) queries and retrieve data. An ODBC database driver interprets and implements the ODBC interface function calls for its associated database, taking care of the particulars of that database. Origin can thus access a data source from any database for which there is an ODBC driver.


Importing a Data Source Table into Origin

Edit this tab to add or delete data sources, and to select data sources and tables and views.

The Data Source list displays any data source that you currently have access to. These names are user-defined and are not necessarily the same as the file name containing the data source.

The Table/View List displays the tables/views associated with the selected data source.

The Add Source button connects you to Microsoft's ODBC Data Source Administrator dialog box, which allows you to add a new data source, find the full path name of any data source already listed, delete an existing data source, and add or delete a database driver. Consult the dialog box's Help file for further instructions.

Select this tab to import all or part of the chosen data table or view (selected from the Data Base tab) into an Origin worksheet. You can specify the columns you want, sort along any one column, and impose conditions on the data values that you want to import for each column.

The column names for the table/view are listed in the Column Name column.

The Import check boxes determine which columns you want to read into the current Origin worksheet. Only checked columns are imported. The Check All and Uncheck All buttons can be used to check or uncheck all of the table/view columns at once.

The Sort field allows you to sort the imported data along any one selected column in either ascending or descending alphanumeric order. The Not Sorted drop-down list selection returns the order to the original order of that column in the table/view. You can only sort along one column.

The Criteria field allows you to establish conditional relations that can be used to select data from any desired column.

You can use the following relational operators:

Operator | Definition
< | Is less than.
<= | Is less than or equal to.
= | Is equal to. (This differs from the LabTalk equality operator, ==.)
>= | Is greater than or equal to.
> | Is greater than.
<> | Is not equal to. (You cannot use ! or ^ for the logical NOT.)

Note 1: String comparisons are not case sensitive.

Note 2: After you add an entry to the Criteria or Or field, you can correct the string in the cell by first pressing ESC, and then clicking at the desired position in the string.

The criteria for each column are joined into one condition with the logical AND statement. For example, suppose there are columns named State, Sales, and Balance, and you enter the Criteria ="Texas", >=5.0 and <> 0 for the three columns respectively. Then you have selected data satisfying the condition:

State="Texas" AND Sales>=5.0 AND Balance<>0

You can also include criteria from the Or field for each column of data. These criteria are also joined into one condition by the AND statement. Then the condition under the Criteria field is joined with the condition under the Or field by the logical OR statement. For example, if you have conditions x, y, and z in the Criteria fields, and a, b, and c in the Or fields, then the expression is (a AND b AND c) OR (x AND y AND z).

Click OK to have the selected data read into the active worksheet.

Click Cancel to do nothing and exit ODBC.

To select all or part of a data source table or view and import the selected data into a worksheet, do the following:

  1. Make the desired worksheet active.

  2. Select File:Import:ODBC. Origin displays the ODBC Dialog dialog box.

  3. Select the desired data source from the Data Source list box. If the desired data source is not listed, you must first add the data source to the list. Origin responds by listing the available tables and views for that data source in the Table/View List list box.

  4. Click the desired table or view and then click on the Select Case tab.

  5. Make your entries under the Import, Sort, Criteria and Or fields to select all or part of the data for import into Origin.

  6. Click OK. Origin imports the selected data into the active worksheet. You can now perform analysis and graphing procedures.

Importing a Data Source Table into Origin

To open the ODBC Dialog dialog box:

  1. Activate the worksheet and select File:Import:ODBC.

The ODBC Dialog Data Base Tab Controls

The ODBC Dialog Select Case Tab Controls


Maintaining the ODBC

Adding Data Sources and Drivers

You can reach Microsoft's ODBC Data Source Administrator dialog box directly from your Windows Control Panel (Start:Settings:Control Panel). This dialog box allows you to:

  • Add a new data source.

  • See the full path name of any data source already listed.

  • Delete an existing data source.

  • Add or delete a database driver.

Review the Windows Help file for instructions.

To add a data source, you will need to select a driver appropriate to your data source from the list of installed drivers and enter the path and file name of the file which contains the data source. Give the data source a name meaningful to your current application. The new data source will now be listed in the Data Source list in Origin's Data Base tab of the ODBC Dialog dialog box. Origin can then access this new data source.

Troubleshooting Tips

You must install the proper ODBC driver for the database you are using. For example, if your data source is stored in a database version that is newer than the database driver you have on your computer, then you may not be able to access your data source. Additionally, other software that you install may modify your current ODBC files and disrupt function. If you have trouble using ODBC, re-install Microsoft's ODBC files. You can do this by re-installing Microsoft Office (which will include the ODBC interface functions and drivers you need).


Associating LabTalk Script with a Worksheet

When repetitive or complex tasks are performed on a worksheet, such as importing data, performing calculations, or plotting data, it can be useful to create a LabTalk script to perform the tasks. Doing so can allow you to perform a series of tasks automatically when a pre-set execution condition is met, such as clicking a button on the worksheet or importing data into the worksheet.

There are a few basic ways to associate LabTalk script with a worksheet. You can add an object to a worksheet window and then enter script in the object's Label Control dialog box. The worksheet can then be saved as a template for future use. Because the object exists in the worksheet window, it is saved with the template.

In addition to programming an object on a worksheet, you can associate LabTalk script with a worksheet using the Worksheet Script dialog box. This programming method is not as powerful as associating script with an object, as you have less options for script execution. However, the script in the Worksheet Script dialog box is also saved with the worksheet template, allowing you to access the script by opening a new worksheet based on the custom template.

Additionally, you can associate LabTalk script with a worksheet by customizing a user-defined button on the Button Groups tab of the Customize Toolbar dialog box (View:Toolbars). You can specify that the button only be available when a worksheet is active, and you can specify a section of a LabTalk script file that will be executed whenever the button is clicked.

The Worksheet Script Dialog Box


Import. Select the Import check box to execute the worksheet script each time you import ASCII data into the worksheet.

Changes in Dataset. Select the Changes in Dataset check box to run the script whenever a change is made through script to the data set specified in the associated text box.

Type the desired LabTalk script in this text box. The script should follow the same syntax conventions as a LabTalk script file. For more information, see the LabTalk Language Reference Section of the Programming Help file (Help:Programming).

Click this button to immediately execute the script in the script box. Additionally, the script and execution method are set as the default settings for the worksheet.

Click this button to set the script and execution method as the default settings for the worksheet.

The Worksheet Script Dialog Box

To open the Worksheet Script dialog box:

  1. Select Tools:Worksheet Script when the desired worksheet is active.

The LabTalk script that is entered in this dialog box is associated with the active worksheet. The method of script execution is controlled within the dialog box. Save the worksheet as a template and the associated worksheet script is saved as well.

Worksheet Script Dialog Box Controls (see figure)

The Run Script Automatically After Group

The Script Box

The Do It Button

The Update Button


Introduction to Matrices

While data stored in worksheets can be used to create any 2D graph and some 3D graphs, in order to create a 3D surface graph or a 3D contour graph your data must be stored in a matrix. To review basic matrix window concepts, see Matrices.

The matrix displays a single data set of Z values. Instead of displaying the data set as a single column in a worksheet, the matrix displays the data in a specified dimension of rows and columns.

Matrices are characterized by:

  • numbered columns which are mapped to linearly spaced X values.

  • numbered rows which are mapped to linearly spaced Y values.

By default, Origin displays the column and row numbers in the column and row headings (left-hand figure). Optionally, you can display X and Y values (right-hand figure).

To display X and Y values in column and row headings:

  1. Make sure that the matrix is active.

  2. From the Origin menu, select View:Show X/Y.


Setting the Matrix Data Properties

Specify the cell width in units of characters.

Option

Description

Double (default)

allocates eight bytes of storage space to each value. Double is the only data type that supports:

  • missing values

  • math operations

  • curve fitting

Float

allocates four bytes of storage space per value.

Int*

allocates four bytes of storage space per value.

Short*

allocates two bytes of storage space per value.

Char*

allocates one byte of storage space per value.

*signed or unsigned.

Use the Data Format drop-down list to select between the decimal, engineering, and scientific display formats:

Option | Description
Decimal:1000 | 1, 1000, 1E6, 1E9 The threshold for conversion to scientific notation is controlled on the Numeric Format tab of the Options dialog box (Tools:Options).
Scientific:1E3 | 1E0, 1E3, 1E6, 1E9
Engineering:1k | 1.0, 1.0k, 1.0M, 1.0G Origin supports the following Engineering data suffixes:
Decimal:1,000 | 1, 1,000, 1E6, 1E9 The threshold for conversion to scientific notation is controlled on the Numeric Format tab of the Options dialog box (Tools:Options).
suffix | equivalent | quantity
k | kilo | 10^3
M | mega | 10^6
G | giga | 10^9
T | tera | 10^12
P | peta | 10^15
m | milli | 10^-3
u | micro | 10^-6
n | nano | 10^-9
p | pico | 10^-12
f | femto | 10^-15

Note that "u" is Origin's universal notation for micron. The only exception is graph axes tick labels, which support "mu". Note also that Origin 7 does not support "E" and "a" as suffixes.

Select Default Decimal Digits to display all digits in a matrix cell as determined by the Number of Decimal Digits combination box value on the Numeric Format tab of the Options dialog box.

Select Set Decimal Places = to control the display of the number of digits after the decimal place (overrides the Number of Decimal Digits setting on the Numeric Format tab of the Options dialog box). Type the desired decimal place value (n) in the associated text box. This value determines the maximum number of digits displayed after the decimal point. If the field is blank, the default value is used (which is 5 for Double (8) internal data types).

Select Significant Digits = to control the number of digits displayed. Type the desired significant digit value in the associated text box.

Setting the Matrix Data Properties

The Matrix Properties dialog box controls the internal data type, data format, and data display properties of a matrix window. To set these properties:

  1. Activate the matrix window and select Matrix:Set Properties from the Origin menu.

This opens the Matrix Properties dialog box.

Matrix Properties Dialog Box Controls (see figure)

The Cell Width Text Box

The Internal Data Type Drop-down List

The Data Format Drop-down List


Enter the number of columns (X dimension) and rows (Y dimension) in the associated text boxes.

Type the first and last X and Y values in the associated text boxes.

When you click OK, Origin will linearly map the matrix in X by columns using the First and Last X (Columns) values and the number of Columns (the Dimensions group). Origin will linearly map the matrix in Y by rows using the First and Last Y (Rows) values and the number of Rows (set in the Dimensions group).

Setting the Matrix Dimensions and XY Coordinates

To set the matrix dimensions and the XY mapping relationship:

  1. From the Origin menu, select Matrix:Set Dimensions.

  2. This opens the Matrix Dimensions dialog box.

Matrix Dimensions Dialog Box Controls (see figure)


Customizing the Display Properties of a Matrix

To customize the text color, style, and heading and grid options of a matrix:

  1. Double-click in the upper-left corner of the matrix window. This opens the Matrix Display Control dialog box.

The controls in this dialog box are identical to those found in the Worksheet Display Control dialog box. For a complete description of controls, see Controlling the Worksheet's Display Properties


Saving a Matrix Window

To save a matrix window with its data:

  1. Select File:Save Window As.

This menu command opens the Save As dialog box. ‘Matrix (*.OGM)’ is selected (by default) from the Save as Type drop-down list.

  2. Type the desired file name in the File Name text box and select the desired destination folder. You do not need to include the file extension in the File Name text box.


Matrix Data

Data are introduced into the matrix in several ways:

  • A dataset is created based on some mathematical expression.

  • Data are copied and pasted via the Clipboard or Imported.

  • Importing of Raster Images.

  • By conversion of worksheet data to create a matrix of Z values.


Setting the Matrix Values

Enter the range of column (j) and row (i) numbers to be filled with data values. Matrix values are only entered in the cells that fall within the selection range.

The Add Function drop-down list and button are provided to help you build your expression in the Cell(i,j)= text box. Instead of typing out the function in the Cell(i,j)= text box, you can select a function (or functions) from this list.

The Add Function list includes Origin's built-in mathematical and statistical distribution functions. To view the details of a function, select the function from the drop-down list. A function summary -- including a description of the function arguments -- displays in the upper view box. To select a function so that it displays in the Cell(i,j)= text box:

  1. Select the function from the list.

  2. Click the Add Function button.

If text was highlighted in the Cell(ij) text box, that text becomes the (last) argument for the selected function. If no text was highlighted, the function displays at the last active cursor position in the text box.

Enter an expression to fill the For Row (i) and For Column (j) cells with values. The expression can include any of Origin's built-in functions (the Add Function controls provide a convenient method for adding mathematical and statistical distribution functions to the expression). You can use any of Origin's built-in functions following the syntax described in the LabTalk Manual. In addition to functions, you can use any operators recognized by Origin, as well as any defined variables.

You can reference a single cell in a matrix by using this syntax:

MatrixName[N*(i-1)+j]

where:

N = the number of columns in the matrix.

i = the row number in the matrix.

j = the column number in the matrix.

Note: Do not include a semicolon after the expression.

You can define and compile an Origin C expression in the Cell(i,j)= text box. Enter an Origin C expression, then select this check box, and click OK. Any compiler errors are typed out to the Script window. To learn more about Origin C, see the Programming Guide Help file (Help:Programming).

Click to close the dialog box and set the values for the For Row (i) and For Column (j) cells using the expression in the Cell(i,j)= text box.

Click to Undo/Redo the last change made to the expression in the Cell(i,j)= text box.

Setting the Matrix Values

To fill the matrix with Z values, select Matrix:Set Values. This menu command opens the Set Matrix Values dialog box.

Dialog Box Controls (see figure)

For Row (i) and For Column (j)

Add Function

The Cell(i,j)= Text Box

The Compile as Origin C and Treat x^y as pow(x,y) Check Box

The OK Button

The Undo/Redo Button


Viewing the Matrix Values

  1. Use the scroll bars on the right and bottom edges of the matrix window to view the desired cells.

or

  1. Select View:Go to Row to view a specific matrix row. This menu command opens the Go to Row dialog box.

  2. Type the desired row number in the associated text box.


Importing Data into the Matrix

There are several options for importing data into the matrix.

  • Simple import of ASCII data files.

  • Import (incl. drag and drop) of user-defined file types (requires that you develop custom import routine using Origin C).

  • Drag and Drop Thermo Galactic SPC data files.

  • Drag and Drop Raster Image files.


Importing ASCII Data into a Matrix

To import ASCII data into a matrix:

  1. From the menu, select File:Import ASCII or click the Import ASCII [image] toolbar button. Both actions open the Import ASCII dialog box.

  2. Select your data file and click Open to import the file into the matrix.

The values imported into the matrix are assumed to be Z values. Set the matrix XY mapping relationship in the Matrix Dimensions dialog box after reading in the Z data (Matrix:Set Dimensions).


Origin's Drag-and-Drop Data File Support for Matrices

You can drag Thermo Galactic SPC data files from Windows Explorer into an Origin matrix.

To do this:

  1. Open a fresh matrix window in Origin by clicking the New Matrix button [image] on the Standard toolbar.

  2. Select the desired file in Windows Explorer.

  3. Drag the file over the Origin taskbar button and hold there until Origin becomes active.

  4. Continue dragging the file and drop it into the Origin matrix window.

You can also drag image files into an Origin matrix. To learn more about Origin's support of image data, see Importing, Plotting, and Analyzing Raster Images.


Importing, Plotting, and Analyzing Raster Images

Origin supports importing, viewing, and plotting of raster graphic images. To import a gray scale, 8-bit color or higher resolution color image into the active matrix:

  1. Select File:Import Image.

or

  1. Drag the image file from Windows Explorer and drop it into the matrix window.

Origin displays a device independent bitmap (DIB) of the image in the matrix.

Click here to view a multi-media demonstration

To learn more about displaying and analyzing raster graphic images in Origin, see these topics:

Data Mode and Image Mode

Entering Image Data Directly into a Matrix

Color Palettes to Enhance Image Analysis

Examining a Region of Interest

Image Plots

Image Processing Example

Plotting an Image Histogram

Viewing the Images X and Y Projections

Exporting an Image


Data Mode and Image Mode

When you import a raster image into a matrix, a cell is created in the matrix for each pixel in the image. The matrix is viewable in two modes:

  • As a color or gray-scale device-independent bitmap (DIB).

  • As a matrix of data derived by converting the DIB to data values. Origin does this by converting each pixel to an RGB value, then assigning a corresponding index number from a gray scale palette, based on the RGB value of the pixel.

To view a DIB as a matrix of values:

To convert back to image view:


Entering Image Data Directly into a Matrix

In addition to importing images, you can enter image data directly into a matrix (via keyboard entry, by importing ASCII data, pasting data from the Clipboard, etc.). The values that you enter are considered to be 8-bit or higher gray scale intensity values. Before entering values in a matrix, select Matrix:Set Properties to correctly set the internal data type.

When you select Image Mode to view the image (View:Image Mode), Origin composes the image by converting each intensity value to an index number from a gray scale palette. The gray scale palette depends on the internal data type (resolution) of the matrix. As with imported images, you can change the palette by selecting Image:Palette:PaletteSelection.


Color Palettes to Enhance Image Analysis

Viewing the Image Using a Built-in Palette for Improved Clarity

  1. Select Image:Convert to Gray + Data.

or

  1. Select View:Data Mode, then select View:Image Mode.

Origin converts each pixel to an RGB value, then assigns the corresponding matrix cell an index number from a gray scale palette, based on the RGB value of the pixel.

  1. Select Image:Palette:PaletteSelection.

A number of built-in palettes are provided. For information on including your own palettes, see Adding New Color Palettes to Origin.

Adjusting the Brightness and Contrast of the Image

  1. Select Image:Tuning.

  • The Brightness slider shifts the range of Z values that are mapped to the palette.

  • The Contrast slider broadens or narrows the Z value range that is mapped to the palette.

Color Palettes to Enhance Image Analysis

You can also view the image using a built-in or user supplied color palette. Viewing the image using a specified color palette can increase contrast and emphasize certain regions of the image.

To view the image using a color palette, you must first convert the DIB to matrix data:

To display the image using a palette other than gray scale:

You can adjust the brightness and the contrast of the image using the Tuning tool. To open this tool:


Examining a Region of Interest

If you are only interested in a region of the image, you can select a region of the DIB using the Rectangle Tool in "region of interest mode" [image] on the Tools toolbar. The "region of interest mode" is controlled from the Tools:Region of Interest Tools menu command.

Selecting a Region of Interest


Image Plots

Once you have imported a raster image file into an Origin matrix window, you can create a gray-scale "image plot" of the image.

To plot your imported image in an Origin graph window:

  1. Select Plot:Image Plot.

If the color density of the imported image is greater than 8-bits per pixel, an attention message asks whether you wish to convert the image to 16-bit gray scale plot. Clicking No will convert the image to 8-bit gray scale plot.

The default X and Y axis range is determined by the coordinate range of the matrix, which is the same as the image's X and Y pixel range.

Plotting the Image into a Graph

The resulting image plot is similar to an Origin Gray-scale Map contour plot.

  • To customize the map contour levels or scale numeric values, double-click on the plot to open the (Plot Details) Numeric Formats tab.

  • To customize the graph axes, double-click on (any of) the plot's axes to open the Axis dialog box.


Image Processing Example

Origin provides a basic image processing example that allows you to choose a filter and then apply the filter to the image. The example uses Origin C code to perform the filter operations.

To review this example, open IMAGE PROCESSING. OPJ located in the Origin \SAMPLES\PROGRAMMING\IMAGE PROCESSING subfolder.


Plotting an Image Histogram

After importing a raster graphic image into a matrix, Origin can create a histogram of the intensity values in the image. To plot a histogram from the image in the matrix, select Plot:Histogram.

Example Image Histogram

Click here to view a multi-media demonstration


Viewing the Images X and Y Projections

Matrix images can also be plotted using a graph template that includes X and Y projections. To plot to this template, select Plot:Profiles.

To manipulate the view of X and Y projections:

Cursor Type = Crossed Lines

    • Drag the lines to position the cursor.

    • Edit the text boxes associated with the vertical and horizontal lines to position the cursor.

Cursor Type = Arbitrary Line

  1. Choose Cursor Type of Arbitrary Line.

  2. Choose your cross-section by manipulating the handles at the end of the cursor, or by repositioning the cursor.

Viewing the Images X and Y Projections

Click here to view a multi-media demonstration


Exporting an Image

To export an image in the matrix to a raster graphic image file, the internal data type of the matrix must be set to either short(4), int(2), or char(1). The internal data type is set in the Matrix Properties dialog box. To open this dialog box:

  1. Select Matrix:Set Properties.

To export an image to a file:

  1. Select File:Export Image when the matrix is active.


Worksheet to Matrix Conversion

In order to create a 3D surface or contour plot from worksheet data, you must first convert your worksheet data to matrix data. The worksheet-to-matrix conversion process interpolates a continuous surface based on the discrete 3D XYZ triplets in your worksheet. There are several worksheet-to-matrix conversion options; which you use will depend upon on the characteristics of your XYZ data.


Direct Conversion

Two common arrangements of XYZ worksheet data are:

  • X data values in the 1st column, Y data values in the 1st row and Z values in columns 2 to N and rows 2 to M.

  • Y data values in the 1st column, X data values in the 1st row and Z values in columns 2 to N and rows 2 to M.

In the Origin matrix, columns are mapped to X values and rows are mapped to Y values (refer to this topic). Thus, the Direct worksheet to matrix conversion method extracts the Z values and...

  • ... if X data values are in the 1st row and Y data values are in the 1st column, creates a matrix of Z values that maintains the same row and column positions (N-1 columns x M-1 rows) as in this illustration.

  • ... if Y data values are in the 1st row and X data values are in the 1st column, creates a matrix of Z values that transposes the row and column positions (N-1 rows x M-1 columns) as in this illustration.

To directly convert the active worksheet to a matrix:

  1. Select Edit:Convert to Matrix:Direct. This opens the Direct Conversion to Matrix dialog box.

  2. Determine whether your X values or Y values vary across columns and select the appropriate radio button (see above).

  3. Use the X values in first.../Yvalues in first... check boxes, as appropriate.

  4. Adjust the Selected Range, if necessary, and click the Refresh [image] button (note that you can pre-select worksheet data before choosing Edit:Convert to Matrix:Direct and your selection will register in the Selected Range box).

  5. Click Convert.

Note: To convert the active Excel workbook to a matrix using direct conversion, select the desired Excel workbook data and then select Window:Create Matrix. No option to designate X and Y values is given. The data are directly written to the Origin matrix, maintaining row and column positions.

To learn more about direct conversion, review the WORKSHEET TO MATRIX.OPJ project located in your Origin \SAMPLES\ANALYSIS\WORKSHEET TO MATRIX folder.


if a matrix of 24 columns is stored in an ASCII file that is limited to 8 columns of data, then each row of matrix data (24 different values) would require 3 rows in the ASCII file. In this case, you would type 3 in the Expand for Every Row dialog box. After clicking OK, a new matrix is created in which 3 rows of ASCII file data were used to construct each row of the matrix.

Expanding Columns During Conversion

Some screen editors used to create ASCII files may have an upper limit for the number of characters allowed on a single line. This upper limit may even be less than the number of columns needed in the matrix. To compensate for this, one row of matrix data can be stored in multiple rows of an ASCII file.

Displaying this type of ASCII file in a matrix requires two steps. The first step creates a new worksheet and imports the ASCII file into it. The second step "expands" the worksheet data into a matrix. To do this:

  1. Select Edit:Convert To Matrix:Expand Columns.

  2. Specify the number of ASCII file rows comprising one matrix row.

  3. Click OK.

Origin copies your worksheet data from the number of ASCII file rows into the first row of the matrix, repeating this procedure until all ASCII file rows have been converted. For example,

To learn more about expanding columns during conversion, review the WORKSHEET TO MATRIX.OPJ project located in your Origin \SAMPLES\ANALYSIS\WORKSHEET TO MATRIX folder.


2D Binning

This can be a useful data exploration technique when you have a sequence of measurements on a number of parameters and you want to explore dependencies between pairs of parameters.

To explore the relationship between the two variables in a 3D graph, you must first construct a matrix by binning the X-Y paired data in two dimensions.

To perform 2D binning:

  1. Select the desired Y column in your worksheet (note that the second column of parameter measurements must be designated as an X column).

  2. Select Edit:Convert to Matrix:2D Binning.

This opens the Create Bin Matrix dialog box.

  3. Specify the bin limits and bin size for the X variable by entering X-min and X-max (extreme values are automatically detected)and X-increment.

  4. Specify the bin limits and bin size for the Y variable by entering Y-min and Y-max (extreme values are automatically detected) and Y-increment.

  5. Click OK.

A matrix is created by binning the X-Y paired data in two dimensions.

To learn more about 2D binning, review the 2D BINNING.OPJ project located in your Origin \SAMPLES\ANALYSIS\2D BINNING folder. Additionally, review the WORKSHEET TO MATRIX.OPJ project located in your Origin \SAMPLES\ANALYSIS\WORKSHEET TO MATRIX folder.


Plotting Worksheet Data to Check Regularity

  • Origin searches for duplicates in the data set (multiple Z values for the same XY values) and replaces them with a mean Z value.

  • Origin analyzes the X,Y data sets to determine the increment, thereby also determining how many groups are present in both data sets.

  • Origin examines each group of the X,Y data set to look for fluctuations around the median value. If the fluctuations are larger than 25% of the increment size (determined previously), then the conversion quits.

  • The data is sent to Origin's regular conversion routine, after setting the mat.res property to 0. Thus, the mat.res property is now only an internal parameter - you no longer need to set this property value.

Note: If there is too much fluctuation in the X,Y data within each group, the algorithm will reject the data. The assumption is that there are only a few points within each group that deviate from the median. Therefore, if all the data points within a group are slightly different from each other and different only by a small amount compared to the step size from one group to the other, the algorithm may still reject the data set and the Regular conversion will fail.

Converting Regular XYZ Data

In order for XYZ worksheet data to be classified as Regular, the XY data must meet the following requirements:

  • Each X value must have the same number of Y values and each Y value must have the same number of X values.

  • Both the X and the Y data values must be equally spaced. To check for regularity, you can plot the XY data sets as a line and symbol graph.

To convert "regular" XYZ worksheet data to matrix data:

  1. Select the worksheet Z column.

  2. Select Edit:Convert to Matrix:Regular XYZ. The data are analyzed for the following before the matrix conversion is completed:

A matrix of Z values is created.

Click here to view a multi-media demonstration

To learn more about converting regular XYZ data, review the WORKSHEET TO MATRIX.OPJ project located in your Origin \SAMPLES\ANALYSIS\WORKSHEET TO MATRIX folder.


Converting Sparse XYZ Data

The Sparse XYZ worksheet to matrix conversion is similar to the Regular XYZ conversion, except that in the case of the sparse conversion, missing XY pairs are acceptable (i.e. the XY data need not be regularly spaced). The Sparse XYZ conversion allows you to create a 3D plot with Z values plotted at specific X and Y values, as in this 3D bar plot.

The Origin worksheet that supplied the source data for this graph looks like this (note that there are few data points):

During the worksheet to matrix conversion, missing XY pairs are carried over (no interpolation is performed).

Thus, when converting the Example - Sparse XYZ worksheet with the X Step Value set to 5 and the Y Step Value set to 2 in the Sparse XYZ Conversion dialog box (other values left at the default), then the following matrix is created:

To convert your worksheet to a matrix using the Sparse method:

  1. Select the Z column.

  2. Select Edit:Convert to Matrix:Sparse XYZ. This opens the Sparse XYZ Conversion

  3. To edit the dialog box default values, click once on the value to engage edit mode (you can also use the arrow keys to move about the dialog box), and change the value.

  4. Click OK.

To learn more about converting sparse XYZ data, review the WORKSHEET TO MATRIX.OPJ project located in your Origin \SAMPLES\ANALYSIS\WORKSHEET TO MATRIX folder.


Both methods are implemented by calling the nag_2d_scat_interpolant function provided in the NAG C Library eo1 Interpolation. This function is documented in the NAG file e01sac_cl05.pdf. The documentation includes a discussion of the NQ, NW, and RNQ parameters for the modified Shepard's method.

When you installed Origin, you were given the option to install the NAG PDF files which document the NAG functions. If you clicked Yes to install these files, a \NAG PDFs folder was created with a subfolder for each library. If you did not install the PDFs, you can access them from your installation CD, and you can still install them to your hard disk by running the Origin Add or Remove Files program.)

The correlation method computes a new value for each cell in the regular matrix from the values of the points in the adjoining cells in the matrix that are included within the search radius. The computation is based on the Kriging method as can be found in Davis, John C., 1986. Statistics and Data Analysis in Geology. John Wiley & Sons, Inc. Second edition, pp. 383.

The weighted average method is a simple weighted average of the points with the weight equal to 1/r, where r is the distance of each point from the cell. If there is no value within the search radius, the radius is increased until at least one point is encountered. Increasing the search radius means that each point is more inter-related to neighboring points, producing a smoother surface that may lose fine details.

  • Number of Columns/Rows: Specifies the grid dimensions.

  • Search Radius: Minimum number of grid points from the current position used for computing the value of the current cell. If the given position has less than three points in any of the four adjacent quadrants, the search radius is increased until there are enough points or a boundary is reached.

  • Smoothness: Used by correlation (Kriging) method only. Relates values of points in the search radius to the computed value. Smaller values generate smoother surfaces.

Converting Random XYZ Data

If your worksheet to matrix data conversion process is not handled by Direct, Expand, 2D Binning, Regular, Sparse methods, then it should be treated as Random data. To convert random XYZ data to a matrix:

  1. Select the Z column.

  2. Select Edit:Convert to Matrix:Random XYZ.

This menu command opens the Random XYZ Gridding tool.

You have 5 gridding methods to choose from:

  1. Renka-Cline and...

  2. ...a modification of Shepard's method (details).

  3. Correlation (details).

  4. Quick Correlation

  5. Weighted Average (details).

Click here to view a multi-media demonstration

The Random XYZ Gridding tool provides a Show Plot check box and an Apply button. When Show Plot is selected and you click Apply or OK, a graph is created that shows the raw data as an XYZ scatter plot and the interpolated grid as a mesh plot. Use the Apply button to compare gridding methods and find the closest correspondence between the scatter points (actual data) and the interpolated surface.

Random Gridding Options for Correlation, Quick Correlation, and Weighted Average:

Note: If duplicate XY pairs are found (multiple Z values for a given XY value), Z values are averaged.

To learn more about converting random XYZ data, review the WORKSHEET TO MATRIX.OPJ project located in your Origin \SAMPLES\ANALYSIS\WORKSHEET TO MATRIX folder.


Converting a Matrix into a Worksheet

To directly convert the active matrix to a worksheet:

  1. Select Edit:Convert to Worksheet:Direct.

This menu command creates a new worksheet and names the window Datan, where n is the lowest number available (not currently used in a worksheet name) in the project.

The worksheet is created with the same number of rows and columns as the associated matrix. The first worksheet column is designated as an X column, by default. Remaining columns are designated Y. Origin fills the worksheet with the matrix values, maintaining the same row and column positions in the worksheet.

To convert the matrix to a worksheet with XYZ values:

  1. Select Edit:Convert to Worksheet:XYZ Columns. This menu command opens the Convert Matrix to Worksheet dialog box.

    • To sort worksheet values by the X mapping values, select X Constant 1st from the Conversion Type drop-down list.

    • To sort worksheet values by the Y mapping values, select Y Constant 1st from the Conversion Type drop-down list.

  2. Click OK.

This menu command creates a worksheet with X, Y, and Z columns. The cell values of the matrix are converted to Z data in the worksheet. The corresponding X and Y column values in the worksheet are set by the X and Y coordinate mapping information in the matrix.

Converting a Matrix into a Worksheet

There are two methods for creating a worksheet from matrix data:

  • Direct Conversion

  • Creating a Worksheet with XYZ Columns


Matrix Operations

Transposing

Inverting

Flipping and Rotating

Shrinking

Expanding

Smoothing

Integrating


Transposing

To transpose the active matrix:

  1. Select Matrix:Transpose.

This menu command exchanges the matrix columns with rows, and rows with columns.


Inverting

To invert the active matrix:

  1. Select Matrix:Invert.

This menu command transposes the matrix, and then divides the matrix by its determinant.


Flipping and Rotating

To flip the active matrix horizontally (first column becomes last, etc.):

  1. Select Matrix:Flip H.

To flip each column vertically (last cell becomes first, etc.):

  1. select Matrix:Flip V.

To rotate the matrix so that the columns become rows and the previously first value in the column becomes the last value in the row:

  1. Select Matrix:Rotate90.


Shrinking

Matrix shrinking is a simple averaging of grid points. To shrink the active matrix:

  1. Select Matrix:Shrink.

This menu command opens the Shrink into 1x1 for Every dialog box.

  2. Type the column and row shrinkage factors. For example,


Expanding

Matrix expansion uses a bilinear interpolation method to add the inserted points. To expand the active matrix:

  1. Select Matrix:Expand.

This menu command opens the Expand for Every Cell dialog box.

  2. Type the column and row expansion factors. For example,


Smoothing

To smooth the active matrix:

  1. Select Matrix:Smooth.

  2. Click OK at the prompt.

Origin does the following:

  • If either the number of columns or the number of rows in the matrix is less than 32, Origin expands the matrix by a factor of two, then shrinks the matrix by a factor of two. Origin then repeats this process once more.

  • If either the number of columns or the number of rows in the matrix is greater than 32, Origin shrinks the matrix by a factor of two, then expands the matrix by a factor of two.

For more information, see Shrinking and Expanding.


Integrating

To compute the volume beneath the surface defined by the matrix:

  1. Select Matrix:Integrate.

Origin performs a double integral over X and Y to compute the volume and reports the value in the Script window.


Matrices: Windows and Templates

Matrixes: Windows and Templates

Origin matrixes can be saved as two distinct file types, each with its own distinct applications:

  • Origin matrix window (OGM) files can be saved independently of the Origin project. These files retain the display properties of the matrix templates that were used to create them. They also contain data. To learn more about saving and opening child windows, independent of the project (OPJ) file, see Saving Child Windows from a Project File and Opening a Window from a File.

  • Origin matrix template (OTM) files are always saved independently of the Origin project file (though any matrix file in the project can become a template file). Unlike matrix window files, they do not store data. To learn more about Origin matrix templates, see Matrix Templates and Attributes Saved with a Matrix Template.


Saving a Matrix as a Template

To save a matrix with all formatting, properties, and dimensions, but without any data:

  1. Select File:Save Template As.

This menu command opens the Save As dialog box. ‘Matrix Template (*.OTM)’ is selected (by default) from the Save as Type drop-down list.

  2. Type the file name in the File Name text box and select the destination folder. You do not need to include the file extension in the File Name text box.


Attributes Saved with a Matrix Template

The Matrix Properties dialog box provides controls to specify the data type and display. See, Setting the Matrix Data Properties.

The Matrix Dimensions dialog box provides options for customizing the matrix dimensions and the XY mapping relationship. See, Setting the Matrix Dimensions and XY Coordinates.

The Set Matrix Values dialog box allows you to specify a formula to fill the matrix. See, Setting the Matrix Values.

The Matrix Display Control and the associated Page Color dialog boxes provide options for customizing the text color, style, and heading and grid display in the matrix, as well as the background color. The controls in this dialog box are identical to those found in the Worksheet Display Control dialog box. For a complete description of controls, see Controlling the Worksheet's Display Properties.

To open the Matrix Display Control dialog box:

  1. Double-click in the matrix window (but outside of the grids).

To open the Page Color dialog box:

  1. Click the Page Color button in the Matrix Display Control dialog box.

The ASCII Import Options for Matrix and Data Import Options for Matrix dialog boxes set the default import behavior for the matrix template. To open these dialog boxes:

  1. Select File:Import ASCII and click the Options button in the Import ASCII dialog box.

  2. To open the Data Import Options for Matrix dialog box, click the Other Options button in the ASCII Import Options for Matrix dialog box.

To learn more about the settings in these dialog boxes, see Customizing the Default ASCII Import Settings.

The ASCII Export Into dialog box sets the default export behavior for the matrix, including controlling the export of column names and controlling the data separator.

To open this dialog box:

  1. Select File:Export ASCII.

  2. Specify a File Name and Save the file.

Upon clicking Save, Origin opens the ASCII Export Into dialog box. To learn about ASCII export options for matrix data, see Exporting Matrix Data.

Attributes Saved with a Matrix Template

The matrix window is customized by editing its associated dialog boxes. These dialog boxes include:

  • The Matrix Properties dialog box.

  • The Matrix Dimensions dialog box.

  • The Set Matrix Values dialog box.

  • The Matrix Display Control and Page Color dialog boxes.

  • The ASCII Import Options for Matrix and the Data Import Options for Matrix dialog boxes.

  • The ASCII Export Into dialog box.


The Graph Basics

Graph Basics

The graph window is a moveable, sizeable Origin child window. The contents of the graph window are organized hierarchically, with the graph Page at the topmost level. The Page contains one or more Layers, and the Layer(s) may contain one or more data plots.

Each object in this hierarchy - the Page, the Layer, the data set, and the data points -- has associated sub-objects and properties. Developing a solid understanding of the components of the graph page and how they interact will allow you to create highly customized, professional-looking graphs.

This section will introduce you to some basic plotting terminology, then show you the basics of creating an Origin graph.

Click here to view a multi-media demonstration


The Page

Each graph window contains a single page. The page serves as a backdrop for the various elements (layers, axes, text, and data plots) that comprise the graph.

The small, gray [image] in the upper left corner of the graph page is the layer n icon (in this case, the layer 1). Every graph window page contains at least one, and possibly multiple, layers. If all layers are deleted from the page, the graph window is deleted.


Graph Page Dimensions

All Origin graph windows are created using a template. When you create a graph window, the default orientation and page dimensions are determined by settings saved with the graph template. Default page dimensions (width and height) are determined by the "printable area" of your particular printer driver.

To alter the default page dimensions of your graph window, click on the window to activate it, then:

  1. From the menu, select Format:Page.

or

  1. Double-click in the gray area outside of the graph page (but inside the graph window).

Both actions open the Plot Details dialog box. Note that the graph page icon is highlighted on the left side of the dialog box.

  2. On the Print/Dimensions tab, Dimensions group, edit the Width, Height, and Units settings.

To reset the dimensions of the current graph page to the default printer page dimensions:

Learn more about the settings on the Print/Dimensions tab of Plot Details.


Setting the Page Orientation

Graphs can be presented in landscape or portrait page orientations. To change the page orientation of the active graph window:

  1. Select File:Page Setup. This menu command opens the Page Setup dialog box.

  2. In the Orientation group, select the Portrait or Landscape radio buttons.

or

  1. Right-click in the gray area outside the graph page (but inside the graph window).

  2. From the shortcut menu, select Edit:Rotate Page (Note that the Rotate Page shortcut menu command has no affect when the view mode is set to Draft View or Window View).

When you change the page orientation by either of the above methods, Origin reverses the Width and Height Dimensions on the Print/Dimensions tab of the page's Plot Details dialog box.


Changing the View of the Page

  1. Select View:Zoom In or click the Zoom In button [image] on the Graph toolbar to display an enlarged, close-up view of the page in the active graph window.

  2. After selecting the menu command or clicking the button, you must click on the desired zoom location in the graph window. Origin zooms the page, centering the zoom view at this location in the window. The axes are not rescaled.

  3. To zoom in closer, re-select the menu command or click the button again.

After zooming in on the page, Origin provides scroll bars along the bottom and right side of the graph window.

  4. Drag on the scroll bar slide control to scroll up/down or right/left across the page.

  1. Select View:Zoom Out. This menu command is opposite in operation to the View:Zoom In menu command.

or

  1. Click the Zoom Out button [image] on the Graph toolbar.

  1. Select View:Whole Page to fit the entire page to the graph window.

or

  1. click the Whole Page button [image] on the Graph toolbar.

Changing the View of the Page

Use these features to change the view of the graph page:

  • The View:Zoom In and View:Zoom Out menu commands.

  • The Zoom In and Zoom Out buttons on the Graph toolbar.

  • The Whole Page menu command/button to restore the entire page view.

To zoom in on a portion of the graph page:

To zoom out of the graph page:

To restore the graph page to its original view:

Note: These page zooming features should not be confused with the Axis Zoom In and Axis Zoom Out shortcut menu commands available by right-clicking in the axis region. The page zooming features change the view of the page. This affect is different from Origin’s scaling features (including Axis Zoom In and Axis Zoom Out) that change the display of the graph by rescaling the axis.


  1. Click on the X, Y, or Z axis (or anywhere inside the layer frame) of layer n.

or

  1. Click once on the layer n icon in the upper-left corner of the graph window.

or

  1. Click on an object (data plot, text object, etc.) that is attached to layer n ( To find out more about object attachment considerations, see Layer Association, Attachment Method and Scaling Considerations.

The Layer

A typical graph usually includes at least three elements: a set of X and Y (and for 3D graphs, Z) coordinate axes, one or more data plots, and associated text and drawing objects. These elements are part of a movable, sizeable unit called a layer.

An Origin graph can have up to 50 layers on a single graph page. These layers may be superimposed or they may be separated. Layers can be linked spatially and their scales linked mathematically or they may be entirely independent of one another.

While a graph may have multiple layers, only one layer is active at any given time. To make a layer active, do one of the following:

When you perform operations that affect the layer (resize the layer, change the format of a data plot, etc.), you perform those operations on the active layer. In some cases, these operations (resizing, for instance) may affect other layers that you have linked to the active layer. When working with multi-layer graphs, try to remain aware of which is the active layer. The active layer is denoted by a depressed layer n icon in upper left corner of the graph window. In this illustration, layer 2 is the active layer.

The active layer will also be indicated by highlighted graph axes, if the View:Show:Active Layer Indicator menu command is checked. This menu command must be applied to each graph page.

Note: To configure Origin so that a graph layer can be made active only by clicking on the layer icon, select Format:Page. This menu command opens the Plot Details dialog box with the page (graph) icon selected on the left side of the dialog box. Select the Miscellaneous tab, then select the Set Active Layer by Layer Icon Only check box.


The Layer Frame

The layer frame is a hypothetical box, normally defined by the four XY axes (top X, bottom X, left Y, right Y) in a 2D graph layer. For 3D XYZ graphs, the frame is a rectangular box located outside of the XYZ axes. For both 2D and 3D graphs, the frame is independent of the axes. Though they frequently coincide, an axis can be offset from the frame. When you click on an axis to select a layer, the highlighted boundary that appears is the frame. Most layer display options such as the layer color, data clipping, and axis grid lines, are delimited by the frame boundaries.

To show the frame, activate a graph window, then:


The Graph

The single layer graph includes one set of X, Y, Z (for 3D) coordinate axes, one or more data plots, and associated text and graphic elements. A graph may contain multiple layers.


The Data Plot

  1. Select Data from the Origin menu bar (with a graph window active).

or

  1. Right-click in the graph layer or on the layer n icon to open a shortcut menu.

The data list displays at the bottom of the shortcut menu. Listed are all the data plots in the current layer. A check mark appears next to the active data plot.

  1. Select a data plot from the data list.

or

  1. Right-click inside the layer.

  2. Choose Set as Active from the shortcut menu.

The Data Plot

A data plot is the graphic representation of one or more coordinate data sets, or a matrix, in a graph window. Data plots are created in the following ways:

  • A data plot can be created from two or more data sets, such as an X and Y column in the worksheet. If a third data set (error bar or Z column) is employed, the resultant data plot contains three data sets.

  • A data plot can be created from a Y data set and the associated row numbers (referenced as i) of the data set. If the worksheet containing the selected data set does not contain a designated X column and does not contain hidden X values, the data plot is created using row numbers.

  • A data plot can be created from one Y data set which has been assigned an incremental X value (for that plotting instance).

  • A data plot can be created from a matrix of Z values, each of which is mapped to an X and a Y value.

The data list at the bottom of the Data (graph window is active) menu lists the data plots included in the active layer of the graph window.

To see the list of data plots in a layer:


Creating a Basic Graph Using Plot Designations

At a basic level, creating a graph in Origin is a simple process. To plot data using Origin’s worksheet Plot Designations and a built-in graph template:

  1. Highlight one or more columns of worksheet data (or a range from one or more columns).

  2. Select Plot:Graph Type (line, scatter, line + symbol, etc.).

or

  2. Right-click on the selected worksheet data and select Plot:Graph Type from the shortcut menu.

or

  2. Click a button on one of the graph toolbars (2D, 2D Extended, or 3D Graph).

It is not necessary to highlight the X column in the worksheet when plotting using Origin’s plot designations. Origin will use the values in the first X column to the left of the highlighted Y or Z data column. If no X column is found to the left, Origin uses values in the first X column to the right. If the worksheet has no X column, Y or Z values are plotted against default row or incremental values.

To learn more, see Column Associations in the Worksheet and Designating a Column as X, Y, Z, Error, Label, or None.


Creating a Data Plot Group

  1. Open the Layer n dialog box by double-clicking on the layer n icon in upper-left corner of the graph window.

  2. To create a group, select the desired data sets from the Layer Contents list (use CTRL + select, SHIFT + select, or simply drag the mouse to select multiple data sets).

  3. Click Group. To disable grouping, click on one of the grouped data plots in the Layer Contents list and click Ungroup.

Creating Data Plot Groupings

When you select multiple Origin worksheet or Excel workbook columns and create a graph, Origin groups the resulting data plots in the layer. Grouping provides for quick creation of presentation-ready graphs because each data set in the group is assigned a differentiating set of plot attributes -- line color, symbol type, etc. This occurs because the choices for each attribute (line color = black, red, green...; symbol shape = square, circle, triangle...; etc.), are incremented by dataset. Thus, the first column of Y data in a simple 2D line plot might be denoted by a black line; the second column of Y data might be denoted by a red line -- the second color in the color list -- , the third column of Y data by a green line, and so on. Origin allows you considerable control over the way in which plot attributes are incremented -- or not incremented, or you may opt to disable the incrementing of data plot attributes entirely.

Example: Creating a data plot grouping:

  1. Open a fresh worksheet and click the Import ASCII button [image] on the Standard toolbar.

  2. Browse to the TUTORIAL subfolder in the Origin software folder and Open GROUP.DAT.

  3. Drag your mouse across the three Y column headings of the Group worksheet.

  4. Click the Line & Symbol button [image] on the 2D Graphs toolbar. Note that line and symbol color and symbol type have been incremented by data set.

You can manually group or ungroup data plots using the Layer n dialog box. To group or ungroup data sets:

Note: The following data plot types (and elements) cannot be grouped: 3D XYZ scatter, 3D XYZ trajectory, vector graphs, error bars, and data labels. You cannot ungroup the following data plot types: high-low-close charts, floating bar graphs, and floating column graphs.


Creating a Graph Without Regard to Plot Designation and Column Order

Use CTRL + select to plot data from non-adjacent columns. Plot Designation is respected but enumeration of columns is unimportant.

Examples: Use CTRL + select to plot An X1 column and a Y2 column. Likewise, use CTRL + select to plot an X1, Y1, and Y2err column; the Y2err column supplies the Y error values for the Y1 column.

Creating a Graph Without Regard to Plot Designations and Column Order

Use of default worksheet column associations (Plot Designations and column order) allows you create graphs in two quick steps. However, you are not bound by worksheet column designations and column order when creating most 2D graphs. Origin provides two options for plotting without regard to these associations:

  • Nonadjacent column selection.

  • The Plot Setup dialog box.


For example, in the following figure, the A(X) and B(Y) columns are plotted using the Scatter template.

Plotting the A(X) and B(Y) Columns

To display categories of data (east, west) using the same symbol shape and color, open the Symbol tab of the Plot Details dialog box and edit the Symbol Color and Shape drop-down lists as shown in the following figure. In this example the colors for each category will be indexed from the color list.

Mapping the Symbol Color and Shape to Column C

The resultant graph displays the data using the column C categories for both the symbol color and shape. To do this, Origin alphabetizes the categories (categories starting with numeric values are first). Because color indexing was selected, Origin assigns the first category the first color in the color list, the second category the second color, etc. Origin performs this same alphabetic assignment for all other mapped plot attributes.

The Resultant Graph

To add a legend to your graph layer that conveys information about the categorical data, select Graph:Enhanced Legend.

Plotting Categorical Data

Origin supports plotting categorical data in either X or Y columns. Before plotting categorical data, you must designate the column as Categorical:

  1. Highlight the column.

  2. From the menu, choose Column:Set as Categorical.

If your worksheet contains a Categorical X column and one or more associated Y columns, Origin interprets the X categories as X axis tick labels. These tick labels are ordered alphabetically (categories starting with numeric values are first) and evenly spaced along the axis. The Y data are plotted at X tick values (see figure).

If your worksheet contains a Categorical Y column, you can map categorical data "values" to plot symbol shape, color, size, or other plot attributes. (see example).

Also, see Customizing the Legend for Categorical Data Plots.


Creating a Graph when a Matrix is Active

When a matrix is active, you can create 3D surface and contour graphs. Unlike the worksheet, Origin always plots the complete range of matrix values, independent of any data selection. To plot your matrix data, make the matrix the active window and do one of the following:

  1. Click the desired button on the 3D Graphs toolbar (View:Toolbars).

or

  1. Select Plot 3D:Graph Type.

Origin plots the matrix values into the selected graph template.

Note: A matrix of Z values is linearly mapped in X by columns and linearly mapped in Y by rows. This eliminates multiple Z values (for example, folded surfaces like a sphere) and restricts the XY range to a rectangular grid. Additionally, Origin employs a "front to back" rendering mechanism when drawing 3D surfaces so that the data in the front draws over the data in the back.


Graphs: Windows and Templates

Origin graphs can be saved as two distinct file types, each with its own distinct applications:

  • Origin graph window (OGG) files can be saved independently of the Origin project. These files retain the display properties of the graph templates that were used to create them. They also contain data plots and supporting worksheet data. To learn more about saving and opening graph windows, independent of the project (OPJ) file, see Graph Windows.

  • Origin graph template (OTP) files are always saved independently of the Origin project file (though any graph file in the project can become a template file). Unlike graph window files, they do not store data. To learn more about Origin graph templates, see Graph Templates and Attributes Saved with a Graph Template.


Graph Windows

  • This allows you to create a compact, editable file, that contains only supporting data. Subsequently, (1) insert this file into another Origin project file, (2) convert the file to a graphic file type (EPS, PDF, JPG, BMP, etc.), or (3) use it to create a custom template file.

  • Graph, (OGG files) contain both the data plot and the supporting worksheet data. If you and another Origin user are working jointly on a manuscript, you could insert the OGG file into a Word document and both graph and supporting data would be mutually available for editing by you or your colleague.

  1. Select File:Save Window As.

or

  1. Right-click on the window title bar and select Save Window As.

Both commands open the Save As dialog box.

  1. Type the file name in the File Name text box. The graph (.OGG) extension is added automatically.

  1. Select File:Open when the project is open. This menu command opens the File Open dialog box.

  2. Select Graphs (*.OGG) from the List Files of Type drop-down list.

  3. Select your file and click Open.

  1. Open the graph window file in your Origin project, as described above.

Activate the graph window and...

  2. Right-click inside the graph page and select Go to WorksheetName from the shortcut menu.

or

  2. Select Format:Plot from the Origin menu. This opens the Plot Details dialog box.

  3. Click the Worksheet button at the bottom of the dialog box.

Graph Windows

As with worksheet and matrix windows, the graph window can be saved to a file (apart from the project file) and then re-opened in a different project. This can be useful in a variety of situations, for instance:

Graph window (OGG) files should not be confused with graph template (OTP) files. Unlike graph window (OGG) files, graph template (OTP) files do not store data.

To save the active graph window as an OGG file:

To open the graph window (OGG) file in your project:

To open the worksheet associated with the graph window (OGG) file:


  1. Activate the graph window and select File:Template:Save As

or

  1. Right-click on the window title bar and select Save Template As from the shortcut menu.

Both commands open the Save As dialog box.

  2. Enter the File Name. The graph template (.OTP) extension is added automatically.

  3. Select a category or enter a custom category (Categories help you easily find your template when using the Template Library).

Graph Templates

Graph windows are created from graph template files with the extension *.OTP. When creating your graph, you can choose from one of Origin's built-in graph templates or create your own custom template. Origin provides built-in templates to create a broad range of 2D and 3D graphs. For an overview of Origin's built-in graph templates, see The Graph: Types.

A graph template file differs from a graph window file in that templates do not store the data in the graph. Template files determine all the page and layer characteristics such as page size, number of layers, inclusion of text labels, and data plot style information. A graph window that has been customized can be saved as a template for future use.

To save the active graph window as a template:

To plot data into your saved template:

For a discussion on creating custom graph templates, see Creating a Custom Graph Template.

Click here to view a multi-media demonstration


The details (or data plot styles) of each of the data plots in your graph window are saved in data plot style holders. Data plot style holders contain information about the type of data plot (for example, scatter, line, or column) and the settings for the data plot (for example, the settings on the Plot Details Symbol tab). When you save a graph window as a template, each data plot in each layer of the graph window has an associated data plot style holder.

Thus, when you create a graph based on this custom template, for each layer in your graph, the first data plot in the layer will display according to the information stored in the first data plot style holder for that layer. The second data plot in the layer will display according to the information stored in the second data plot style holder for that layer, and so on. As you add data plots to the layer, Origin searches for a data plot style holder that is not currently in use (for example, if you removed a data plot from the layer contents), and displays the data plot using the first data plot style holder found. If you add more data plots to the layer than there are style holders, Origin will display the data plot using the information in the last data plot style holder.

The Axis dialog box provides options for the customization of the axis, axis labels, axis scaling, grid lines, axis breaks, and tick label font and formatting.

To open this dialog box:

  1. Activate the graph window and select Format:Axes:AxisType.

Additional annotations can be added to the graph window using the Text tool [image] or other graphic tools from the Tools toolbar.

Attributes Saved with a Graph Template

The graph page, each graph layer on the page, the axes, the tick labels, the axes labels, and text or object annotations, as well as the data plots, all have properties that can be saved to a graph template.

Attributes saved with a graph template are controlled from various tabs on Plot Details dialog box:

  • The page tabs of the Plot Details dialog box.

  • The layer tabs of the Plot Details dialog box.

  • The data plot tabs of the Plot Details dialog box.

  • The function, data point, error, and label tabs of the Plot Details dialog box.

A note about data plot style holders:

Additionally, the attributes controlled by these dialog boxes are saved with the graph template:

  • The Axis dialog box.

  • The dialog boxes that control any annotations on the graph.


The Plot Setup Dialog Box

The Plot Setup dialog box provides a flexible interface for adding or removing data sets from your graph windows. You can add or remove any data set in the Origin project to your graph and you can do so without the need to change the column Plot Designations that control how the data plot in the graph (as X, Y, error bar, label, etc.).

Additionally, as you add plots to your graph windows, you can use the graph window's current plot type or you can add plots of a different type (within limits) "on the fly." Thus, it becomes a simple process to mix plot types such as line, scatter, line & symbol, column, etc.

The Plot Setup dialog box replaces the Select Columns for Plotting dialog box.

Use the Plot Setup dialog box to create 2D plots as well as these 3D XYY and 3D XYZ plot types:

The Plot Setup dialog box opens when:

  • You click one of the graph buttons on the 2D Graphs or 2D Graphs Extended toolbars, without having selected any data to plot.

  • You click the Plot button in the Select Template dialog box (Template Library) either without having selected data or without having selected data that is appropriate for the chosen graph template.

  • You right-click on the layer icon in a graph window (the window need to contain plotted data), and select Plot Setup from the shortcut menu.

  • You double-click on the graph window layer icon.

  • You ALT + double-click on the graph window layer icon to open the Layer n dialog box, then click the Plot Setup button.

There are three distinct panels in this dialog box, though only one, two or all three panels may display at any given time. Display all three panels by clicking the [image] [image] buttons located to the right side of the dialog box.

Use the Plot Setup dialog box to:

  • Create a simple graph.

  • Add plots to a specific graph template.

  • Add, remove, or replace plots in a graph window.

  • Add data plots to a graph using the worksheet column Plot Designation.

  • Add data plots to a graph without regard to worksheet column Plot Designation.

Click here to view a multi-media demonstration


Plot Setup: Creating a Simple Graph

This short tutorial will show you how to create a simple graph with the Plot Setup dialog box:

  1. Click the New Worksheet button [image] on the Standard toolbar.

  2. Click the Import ASCII button [image] on the Standard toolbar.

  3. Browse to the \Samples\Data folder (in your Origin folder), select Gaussian.DAT, and click Open. The file is imported to the worksheet and the worksheet is renamed Gaussian.

  4. Click the Scatter button [image] on the 2D Graphs toolbar. The Plot Setup dialog box opens. Click the [image] [image] buttons to display all three dialog box panels.

  • The middle panel, left side of the dialog box displays Plot Type = Scatter -- our chosen plot type.

  • The middle panel, right side of the dialog box has column headings that read: X, Y, yEr, L, Column, 1st Data Value, and Position.

  5. For Column Pos, select the box under heading X.

  6. For Column Ampl, select the box under Y.

  7. For Column Err, select the box under yEr.

The settings in the middle panel of the dialog box should now look like this:

  8. Click OK. The Plot Setup dialog box closes. The following scatter graph is created with y error bars at each XY value.


Plot Setup: Adding Plots to a Specific Graph Template

Use the Plot Setup dialog box to add data to a specific graph template. In this brief tutorial, we will add some pCLAMP data to a specialized Origin 2D line graph template formatted specifically for plotting the type of data commonly collected in electrophysiology work.

  1. Click the New Worksheet button [image] on the Standard toolbar.

  2. Select File:Import:pCLAMP, browse to the pCLAMP folder in your Origin program folder and select the file 96322001.ABF.

  3. Click Add File(s), then click OK. The pCLAMP Options dialog box opens.

  4. Click Import. The file is imported into the active worksheet. The single data column is renamed Ch0 and a Column Designation of Y is assigned to the column.

  5. Without selecting any data, click the Open Template button [image] on the Standard toolbar. This opens the Open dialog box.

  6. Set the Files of Type drop down list to Graph Template (*.otp), browse the Origin program folder to locate the file PCLAMP.OTP and click Open. This opens a graph window based on the PCLAMP.OTP template.

  7. Right-click on the Layer 1 icon in the upper left corner of the graph window and select Plot Setup. The Plot Setup dialog box opens.

  8. Use the [image] [image] buttons to display all three Plot Setup dialog box panels.

  9. In the top panel, select the worksheet that contains the imported pCLAMP file. The middle panel should now display the single Ch0 data column. The dialog box should look something like this:

  10. Select the check box under the Y column heading (Note: The ability to freely designate a data set as X, Y, error bar or label data -- independent of the worksheet Column Designation -- saves you the trouble of changing incompatible worksheet column designations before plotting your data).

or

  10. Right-click on the column headings (in the middle panel) and select Apply Designations from the shortcut menu. This applies the worksheet Column Designation of the data.

  11. Click Add. The plot is added to Layer 1, as indicated by the list control in the bottom panel. Note that the worksheet range (1:49152), plot type (Line), and legend symbol (pA) are also listed.

  12. Select the Rescale Graph To Show New Plots check box at the bottom of the dialog box and click OK.

The data are plotted to the pCLAMP.OTP template and axes are automatically rescaled to show all data (A reminder message may report that Speed Mode is enabled in the graph page; to learn about this Origin feature, see Speed Mode).


Plot Setup: Adding, Removing or Replacing Plots in a Graph Window

The Plot Setup dialog box provides a flexible interface for adding or removing data sets from your graph windows. You can add or remove any data set in the Origin project to your graph and you can do so without the need to change the column Plot Designations that control how the data are treated in the graph (as X, Y, error bar, label, etc.).

In this short tutorial, you will edit the layer contents of an existing graph, remove a data plot and replace it with two other data plots.

  1. Click the New Worksheet button [image] on the Standard toolbar. A new worksheet opens.

  2. Click the Import ASCII button [image] on the Standard toolbar. The Import ASCII dialog box opens.

  3. Browse to the \Tutorial folder in your Origin directory and open the file tutorial_1.dat. The file is imported to the worksheet. The worksheet is renamed tutorial1.

  4. Without select any data in this worksheet, click the Line + Symbol button [image] on the 2D Graphs toolbar. This opens the Plot Setup dialog box.

  5. Click the [image] [image] buttons and open all three panels in this dialog box.

  6. In the top panel, select the tutorial1 worksheet. The center panel of the Plot Setup dialog box now displays all of the data sets in the tutorial1 worksheet.

  7. Leave the Time column designated as X (leave the check box selected) and the Test1 column designated as Y. For the Error1 column, select the check box under the yEr heading. Clear the remaining check marks under the Y column heading so that the center panel now looks like this:

  8. Right-click inside the bottom panel of the Plot Setup dialog box and choose Hide Style Holders from the shortcut menu (see figure).

  9. Highlight the Layer 1 icon in the bottom panel (see figure), then click Add.

  10. Click OK. A simple line + symbol plot with error bars is created.

  11. Double-click on the layer 1 icon in the upper left corner of the graph window. This reopens the Plot Setup dialog box.

  12. Select the tutorial1 worksheet in the top panel of the Plot Setup dialog box. This populates the center panel of the Plot Setup dialog box with the list of data sets in the tutorial1 worksheet.

  13. Clear the check boxes for the Test1 and Error1 data sets, and select the boxes for the Test2/Error2 and Test3/Error3 data sets so that the center panel looks like this, then click Replace. The Test1/Error1 data sets are replaced by the Test2/Error2 and Test3/Error3 data sets.

  14. Hold down the CTRL key and select the Test 2 and Test 3 data sets in the bottom panel (but do not select the Error2 and Error3 data sets), right-click and select Group form the shortcut menu (see figure). Grouping Test2 and Test3 will ensure that once the graph is replotted, plot attributes will increment by data set so that the two data sets can be clearly distinguished (see Creating Data Plot Groupings).

  15. Click OK. The Test2/Error2 and Test3/Error3 data plots replace the Test 1/Error1 data plot (see figure).


Plot Setup: Adding Plots to a Graph using the Plot Designation

Plot Setup: Adding Plots to a Graph using Plot Designations

One of the advantages of using the Plot Setup dialog box to create graphs is that you are not bound to using the worksheet's column Plot Designations to create your graphs. However, in cases where the worksheet has been set up with the correct column Plot Designations, you can easily apply those designations to your graph, using a shortcut menu command in the Plot Setup dialog box. This brief tutorial will demonstrate this feature.

  1. Click the New Worksheet button [image] on the Standard toolbar.

  2. Click the Import ASCII button [image] on the Standard toolbar.

  3. Browse to the \Samples\Data folder (in your Origin folder), select Gaussian.DAT, and click Open. The file is imported to the worksheet and the worksheet is renamed Gaussian.

  4. Double-click on the column heading of the second Y column -- the one named Err. This opens the Worksheet Column Format dialog box.

  5. In the Options group, choose Y Error from the Plot Designation drop-down list and click OK. The second Y column becomes a yEr (error bar) column.

  6. Without selecting any data in the Gaussian worksheet, click the Scatter button [image] on the 2D Graphs toolbar. The Plot Setup dialog box opens.

  7. Click the [image] [image] buttons to display all three dialog box panels.

Note that the center panel of the dialog box lists all three data sets in the Gaussian worksheet. The worksheet Plot Designations have automatically been applied but you should know how to Clear or Apply those designations from this dialog box.

  8. Right-click on any of the headings in the list controls in the center panel, and select Clear Designations from the shortcut menu (see figure). Note that this clears all Plot Designation check boxes in the center panel of the Plot Setup dialog box.

  9. Right-click once more on any of the headings and select Apply Designations. This correctly applies the Plot Designations of the Gaussian worksheet.

  10. Click Add, then click OK. A scatter plot is created with error bars on each data point.

Note that you are not bound to using the worksheet's column Plot Designations (in which case you could Clear Designations and specify new designations "on the fly" as in this short tutorial).


Plot Setup: Adding Data Plots to a Graph without using Plot Designation

Plot Setup: Adding Data Plots to a Graph without using Plot Designations

In this short tutorial, you will use the Plot Setup dialog box to create data plots without regard to the worksheet column Plot Designation.

  1. Click the New Worksheet button [image] on the Standard toolbar. A new worksheet opens.

  2. Click the Import ASCII button [image] on the Standard toolbar. The Import ASCII dialog box opens.

  3. Browse to the \Tutorial folder in your Origin directory and open the file tutorial_1.dat. The file is imported to the worksheet. The worksheet is renamed tutorial1.

  4. Without select any data in this worksheet, click the Line + Symbol button [image] on the 2D Graphs toolbar. This opens the Plot Setup dialog box.

  5. Click the [image] [image] buttons and open all three panels in this dialog box.

  6. In the top panel, select the tutorial1 worksheet. The center panel of the Plot Setup dialog box now displays all of the data sets in the tutorial1 worksheet.

  7. Leave the Time column designated as X (leave the check box selected) and the Test1 column designated as Y. For the Error1 column, select the check box under the yEr heading. For the Test2, Error2, Test3, and Error3 columns, select the boxes in the under the Y, yEr, Y and yEr headings, respectively. The center panel list controls should now look like this:

Note that what you have done here is to assign worksheet column Plot Designations (X,Y, error bar, etc.) "on the fly." This was most convenient because the worksheet template used to import the tutorial1 data was not pre-configured to treat data columns as X, Y, yEr, Y, yEr, respectively. If it had been (i.e., we had created and saved a custom worksheet template specifically configured to designate imported data in this sequence), we might have found it more convenient to simply apply the worksheet Plot Designations to the data plots. To learn how this is done, see Plot Setup: Adding Plots to a Graph using the Plot Designation.

  8. Click Add. The data sets are added to the graph layer (Layer 1). The bottom panel of the Plot Setup dialog box should now look like this:

  9. Click OK. The Plot Setup dialog box closes. A Line + Symbol plot with error bars is created, with the 3 Y data sets grouped in the graph layer so that plot color increments by data set like this:


Plot Setup: Editing the Plot's Display Range

You can alter the display range of a data plot without masking or otherwise altering the worksheet's display range. This is particularly advantageous when you have other plots which share worksheet data.

There are several ways to alter the data plot's display range; one is to use edit the Range settings in the bottom panel of the Plot Setup dialog box.

  1. Double-click on the layer n icon in the upper left corner of the graph window. This opens the Plot Setup dialog box.

  2. Use the [image] [image] buttons to open all three panels in this dialog box.

  3. Highlight the graph window's source worksheet in the top panel.

  4. Click to the right side of the data plot's listed range, under the Range heading in the bottom panel (see figure). This produces a button which, when clicked on, opens the Range dialog box.

  5. Clear the Auto check boxes (if selected) and edit the From and To values, as needed.

  6. Click OK (in the Range dialog box).

  7. Edit the Range for each plot, as needed.

  8. If you do not wish to have the graph axes rescaled to accommodate the changes to the plot display, clear the Rescale Graph to Show New Plots check box at the bottom of the dialog box.

  9. Click OK. The plot is redrawn with new From and To values. If you checked Rescale..., the axes are rescaled to reflect the changes to the plot range (see figure).

Click here to view a multi-media demonstration


Plot Setup: Available Data (Top) Panel

The setting on this drop-down list controls which data sets show on the list control to the right:

  • Current Worksheet: Show only data sets in the current worksheet.

  • Worksheets in Folder: Show only worksheets in the active Project Explorer folder.

  • Worksheets in Project: Show all worksheets in the current Origin project (default).

  • Matrices in Folder: Show all matrices in the active Project Explorer folder.

  • Matrices in Project: Show all matrices in the project.

  • Loose Datasets: Show all data sets that are not associated with worksheets or matrices.

  • Function Plots: Show all data sets associated with functions.

The list control on the right side of this panel lists all the available data, as per the Available Data drop-down list setting. Columns in this list control are:

  • Name: Name of data sheet – lists name of worksheet, matrix, or loose dataset etc.

  • Label: Lists window label for worksheets and matrices.

  • Cols: Number of columns in the worksheet/matrix.

  • Row: Number of rows in the worksheet/matrix.

  • File Path: File path, if worksheet/matrix was filled by importing a data file.

  • File Name: File name, if worksheet/matrix was filled by importing a data file.

  • File Date: File date, if worksheet/matrix was filled by importing a data file.

  • Folder: Project Explorer folder in which object (wks/matrix) resides.

  • Created: Date when object (wks/matrix) was created.

  • Modified: Date when object was last modified.

You can sort this list in ascending/descending order by clicking on any column heading.

Right-click on any column heading to bring up a context menu that has two options: Hide, and Show All. Hide will hide the current column from display. Show all will show all columns.

Click on any row of the list control to select a particular object such as worksheet or matrix, from the list. The middle Plot Designations panel updates to show the data from the selected object. You can select multiple items from this list by using SHIFT or CTRL keys. When multiple items are selected, the (middle) Plot Designations panel will display all those columns that are common to the selected objects.

Plot Setup: Available Data (Top) Panel

The topmost panel in the Plot Setup dialog box lists datasets available for creating new plots or for adding to existing plots.

The Available Data Drop-Down List:

The Data Set List Control (right-side of panel):


Plot Setup: Plot Designations (Middle) Panel

This control lists available plot types. Availability is a function of which plot type or template you chose initially (which initiated the Plot Setup dialog box), or what plot type you are chose to edit.

X, Y, yEr, L, etc: The list control on the right lists all available datasets. There are multiple columns in this control. The plot designation column types (X, Y, yEr, etc.) are dependent on selected plot type (For example, when working with matrices and 3D plots, the X, Y, Yerr columns will be absent and only a Z column will be present).

The plot designation columns have check boxes in all rows. Select one or more boxes (only one per row) to assign various columns/datasets for your plot. Note that you can select only one X column at a time (a single data plot or a plot group can have only one associated X column). However, you can click the Add button to add a plot or a group, then change the designations and click Add again, to add more plots or groups to your graph.

Column: The worksheet column name (worksheets only).

Label: The worksheet column label (worksheets only).

Position: The worksheet column position (worksheets only).

1st Data Value: The value of first element in data set (worksheets only).

Click on any column heading to sort the entire list in ascending or descending order, on the sort column.

Additional Shortcut menu commands

A right-click on any column heading opens a context menu with these options (worksheets only):

Apply Designations: Use the worksheet's column plot designations (Note that if the worksheet has multiple X columns, only the first X column designation is applied).

Clear Designations: Clear all check boxes in the list control.

X Error Bars: Introduce an X Error Bar column.

Y Error Bars Plus/Minus: Introduce separate Plus and Minus Y error bar columns.

Allow Row# as X: Introduce a new row, corresponding to worksheet row numbers. Use this row to assign X values for the plot.

Once you have assigned plot designations, click the Add button to add a data plot or a group of data plots, to the graph layer. Added plots are then listed in the (bottom) Plot List panel.

This button is sensitive to the selection in the Plot List panel. To add plots, the Plot List selection must be on Layer, on a Group, or on a Style Holder.

If plot designations have been assigned for multiple plots (in the middle panel), clicking Add will create a plot group and add it to the Plot List (bottom) panel.

When you select a particular data plot from the Plot List (bottom panel), the Add button becomes the Replace button. Clicking Replace then populates the middle panel and enables editing of the plot designations of the selected plot's data sets. You can change plot designations (or apply other Plot Designations functions), then click the Replace button. This replaces the plot in the graph window (the selected plot in the Plot List) with the data plot specified in the middle panel.

Plot Setup: Plot Designations (Middle) Panel

This middle panel of the Plot Setup dialog box displays all datasets associated with the object(s) (worksheets, matrixes, loose data sets, etc.) that were selected in the (top) Available Data panel of this dialog box.

The Plot Type List:

The Plot Designations List Control:

The Add/Replace Button:


Plot Setup: Plot List

Graph Layers form the top level in the tree hierarchy. If a graph template or an existing graph contains multiple layers, those layers will list in this panel .

The second tier in the hierarchy is formed by plot Groups (if they exist in the graph window).

Below the level of the groups are the data plots and Style Holders (A Style Holder contains the style information that is used to create the plot. See this topic for a note on Style Holders).

The Range column lists each data plot's display range. The values in this column are editable (for more information, see Plot Setup: Editing the Plot's Display Range).

The Plot Type column lists the plot type (from the middle panel) currently assigned to the data set.

The Legend column displays the legend text assigned to this data plot. This column is non-editable.

The Rescale Graph to Show New Plots check box forces Origin to rescale all graph axes to accommodate added or edited data plots.

Hold down the left mouse button and drag data plots within a Group or a Layer to change plotting order (This is particularly useful for in the plotting grouped data because plotting order is linked to plot attributes. For more information, see Customizing Grouped Data Plots.

Right-click inside the tree list open a shortcut menu:

Show/Hide Style Holders. This is useful when you want to ignore graph template style information and manually assign plot attributes.

Remove. If a data plot is selected, use the shortcut menu's Remove command to remove the data plot from the group or layer.

To group multiple data sets in the layer, use SHIFT + SELECT or CTRL + SELECT to select multiple data plots, then right click, and choose Group from the shortcut menu. This creates a plot group.

Right-click on a Group in the tree and select Ungroup to ungroup the data plots.

Plot Setup: Plot List (Bottom) Panel

This bottom panel displays the current plot list for the graph window in a tree format.

The Plot List Controls

Additional commands specific to the Plot List panel


Adding Data to an Existing Graph

There are numerous ways to add data to an existing graph window (without adding a new layer):

  • Adding data with the Add Plot to Layer menu command.

  • Drag data from the worksheet to the graph.

  • Add data using the Plot Setup dialog box. This method allows you to use or disregard worksheet column plotting designations.

  • Add data using the Layer n dialog box. This method uses the worksheet column plotting designations.

  • Importing single or multiple ASCII data files directly into the graph window.

  • Dropping an ASCII or Thermo Galactic SPC file into the graph window.

  • Creating data plots using the Draw Data tool.

For information on adding Excel data to an existing graph window, see Adding Data Using the Select Data for Plotting Dialog Box.

Click here to view a multi-media demonstration


Adding Data with the Add Plot to Layer Menu Command

This is a simple method for adding a range of data to an existing line, scatter, line + symbol, column or area graph:

  1. Highlight your worksheet data.

  2. Click on the existing graph window to activate it.

  3. From the Origin menu, choose, Graph:Add Plot to Layer:Graph Type.


  1. Select Tools:Options, Graph tab.

  2. Choose from one of four options on the Drag and Drop Plot drop-down list:

  • Select Line, Scatter, or Line+Symbol.

  • Select Current to create the plot using the style of the graph template (for example, line or scatter). If you have created a custom template with data plot style holders, Origin will search for the first available style holder. If there are no available style holders, Origin uses the style of the graph template.

Dragging Data from the Worksheet Into the Graph

You can drag and drop worksheet data onto a graph window. When using this method, Origin relies on plot designations to create the plot. For example, if you select a Y column, or a range data in a Y column, and drag the data onto a graph window, Origin creates a data plot using the selected Y data and it's associated X data, if an X column exists. If the worksheet has no X column, Origin will plot the selected Y data against default X values.

To drag data from a worksheet to a graph:

  1. Select the worksheet data (one or more columns or a range of one or more columns).

  2. Point to the right edge of the selection range.

  3. When the pointer looks like this [image], hold down the left mouse button and drag the data to the graph window.

  4. Release the mouse button. The data are plotted.

If you drag multiple Y columns, or a range of multiple Y columns, onto a graph, Origin groups the associated data plots. When data plots are grouped, display properties are automatically incremented to differentiate data plots.

To specify a default plot type for drag-and-drop data:


Adding Data Using the Plot Setup Dialog Box

  • 3D Scatter

  • 3D Trajectory

  • 3D Bar

  • 3D Ribbon

  • 3D Wall

  • 3D Waterfall

  1. Click one of the graph buttons on the 2D Graphs or 2D Graphs Extended toolbars, without selecting any data to plot.

  2. Click the Plot button in the Select Template dialog box (Template Library) either without selecting data or without selecting data that is appropriate for the chosen graph template.

  3. Right-click on the layer icon in a graph window (the window need to contain plotted data), and select Plot Setup from the shortcut menu.

  4. Double-click on the graph window layer icon.

  5. ALT + double-click on the graph window layer icon to open the Layer n dialog box, then click the Plot Setup button.

Adding Data Using the Plot Setup Dialog Box

Add data sets to the active layer of a graph window using the Plot Setup Dialog Box. The Plot Setup dialog box allows you to specify the plot designation of each data set (X, Y, xEr, yEr, or L) regardless of the worksheet column plot designations. The dialog box also allows you to add data from different worksheets to the same graph window in a single operation.

Use the Plot Setup dialog box to create 2D plots as well as these 3D XYY and 3D XYZ plot types:

To open the Plot Setup dialog box when a graph window is active, do one of the following:


Adding Data Using the Layer n Dialog Box

Data in worksheets, matrices, or Excel workbooks can be added to the active layer of a graph window using the Layer n dialog box.

  1. To open the Layer n dialog box, ALT + double-click on the layer icon in the upper-left corner of the graph window. Available Data lists all data sets in the Origin project. Layer Contents lists all data sets plotted in the layer.

  2. To move a data set into the Layer Contents, choose the data set(s) in the Available Data list and click the [image] button.

  3. To remove a data set from the Layer Contents, highlight the data set(s) in the Layer Contents list and click the [image] button.

When you use this method to add a Y data set(s) to an existing graph, X values are furnished by the selected Y data set's associated X data set or by the worksheet's default X values.

When adding a Z data set to the graph, Origin creates a data plot using the Z data set's associated X and Y data sets. If no X column exists, Origin uses the default X values.

When adding label and error bar data sets to the graph, labels and error bars are positioned in the layer in relation to their coordinate X and Y worksheet data values.

Note 1: You are not prevented from adding any data set in the Available Data list to the Layer Contents. However, adding a data set that is inappropriate for the graph template (for instance, adding a Z data set to a 2D scatter graph) can yield unexpected and nonsensical results.

Note 2: When you add data to a graph using the Layer n dialog box, Origin displays the data plot using the style of the graph template. If you have created a custom template with data plot style holders, Origin will search for the first available style holder. If there are no style holders available, Origin displays the data plot using the style of the graph template.


The Layer n Dialog Box

This list box includes all the data sets in the project that are available for plotting (all worksheet columns that are not designated as X or disregarded, temporary data sets, matrices, and Excel workbook columns).

To display a data set(s) in the layer:

  1. Select the data set(s) in the Available Data list.

  2. Click the [image] button to add the data set(s) to the Layer Contents list.

Select this check box to sort the data sets in the Available Data list alphabetically; when cleared, the data sets are listed in order of creation.

Select this check box to display the data sets that are located in the active Project Explorer folder; clear to display all the data sets in the project.

This list box includes all the data sets currently plotted in the layer. To remove a data set from the layer, highlight the data set(s) in the Layer Contents list and Click the [image] button.

Note: If the data sets are part of a data plot group, the data set names are prefaced with a gn notation, where n is the group number (see explanation under the Group/Ungroup Button).

The drawing order in the layer is determined by the order of the data sets in the Layer Contents list. The data set at the top of the Layer Contents list plots first in the layer (in back); remaining data sets plot in front of the first plot, following the order in the Layer Contents list.

Use these buttons to move data sets up or down in the Layer Contents list.

To move a data plot to the front in the layer:

  1. Select the data set in the Layer Contents list.

  2. Move it to the bottom of the list using the [image] button.

Delete all highlighted data sets in the Available Data list. This also removes any worksheet columns and data plots associated with the deleted data sets.

Click on the Layer Properties button to open the Plot Details dialog box with the layer n icon selected in the left side of the dialog box. Edit the tabs in this dialog box to control the layer display.

Click the Plot Associations button to open the Plot Setup dialog box.

The Plot Setup dialog box provides a flexible interface for adding or removing data sets from your graph windows. You can add or remove any data set in the Origin project to your graph and you can do so without the need to change the column Plot Designations that control how the data plot in the graph (as X, Y, error bar, label, etc.).

To learn more, see The Plot Setup Dialog Box.

Click this button to group or ungroup the selected data sets. The button is only available when two or more data sets in the Layer Contents list are highlighted. Grouping data sets allows for automatic incrementing of the data plot color, line type, etc. within the data plot group.

Click Edit Range to change the plot display range for a selected data set. This button is only available when one data set is highlighted in the Layer Contents list.

The Edit Range button opens the Plot Range dialog box. Specify the starting and ending worksheet rows for displaying the data plot in the graph.

Select to show the current display range for all data sets included in the Layer Contents list. The Layer Contents now includes the display range of the data sets in the graph (for example, data1_b[1:30]).

  • The first number in the display range is the worksheet row number of the first data value plotted.

  • The second number is the row number of the last worksheet value plotted.

Select this box to automatically rescale the layer axes to show all the data after the Layer n dialog box is closed (if you have added data, axes may need rescaling before all data show in the plot).

Clear the check box, to maintain the current axes scales.

The Layer n Dialog Box

Layer n Dialog Box Controls (see figure)

  • The Available Data List

  • The Sort Check Box

  • The Show Current Folder Only Check Box

  • The Layer Contents List

  • The Up and Down Buttons (Layer Contents)

  • The Delete Button

  • The Layer Properties Button

  • The Plot Setup Button

  • The Group/Ungroup Button

  • The Edit Range Button

  • The Show Range Check Box

  • The Rescale on OK Check Box


  1. Double-click on the layer icon that includes the data plot whose range you want to edit. This action opens the Layer n dialog box.

  2. Select the data plot (the primary data set) from the Layer Contents list and click Edit Range. (Note: If the data plot is part of a data plot group, you cannot click the Edit Range button without first ungrouping the data sets. To avoid ungrouping, edit the data plot's range using the shortcut menu command (see next).

  1. Right-click on the data plot whose range you want to edit and select Edit Range.

Dialog Box Controls ( see figure)

The Dataset list box displays the primary data set for the selected data plot.

Use the From Row Number and To Row Number text boxes to set the data plot display range.

Note: To reset the display range of the data plot back to the original range, select Data:Reset to Full Range from the Origin menu, or right-click on the data plot and select Reset to Full Range.

Specifying the Start and End Worksheet Rows

You can specify the starting and ending worksheet rows for displaying a data plot from the Layer n dialog box or from the data plot's shortcut menu.

To access this option from the Layer n dialog box:

To access this option from the data plot's shortcut menu:

Both of the above actions open the Plot Range dialog box.


Importing a Single ASCII File into a Graph Window

When you drag and drop files onto an Origin graph window, this sequence of events occurs:

  1. If your DOFILE.OGS file contains specific information about handling of your dropped ASCII file (you would have to have written a LabTalk script to handle your custom import routine), then the file is imported as per the instructions in DOFILE.OGS and plotted in a graph window.

  2. If you have not modified DOFILE.OGS and you have not created an Origin Import Filter (*.OIF) file for the dropped file type (extension), the Import Wizard opens to the Data Source page. From this point, you can configure the Import Wizard to import your file. Optionally, you could simultaneously create and save an .OIF file to simplify import of future files sharing the structure of your dropped ASCII file. To learn more about how to do this, see Import Wizard.

  3. If you have created an Origin Import Filter (*.OIF) file for the dropped file type (extension), Origin uses this filter to import your data. If multiple applicable .OIF files are found, a dialog opens listing all filters in the folder, and the user selects a filter from the list. When the correct filter has been selected, the data are imported and plotted without opening the Import Wizard.

To learn more about dragging-and-dropping files onto an Origin graph window, see Origin's Drag-and-Drop Data File Support for Graphs.

This opens the Import ASCII dialog box.

  2. Choose a file.

  3. Click the Options button to customize the default ASCII import settings.

  4. Click Open.

The file is imported and plotted in the active graph window.

Importing a Single ASCII File into a Graph Window

You can import a single ASCII file into the active layer in the active graph window by one of three methods:

  1. From the menu, select File:Import:Import Wizard. The Import Wizard opens to the Data Source page.

or

  1. You can drag and drop a file onto an Origin graph window.

or

  1. You can click the Import ASCII button [image] on the Standard toolbar.

Note: Header information in an ASCII file can be inserted into a graph as a text label. For more information see Inserting Variables Extracted from Imported ASCII Files into Text Labels.


Importing Multiple ASCII Files

When you drag and drop files onto an Origin graph window, this sequence of events occurs:

  1. If your DOFILE.OGS file contains specific information about handling of your dropped ASCII file (you would have to have written a LabTalk script to handle your custom import routine), then the file is imported as per the instructions in DOFILE.OGS and plotted in a graph window.

  2. If you have not modified DOFILE.OGS and you have not created an Origin Import Filter (*.OIF) file for the dropped file type (extension), the Import Wizard opens to the Data Source page. From this point, you can configure the Import Wizard to import your file(s). Optionally, you could simultaneously create and save an .OIF file to simplify import of future files sharing the structure of your dropped ASCII file(s). To learn more about how to do this, see Import Wizard.

  3. If you have created an Origin Import Filter (*.OIF) file for the dropped file type (extension), the files are imported to a worksheet and the data are plotted without opening the Import Wizard.

To learn more about dragging-and-dropping files onto an Origin graph window, see Origin's Drag-and-Drop Data File Support for Graphs.

This opens the Import Multiple ASCII dialog box.

Note: The Import Multiple ASCII dialog box allows you to import data into a graph or worksheet. If you open the dialog box when a graph window is active, you can import the data into a worksheet by selecting the Import Each Selected File into a New Worksheet check box. To learn more, see Importing Multiple ASCII Data Files into a Single or Multiple Worksheets.

The Import Multiple ASCII Dialog Box (Graph Window Active) ( see figure)

Selecting a File for Import

To add a file to the lower list box, double-click on the file in the "Files" list box, or click on the file in the box and click Add File(s).

Removing a Selected File

To remove a file from the lower list box, select the file in this list box and click Remove File(s).

Assigning Plotting Designations

To facilitate plotting your data, Origin includes a Plot Designation Column section in the list of selected files. You can select a plotting designation arrangement or you can type an arrangement by double-clicking on the default value. This action opens a combination box from which you can select or type a new arrangement.

Origin provides the following selections:

XY1 | Origin will import all the columns. Origin assumes the first column contains X values and all remaining columns contain Y values. In this case, the 1 indicates that the last character Y is repeated for all remaining columns.
DXY1 | Origin will import all the columns. Origin assumes the first column contains values that should be Disregarded. Origin assumes the second column contains X values and the remaining columns contain Y values. 1 indicates that the last character Y is repeated for all remaining columns.
XY | Origin will import the first and second columns as X and Y values respectively.
XY2 | Origin will import all the columns. However, in this case Origin assumes the first column contains X1 values, the second column contains Y1 values, the third column contains X2 values, the fourth column contains Y2 values, and so on. In this case, the 2 indicates that the last two characters X and Y are repeated for all remaining columns.
XYE | Origin will import the first, second, and third columns as X, Y, and Y error values respectively.
XYZ | Origin will import the first, second, and third columns as X, Y, and Z values respectively.

Alternatively, use the following letters to specify a custom column designation arrangement:

X: X values

Y: Y values

Z: Z values

D: disregarded values - these values are not imported

E: Y error values

H: X error values

L: label values

When you type or select a plotting designation arrangement, the arrangement determines the number of columns that are imported, as well as their plotting designations. If a number is included as a terminating character, it indicates the "repeat unit" in the arrangement.

  • Example 1: If you select XY1, Origin imports all the columns. Origin assumes the first column contains X values and all remaining columns contain Y values. In this case, the "1" indicates that the last character "Y" is repeated for all remaining columns.

  • Example 2: If you select XY2, again Origin imports all the columns. However, in this case Origin assumes the first column contains X1 values, the second column contains Y1 values, the third column contains X2 values, the fourth column contains Y2 values, and so on. In this case, the "2" indicates that the last two characters "X" and "Y" are repeated for all remaining columns.

  • Example 3: If you select XYE2, Origin imports the file using the following arrangement: XY(YError)Y(YError)Y(YError)... as "Y" and "E" are repeated.

In addition to assigning plotting designations for each data file separately, you can apply your Plot Designation Column selection for

  • one data file.

  • all the data files in the list box.

  • selected data files in the list box.

Importing the Selected Files

Click OK to plot all files in the lower list box into the active layer of the graph window, based on the Plot Designation Column settings.

You can also drag-and-drop ASCII data files into a graph. To learn about this, see Origin's Drag-and-Drop Data File Support for Graphs.

To apply the selection to all the data files:

  1. Right-click on the Plot Designation Column selection that you want to apply and select Apply Plot Designation Selection to All from the shortcut menu.

Note that you can also display the data file path from this shortcut menu.

To apply the selection to selected data files:

  1. Select the data files in the list box. Right-click on the Plot Designation Column selection that you want to apply and select Apply Plot Designation Selection to Selection from the short cut menu.

Note that you can also display the data file path from this shortcut menu.

Importing Multiple ASCII Files

You can import multiple ASCII files into the active layer in the active graph window by one of three methods:

  1. From the menu, select File:Import:Import Wizard. The Import Wizard opens to the Data Source page.

or

  1. You can drag and drop files onto an Origin graph window.

or

  1. You can click the Import Multiple ASCII button [image] on the Standard toolbar.

Note: Header information in an ASCII file can be inserted into a graph as a text label. For more information see Inserting Variables Extracted from Imported ASCII Files into Text Labels.


Origin's Drag-and-Drop Data File Support for Graphs

  1. Make your graph window active.

  2. Select the desired file(s) in Windows Explorer.

  3. Drag the file(s) over the Origin taskbar button and hold them there until Origin becomes active.

  4. Drag and drop the file(s) onto the Origin graph.

This method requires that you supply the import code in the form of an Origin C function.

Your Origin C function should have the following prototype:

int YourFunctionName(Page& pgTarget, TreeNode& trFilter, LPCSTR lpcszFile, int nFile)

where:

pgTarget: A reference to a Page object of type worksheet or Matrix. This would be what you defined in your filter or on the 1st page of the wizard, as the target window.

Note1: The target window and template specification on Page 1 is only used when creating new windows (as would be the case when you use File:Open or under some conditions during drag-and-drop importing). When choosing File:Import, if your active window is of the same type as your target window specification, no new window is created and a reference to the page object for the active window is passed to your function. If the active window is of a different type, a new window is created using the specified template, and the page reference to this new window is passed.

trFilter: A reference to a TreeNode object that holds all the filter settings from your filter file, or from your wizard specifications, in a tree structure.

lpcsFile: The full path and name of the file that is being imported.

nFile: The file index number in an ordered sequence of imported files (e.g. If you drag-and-drop n files, or try to Open/Import n files, your function gets called n times, and nFile is the file count for the file being processed.

Note2: For an example that illustrates writing a custom function, refer to the OC file \OriginC\OriginLab\EarthProbe.c. This file is used by Origin for importing Earth Probe data.

When any file is dropped onto Origin from Windows Explorer, Origin looks to the DOFILE.OGS script file located in your Origin folder. It then looks for a section named [OnOpenExtension], where Extension is the file extension of the dropped file. If found, that section is executed and the file name is passed as an argument.

To learn more about this method, review the AUTOMATION.OPJ sample project located in your Origin \SAMPLES\PROGRAMMING\AUTOMATION subfolder.

Note: Because Origin looks to DOFILE.OGS before looking to see whether there is an Import Wizard filter for the dropped file type, you must remove any previously added file import code from DOFILE.OGS if you plan to use an Import Wizard filter file to import your user-defined file types.

Origin's Drag-and-Drop Data File Support for Graphs

You can drag-and-drop ASCII, simple binary, user-defined, and Thermo Galactic SPC data files into graph windows and have the data plotted automatically.

To drag and drop files onto an Origin graph window:

An Explanation of Origin's Drag and Drop Methods

Origin's Drag-and-Drop file import routines are handled by one of two methods:

  • The older method involves calling a LabTalk section in a file called DOFILE.OGS (see A Note on Adding Drag-and-Drop Support for New File Types, below). This user-modifiable file is installed as part of your Origin software. This file has been used by Origin to import SigmaPlot, Minitab, and Thermo Galactic SPC data files and you may have modified this file yourself, adding your own LabTalk script to handle drag-and-drop import of unrecognized (by Origin) data files.

  • The newer method relies on user-created Origin Import Filter (*.OIF) files, created using the Origin Import Wizard.

When supported file types (ASCII, simple binary, Thermo Galactic SPC or user-defined) are dropped into an Origin Origin graph window, Origin first looks for data handling instructions in DOFILE.OGS. If they are not found there, Origin looks for an appropriate Origin Import Filter (OIF) file. If no OIF file exists, the Import Wizard is opened.

If Origin does find that an appropriate OIF exists for handling the "dropped" file(s), it will import the file(s) automatically (without opening the Import Wizard) into the active layer in the active graph window. Simultaneously, a hidden worksheet (based on the Target Window Template, if specified, or on the default worksheet template if no Target Window Template is specified) is created and the data are imported into this worksheet.

If multiple files are dropped onto the graph window, each file will go into a separate worksheet window, created based on the Target Window Template.

Adding Drag-and-Drop Support for New File Types

Origin provides two mechanisms by which you can add drag-and-drop support for user-defined file types:

  • Create a filter using the Import Wizard.

  • Add a section to the DOFILE.OGS script file.

Note: More on information on drag-and-drop data import is available in the Knowledge Database on the OriginLab website. Search in Category = Import/Export, and use the key word "drag".


  1. Right-click on the data plot and select Go to Drawn from the shortcut menu.

or

  1. Double-click on the data plot to open the Plot Details dialog box.

  2. Click the Worksheet button (at the bottom of the dialog box).

Both operations open a Drawn worksheet window containing the A(X) and B(Y) data sets. These are the coordinate values of the drawn data plot.

Creating a Data Plot Using the Draw Data Tool

You can create a data plot using the Draw Data Tool [image] on the Tools toolbar. Data plots created with the Draw Data Tool can be edited, manipulated, and analyzed in the same way as any other data plot.

To create a data plot using the Draw Data tool:

  1. Activate the graph window.

  2. Click on the Draw Data Tool [image].

  3. Make sure that the correct target graph layer is active and place the cursor on the graph.

  4. Double-click to create data points. The Data Display tool opens (if not already open) and displays the X and Y values for each created data point.

  5. When you have finished adding data points, click on another tool (on the Tools toolbar) to exit the "drawing" mode.

When you use the Draw Data Tool, you are simultaneously creating a hidden worksheet named Drawn (worksheets are automatically enumerated, with n = 1, 2, 3, 4, etc.). The primary data set of the data plot created using the Draw Data Tool is named Drawn_b.

To open the hidden worksheet for the drawn data set:


Data Labels and Error Bars

Worksheet columns can be designated as X Error, Y Error, or Label.

When plotting columns of XY data, co-selected columns designated as Error or Label data are plotted as error bars or data labels on the XY data plot.

Data Labels

Error Bars


Data Labels

You can use a data set to label specific data points or axis scale values in a graph. Either worksheet or Excel workbook column values can be used as data labels in a graph window.

To include worksheet data label values in the graph window, the column containing the data label values must be designated as Label. Text or numeric values in a worksheet Label column plot as data labels for the associated Y column values immediately to the left of the label column (a row-by-row association is created). In the case of nonadjacent column selection, the selected label column provides data labels for the selected Y column. If more than one Y column is selected, Origin labels the selected column nearest to the left of the label column.

To use Excel workbook column values as labels, use the Select Data for Plotting dialog box.

When a data plot includes data labels, the Plot Details dialog box lists a data label icon beneath the associated data plot icon on the left side of the dialog box. When the data labels icon is selected, a Label tab displays on the right side of the dialog box.

Note: You can use text formatting switches in the cells of a worksheet Label column. For example, to display a data label in bold font style, type \b(YourLabel) in the worksheet cell.


Adding Error Bars

To include error bars in a new graph:

  • Set up your worksheet so that the columns are designated as Y1, yEr1, Y2, yEr2, Y3, yEr3, etc., then select your worksheet data and create your plot. To learn more, see Adding Error Bars to Your Graph.

  • Select multiple Y datasets and click either the Y Error Bar [image] (2 Y columns per plot, selected) or XY Error Bar [image] (3 Y columns per plot, selected) buttons on the 2D Graphs Extended toolbar. To learn more, see Y Error Bar Graph and XY Error Bar Graph.

To add error bars to an existing graph:

  • Use the Plot Setup dialog box to add an error bar data set -- independent of its column designation -- to your plot.

To use this method, double-click on the layer icon (in the upper-left corner of your graph window), then follow the basic procedure outlined here, starting from step 5. For additional information, see Plot Setup: Creating a Simple Graph.

  • Once you've created your graph, designate an error bar data set in the worksheet, then add this data set to the graph layer using either the Layer n dialog box or the Plot Setup dialog box.

  • Select Graph:Add Error Bars when the graph window is active. This menu command does not use a worksheet data set to plot error bars. Instead, it creates error bar values by calculating either a specified percent of the data point value or the standard deviation of the data set (your choice). To learn more, see Adding Error Bars using the Add Error Bars Menu Command.


Adding Error Bars to Your Graph

There are several methods for using the values in a data set to create X and/or Y error bars in your 2D graphs. If you are creating a new graph, the simplest method is to:

  1. Designate one or more error bar columns in the worksheet. Note that the error bar data column should be to the right of the data column with which it is associated.

  2. Select both your Y data and your error bar data.

  3. Choose your 2D plot type (scatter, line & symbol, column/bar, etc.).

(This method is detailed in the online Tutorial 2: Worksheets, Data Import and Plotting).

or

  1. Use the Plot Setup (Origin worksheet) or the Select Data for Plotting (Excel workbook) dialog boxes to plot a data set as error bars. Note that these two dialog boxes allow you to create error bars from a data set , independent of the error bar data set's plot designation.

Note that it is possible to use these data sets to add error bars to new or existing graphs.


Adding an Error Bar Data Set to the Worksheet

Error bars can also be added to an existing graph window by creating an error bar column in the worksheet, filling the column with values, and adding the error bar data set to the layer using the Layer n dialog box.

To add error bars to the graph via the Layer n dialog box:

  1. Insert or add a column in the worksheet for your error bar data. This column should be to the right of your Y data set.

  2. Designate the column as an error bar column.

  3. Hold down the ALT key and double-click on the layer icon in the upper left corner of your graph window (For multi-layer graphs, be sure to click on the layer icon for the layer that contains the data points to which you want to add error bars). This opens the Layer n dialog box.

  4. Highlight the error bar data set in the Available Data list of the Layer n dialog box.

  5. Click the [image] button to move the error bar data set to the Layer Contents.

  6. Click OK to add the error bars to the data plot.

Note: The Plot Setup dialog box allows you to add data sets -- including error bar data sets -- to an existing graph window. For more information, see Plot Setup: Adding, Removing or Replacing Plots in a Graph Window.


Adding Error Bars using the Add Error Bars Menu Command

You can add error bars to a graph without creating an error bar data set in your worksheet:

  1. Select Graph:Add Error Bars when the graph window is active.

This method creates error bar values by calculating either a specified percent of the data set value or the standard deviation of the data set.

When a data plot includes error bars, the Plot Details dialog box lists an error bars icon beneath the associated data plot icon on the left side of the dialog box. When the error bars icon is selected, an Error Bar tab displays on the right side of the dialog box. Use this dialog box to customize the appearance of error bars. See, The (Plot Details) Error Bar Tab.


Double-click on the layer icon for the layer containing the data plot to which you want to add error bars. This opens the Plot Setup dialog box.

Use the [image] and [image] buttons, as necessary, to show all three panels of the dialog box.

Click OK to close the dialog box and add error bars to the data plot.

Adding Error Bars using the Plot Setup Dialog Box

You can use the Plot Setup dialog box to add error bars from a worksheet data set to a new or existing data plot. Any worksheet data set can be used to create the error bars, independent of the error bar data set's Plot Designation.

To add error bars using the Plot Setup dialog box

  • To add error bars to an existing plot:

  • To designate an error bar data set as you are creating a new graph window, see Plot Setup: Creating a Simple Graph.


How does the Data List Display an Error Bar Data Plot?

When an error bar data set is added to a data plot, Origin adds a new "data plot item" to the data list at the bottom of the Data menu. Like all data plots in the data list, this new entry contains a primary data set (the rightmost data set). In this case, the primary data set is the selected error bar column.

Origin adds the extra data plot to the data list to simplify editing the respective data plot elements.

Thus, if a check displays next to the listed data plot which contains the Y primary data set, select this data plot from the data list to open the data plot tab (for example, Symbol) of the Plot Details dialog box. Additionally, select Format:Plot to open the dialog box.

If a check displays next to the listed data plot which contains the yEr (or xEr) primary data set, select this data plot from the data list to open the Error Bar tab of the Plot Details dialog box. Additionally, select Format:Plot to open the dialog box.


Select the Percent of Data (%) radio button to create error bars based on a percentage of each plotted data point. Enter the percent value in the associated text box. Origin calculates n% of each Y column value (for the plotted data). An error bar column is added to the worksheet to the immediate right of the active data plot's Y column (primary data set). The Percent of Data values are placed in the corresponding rows of this column. If a worksheet doesn't exist, it is created. Columns are created for each data set in the layer. An error bar column is created to the immediate right of the primary data set.

Select the Standard Deviation of Data radio button to calculate the standard deviation of the primary data set in the data plot. Origin adds an error bar column to the immediate right of the active data plot's primary data set column in the worksheet. The calculated standard deviation value is added to each cell (up to the maximum row number of the associated data set). The standard deviation is used as the source of the error bars in the data plot.

Reference: The Add Error Bars Dialog Box

Dialog Box Controls (see figure)


Plotting Functions

Origin provides a tab on the Plot Details dialog box for defining and plotting functions. Functions can be plotted into one of Origin's standard graph templates or into a custom function graph window that provides additional plotting controls.

Note: Origin's programming language, Origin C, provides general support for functions. To learn about Origin C, see the Programming Guide Help file.

Plotting a Function into a Graph Window

Plotting a Function into a Function Graph Window

Creating a Data Plot or Data Sets from a Plotted Function

Changing the Function Formula


Specify the number of data points to display in the function graph from this combination box.

Select this check box to view the function graph in the graph window.

Common mathematical and statistical distribution functions are available from the function drop-down list. The view box to the left of the drop-down list displays a function summary including the required arguments for the currently selected function. After you select a function from the drop-down list, click the Add button to display the function in the Fn text box.

In addition to accessing common built in functions with the function drop-down list/Add button, you can type a function directly in the text box using any operators recognized by Origin. For multiplication, you must include the multiplication operator (*). Additionally, you can type in any of Origin's built-in functions that aren't available from the drop-down list, or any functions that you have defined.

The Undo button is provided to return the text in the Fn text box to the previous display. Thus, click this button to return one step in your editing process.

To complete the editing process, click the Apply or OK button.

Plotting a Function into a Graph Window

To add a function to the active graph window:

  1. Select Graph:Add Function Graph.

This menu command opens the Function tab of the Plot Details dialog box. The as-yet-undefined function and its position in the graph window element hierarchy are visible in window on the left side of the Plot Details dialog box. Use the Function tab controls to define the function.

The (Plot Details) Function Tab (see figure)

The Density (Total Points) Combination Box

The Display Curve Check Box

The Function Controls and Function (Fn) Text Box


Click this button to add a new function graph to the window. This action opens the (Plot Details) Function tab. For information on using this tab, see Plotting a Function into a Graph Window.

Click this button to rename the active function.

To make a function active, right-click on the function and select Set as Active from the shortcut menu. If the command is unavailable, the function is currently active. Alternatively, select the desired function from the data list at the bottom of the Data menu or at the bottom of the layer shortcut menu. A check displays next to the active function (or data plot).

Switch between displaying Cartesian and polar coordinates. When the function graph is displayed with polar coordinates, the Set Angular Range button is available. Click Set Angular Range to open the Angular Range dialog box. Specify the starting and ending angular values, as well as the angular increment. In addition to setting the angular range, two buttons are provided to display the polar coordinates in a clockwise or counterclockwise orientation.

Click this button to rescale the axes, if needed. For example, click this button after magnifying the function graph with the Enlarger tool from the Tools toolbar.

Plotting a Function into a Function Graph Window

Origin has a special graph template that is designed for displaying and manipulating function plots. To plot a function into this special template:

  1. Click the New Function [image] button on the Standard toolbar. This action opens a Functionn graph window as well as the Function tab of the Plot Details dialog box. For information on defining your function in the (Plot Details) Function tab, see Plotting a Function into a Graph Window.

Edit this graph by double-clicking or right-clicking on any element in the graph. Additionally, you can use the controls at the top of the window to customize the function graph.

The New Function Button

The Rename Button

The Polar/Cartesian Button

The Rescale Button


Creating a Data Plot or Data Sets from a Plotted Function

  1. Right-click on the function and select Make Dataset Copy of Function from the shortcut menu. A dialog box opens requesting you enter a Y data set name for the data plot.

It is recommended that you use the following syntax when typing the Y data set name:

WorksheetName_ColumnName

For example, type:

Function_Test1

Should you create a worksheet from the data plot, this notation ensures that the Y column will be properly named.

  2. Type the Y data set name, click OK to close the dialog box. A FuncCopy graph window opens displaying the data plot derived from your function graph. The data plot contains the number of points specified in the Density combination box on the (Plot Details) Function tab.

After you create a data plot from your function graph...

  1. Right-click on the data plot and select...

Create Worksheet DatasetName

...from the shortcut menu. Origin opens a worksheet displaying the Y data set for the data plot. Origin names the worksheet and Y data set based on the name you specified for the data plot's Y data set (when you created a data plot from the function).

  2. To display the data plot's X data set in the worksheet, select View:Show X Column.

Creating a Data Plot or Data Sets from a Plotted Function

A function graph displays a curve described by a specified formula. The function graph has no discreet values associated with it. However, you can create a data plot or a worksheet with X and Y data sets from a function graph. To create a worksheet, first create a data plot from the function.

To create a data plot from a function:

To create a worksheet from the newly created data plot:


Changing the Function Formula

To change the function formula:

  1. Double-click on the function in the function graph window to re-open the (Plot Details) Function tab.

  2. Edit the formula in the Fn text box and click OK or Apply.


Graphing: Types

  • 2D Scatter Graph

  • Line Graph

  • Line+Symbol Graph

  • Vertical Drop Line Graph

  • Spline Connected Graph

  • 2 Point Segment Graph

  • 3 Point Segment Graph

  • Vertical Step Graph

  • Horizontal Step Graph

  • Line Series Graph

  • Bar Graph

  • Column Graph

  • Floating Bar Graph

  • Floating Column Graph

  • Stack Bar Graph

  • Stack Column Graph

  • Area Graph

  • Fill Area Graph

  • Polar Graph

  • 2D Waterfall Graph

  • X, Y, Angle, Magnitude Vector Graph

  • X, Y, X, Y Vector Graph

  • Histograms

  • Box Charts

  • QC Charts

  • 4 Panel Graph

  • 9 Panel Graph

  • Double Y Axis Graph

  • Horizontal 2 Panel Graph

  • Vertical 2 Panel Graph

  • Stack Graph

  • Color Mapped Graph

  • Indexed Size (Bubble) and Color Map Graph

  • Indexed Size (Bubble) Graph

  • 3D Bar Graph

  • Ribbon Graph

  • Wall Graph

  • 3D Waterfall Graph

  • 3D Scatter Graph

  • Trajectory Graph

  • Bars, 3D (matrix)

  • Color Fill Surface

  • Color Map Surface

  • Wire Frame

  • Wire Surface

  • X Constant with Base Surface

  • Y Constant with Base Surface

  • Black and White Lines with Labels Contour

  • Color Fill Contour

  • Gray Scale Map Contour

The Graph: Types

This section discusses all of the 2D, 3D (including surface and contour), and statistical graph types. For each graph type, we present:

  • A sample graph.

  • Data requirements (one X column, one Y column; one X column and two Y columns, etc.)

  • Steps to creating the graph.

  • Notes specific to each graph type.

Links to Origin's Built-In Graph Types:

2DScatter, Line, and Line + Symbol Graphs

2D Bar and Column Graphs

Area, Polar, and 2D Waterfall Graphs

Pie Charts

Smith Charts

Vector Graphs

High-Low-Close Charts

Statistical Graphs

Ternary Graphs

Multiple Layer Graphs

Indexed Size (Bubble) and Color Mapped Graphs

3D XYY Graphs

3D XYZ Graphs

3D Surfaces

Contour Graphs


2D Scatter Graph

Data Requirements

Select one or more Y columns or a range of data from at least one Y column. If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Scatter.

or

  2. Click the Scatter [image] button on the 2D Graphs toolbar.

Template

SCATTER.OTP (installed to the Origin program folder).


Line Graph

Data Requirements

Select one or more Y columns or a range of data from at least one Y column. If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Line.

or

  2. Click the Line [image] button on the 2D Graphs toolbar.

Template

LINE.OTP (installed to the Origin folder).


Line+Symbol Graph

Data Requirements

Select one or more Y columns or a range of data from at least one Y column. If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Line+Symbol.

or

  2. Click the Line+Symbol [image] button on the 2D Graphs toolbar.

Template

LINESYMB.OTP (installed to the Origin program folder).


Vertical Drop Line Graph

Data Requirements

Select one or more Y columns or a range of data from at least one Y column. If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Line/Symbol:Vertical Drop Line.

or

  2. Click the Vertical Drop Line [image] button on the 2D Graphs Extended toolbar.

Template

DROPLINE.OTP (installed to the Origin folder).

Notes


Each data point in the data plot is connected by a line. The line connection type is set to a spline connection on the Line tab of the Plot Details dialog box (Format:Plot). The data points are displayed as symbols.

Spline Connected Graph

Data Requirements

Select one or more Y columns or a range of data from at least one Y column. If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Line/Symbol:Spline.

or

  2. Click the Plot:Special Line/Symbol:Spline [image] button on the 2D Graphs Extended toolbar.

Template

LINESYMB.OTP (installed to the Origin program folder).

Notes


The line connection between points alternates between a straight line and no line (the connection type is set to Segment on the Line tab of the Plot Details dialog box (Format:Plot)). Thus, every two consecutive data points are connected by a line (the first and second data points, the third and fourth data points, etc.). The data points are displayed as symbols.

2 Point Segment Graph

Data Requirements

Select one or more Y columns or a range of data from at least one Y column. If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Line/Symbol:2 Point Segment.

or

  2. Click the Plot:Special Line/Symbol:2 Point Segment button on the 2D Graphs Extended toolbar.

Template

LINESYMB.OTP (installed to the Origin program folder).

Notes


The line connection display alternates between a straight line for three data points, then no line to the next data point, a straight line for three data points, etc. (the connection type is set to Segment 3 on the Line tab of the Plot Details dialog box (Format:Plot)). Thus, every three consecutive data points are connected by two lines (the first, second, and third data points; the fourth, fifth, and sixth data points; etc.). The data points are displayed as symbols.

3 Point Segment Graph

Data Requirements

Select one or more Y columns or a range of data from at least one Y column. If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Line/Symbol:3 Point Segment.

or

  2. Click the Plot:Special Line/Symbol:3 Point Segment button on the 2D Graphs Extended toolbar.

Template

LINESYMB.OTP template located in the Origin folder.

Notes


Each data point in the data plot is connected by a line. The line connection type is set to a step vertical connection on the Line tab of the Plot Details dialog box (Format:Plot). The step vertical connection creates a right angle connection between data points, with an initial vertical line. The data points are not displayed.

Vertical Step Graph

Data Requirements

Select one or more Y columns or a range of data from at least one Y column. If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Line/Symbol:Vertical Step.

or

  2. Click the Plot:Special Line/Symbol:Vertical Step button on the 2D Graphs Extended toolbar.

Template

LINE.OTP (installed to the Origin program folder).

Notes


Each data point in the data plot is connected by a line. The line connection type is set to a step horizontal connection on the Line tab of the Plot Details dialog box (Format:Plot). The step horizontal connection creates a right angle connection between data points, with an initial horizontal line. The data points are not displayed.

Horizontal Step Graph

Data Requirements

Select one or more Y columns or a range of data from at least one Y column. If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Line/Symbol:Horizontal Step.

or

  2. Click the Plot:Special Line/Symbol:Horizontal Step button on the 2D Graphs Extended toolbar.

Template

LINE.OTP (installed to the Origin program folder).

Notes


After clicking the Line Series button, Origin creates a new (hidden) worksheet, LineSeriesn. This worksheet includes two columns that contain the selected Y column numbers (1, 2, or 3) and the associated cell values.

Line Series Graph

Data Requirements

Select two or three Y columns of values.

Creating the Graph

  1. Select required data.

  2. Select Plot:Special Line/Symbol:Line Series.

or

  2. Click the Line Series [image] button on the 2D Graphs Extended toolbar.

Template

LSER2.OTP (two Y columns)

LSER3.OTP (three Y columns)

Notes


2D Bar Graph

The Y value of each data point in the data plot is represented as the length of a horizontal bar. Each bar has a fixed width, and each worksheet row of bar values is centered at the associated X value. The X values plot along the vertical axis.

To establish Y=1 as the "floor", or Y value which alters the direction of bar graphs displayed on a logarithmic scale, select the Log Scale use 1 as Floor check box on the Graph tab in the Options dialog box (Tools:Options). To display a line when Y=0, select the Bar Graph Show Zero Values check box on the Graph tab of the Options dialog box (Tools:Options).

In some cases, disabling Clip Data to Frame still results in clipping of data in column/bar graphs. If this occurs, Clip Data can be defeated by typing the following line of script into the Script Window and pressing ENTER:

@CLP = 1

Bar Graph

Data Requirements

Select one or more Y columns or a range of data from at least one Y column. If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Bar

or

  2. Click the Bar button [image] on the 2D Graphs toolbar.

Template

BAR.OTP (installed to the Origin program folder).

Notes


The Y value of each data point in the data plot is represented as the height of a column. Each column has a fixed width, and each "X group" of columns is centered at the associated X value.

To establish Y=1 as the "floor", or Y value which alters the direction of column graphs displayed on a logarithmic scale, select the Log Scale use 1 as Floor check box on the Graph tab in the Options dialog box (Tools:Options).

To display a line when Y=0, select the Bar Graph Show Zero Values check box on the Graph tab of the Options dialog box (Tools:Options).

In some cases, disabling Clip Data to Frame still results in clipping of data in column/bar graphs. If this occurs, Clip Data can be defeated by typing the following line of script into the Script Window and pressing ENTER:

@CLP = 1

Column Graph

Data Requirements

Select one or more Y columns or a range of data from at least one Y column. If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Column.

or

  2. Click the Column button [image] on the 2D Graphs toolbar.

Template

COLUMN.OTP (installed to the Origin program folder).

Notes


The floating bar graph displays Y values as beginning, intermediate, and ending bar levels for each X value. The X values plot along the vertical axis.

The first Y data set provides the starting Y position for each bar graph. The second Y data set provides an intermediate level and defines a bar between the starting position and the current position. The third (fourth, etc.) Y data set provides an additional intermediate value and defines a bar between the previous intermediate value and the current value. The final Y data set provides an ending value and defines a bar between the previous intermediate value and the current value.

Floating Bar Graph

Data Requirements

Select at least two Y columns of values (or a range from at least two columns). If there is an X column to the left of the Y columns, the X column values are used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Bar/Column:Floating Bar

or

  2. Click the Floating Bar [image] button on the 2D Graphs Extended toolbar.

Template

FLOATBAR.OTP (installed to the Origin program folder).

Notes


The floating column graph displays Y values as beginning, intermediate, and ending column levels for each X value.

The first Y data set provides the starting Y position for each column graph. The second Y data set provides an intermediate level and defines a column between the starting position and the current position. The third (fourth, etc.) Y data set provides an additional intermediate value and defines a column between the previous intermediate value and the current value. The final Y data set provides an ending value and defines a column between the previous intermediate value and the current value.

Floating Column Graph

Data Requirements

Select at least two Y columns of values (or a range from at least two columns). If there is an X column to the left of the Y columns, the X column values are used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Bar/Column:Floating Column.

or

  2. Click the Floating Column [image] button on the 2D Graphs Extended toolbar.

Template

FLOATBAR.OTP (installed to the Origin program folder).

Notes


For each X value, the associated Y values are represented as the length of a bar. Each bar has a fixed width. The bars, however, are stacked on each other so that the second bar segment begins at the end of the first bar, etc. The stack of bars is centered at the associated X value. The X values plot along the vertical axis. To unstack the bars, select Graph:Stack Grouped Data in Layer (to de-select the menu command).

To display a line when Y=0, select the Bar Graph Show Zero Values check box on the Graph tab of the Options dialog box (Tools:Options).

Stack Bar Graph

Data Requirements

Select at least one Y column of values (or a range from at least one column). If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet's default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Bar/Column:Stack Bar

or

  2. Click the Stack Bar [image] button on the 2D Graphs Extended toolbar.

Template

BAR.OTP (installed to the Origin program folder).


For each X value, the associated Y values are represented as the height of a column. Each column has a fixed width. The columns, however, are stacked on each other so that the second column begins at the end of the first column, etc. The stack of columns is centered at the associated X value. To unstack the columns, select Graph:Stack Grouped Data in Layer (to de-select the menu command).

To display a line when Y=0, select the Bar Graph Show Zero Values check box on the Graph tab of the Options dialog box (Tools:Options).

Stack Column Graph

Data Requirements

Select at least one Y column of values (or a range from at least one column). If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet's default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Bar/Column:Stack Column.

or

  2. Click the Stack Column [image] button on the 2D Graphs Extended toolbar.

Template

COLUMN.OTP (installed to the Origin program folder).


Y Error Bar Graph

Data Requirements

Select two Y columns or a range of data from two Y columns. The left-most Y column supplies the Y values, the rightmost column supplies the Y error bar values.

If the Y columns have an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Line/Symbol:Y Error.

or

  2. Click the Y Error [image] button on the 2D Graphs Extended toolbar.

Template

ERRBAR.OTP (installed to the Origin program folder).


XY Error Bar Graph

Data Requirements

Select three Y columns or a range of data from three Y columns. The left-most Y column supplies the Y values, the middle column supplies the X error bar values and the rightmost column supplies the Y error bar values.

If the Y columns have an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Special Line/Symbol:XY Error.

or

  2. Click the XY Error [image] button on the 2D Graphs Extended toolbar.

Template

ERRBAR.OTP (installed to the Origin program folder).


When one Y column of values (or a range from one column) is selected, the area between the data plot and the "From" Y axis value is filled by default. When more than one Y column of values (or a range from more than one column) is selected, each successive column of values displays as an area graph that is stacked on the previous area graph. Thus, the upper bounds of the previous area graph becomes the baseline of the next area graph. To plot each of the data plots so that the area between the data plot and the "From" Y axis value is filled, select Graph:Stack Grouped Data in Layer (to de-select this command).

Area Graph

Data Requirements

Select at least one Y column of values (or a range from at least one column). If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. Select Plot:Area

or

  2. Click the Area [image] button on the 2D Graphs toolbar.

Template

AREA.OTP (installed in the Origin program folder).


Fill Area Graph

Data Requirements

Select two Y columns of values (or a range from two columns). If there is an X column to the left of the Y columns, the X column values are used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, select Plot:Fill Area.

or

  2. Click the Fill Area [image] button on the 2D Graphs toolbar.

Template

FILLAREA.OTP (installed to the Origin program folder).

Notes


Polar Graph

The polar graph plots radial position (Y) versus the angular value (X). Units are in degrees.

The graph window has three buttons:

  • Click Set Angular Range to modify the starting and ending angular values, as well as the increment.

  • Click 90 ¬ 0 to set the first angular value at "3 o'clock" and increment counterclockwise.

  • Click 0 ® 90 to set the first angular value at "12 o'clock" and increment clockwise.

Select Fixed from 0 to display the polar graph with the center of the graph representing a Y value of 0. Select Use Y-Axis Range to display the polar graph with the center of the graph representing the Y axis scale “From” text box value (on the Scale tab of the Axis dialog box).

To Modify the Angular Range

To Modify the Circular Grids

To Modify the Radial Grids

  1. Click Set Angular Range to open the Angular Range dialog box.

  2. Specify the starting and ending angular values, as well as the angular increment.

  1. Select Format:Axes:Y Axis to open the Y Axis dialog box.

  2. Select the Grid Lines tab. Horizontal is the active selection in the Selection list box. Horizontal grids are equivalent to circular grids in a polar graph. To customize the circular grids, make modifications to this tab when Horizontal is selected from the Selection list box.

  1. Select Format:Axes:X Axis to open the X Axis dialog box.

  2. Select the Grid Lines tab. Vertical is the active selection in the Selection list box. Vertical grids are equivalent to radial grids in a polar graph. To customize the radial grids, make modifications to this tab when Vertical is selected from the Selection list box.

Polar Graph

Data Requirements

Select at least one Y column (or a range from at least one Y column). If the Y column(s) has an associated X column, then the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. Select Plot:Polar.

or

  2. Click the Polar [image] button on the 2D Graphs toolbar.

Template

POLAR.OTP (installed to the Origin program folder).

Note: To learn more polar graphs, review the POLAR.OPJ project located in your Origin \SAMPLES\GRAPHING\2D PLOTS folder.

Notes


The waterfall graph is ideal for comparing variations between multiple data sets created under similar conditions. The graph has a pseudo-3D effect, enabling you to see variations in the Z direction.

Each data set is displayed as a line data plot which is offset by a specified amount in both the X and Y direction. To adjust the data plot offset, click the Offset Amount button in the graph window. This action opens a dialog box in which you control the offset. Select or clear the offset from the XY Offset drop-down list. Specify the Y offset in the Total Y Offset (%) text box. Specify the X offset in the Total X Offset (%) text box.

Click the Reverse Order button in the graph window to switch the order in which the data sets are plotted. Thus, the first data set is plotted last, the last data set is plotted first, etc., providing a different perspective on data set relations.

To fill the area below each line data plot, click the Fill Area button in the graph window. This action opens a dialog box in which you control the fill display. Select the Enable Fill check box to fill the area beneath the data plot with the color specified from the Fill with Color drop-down list. Select the Side Lines check box to display vertical drop lines at the first and last data points in each of the data plots (using the specified fill color).

Note: You can also control the fill from the Plot Details dialog box.

2D Waterfall Graph

Data Requirements

Select at least one Y column (or a range from at least one Y column). Ideally, select at least two Y columns (or a range of at least two Y columns). If the Y column(s) has an associated X column, the X column supplies the X values; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, choose Plot:Special Line/Symbol:Waterfall

or

  3. Click the Waterfall [image] button on the 2D Graphs Extended toolbar.

Template

WATERFAL.OTP (installed to the Origin program folder).

Notes


The selected values are summed, and the percentage of the total is determined for each selected value. The pie chart displays the percentage of the total for each selected value as a pie section.

To remove the rectangular frame from the pie chart:

  1. From the menu, select Format:Layer.

  2. Select the Display tab and clear X Axes and Y Axes in the Show Elements group.

  3. Click Apply or OK.

Pie Charts

Data Requirements

Select exactly one Y column of values (or a range from one column).

Creating the Graph

  1. Select required data.

  2. From the menu, choose Plot:Pie

or

  2. Click the Pie Chart [image] button on the 2D Graphs toolbar.

Template

PIE.OTP (installed to the Origin program folder).

Note: To learn more about pie charts, review the 3D PIE CHART.OPJ project located in your Origin \SAMPLES\GRAPHING\3D PLOTS folder.

Notes


Smith Charts

Data Requirements

Requires a selection of at least one Y column of values (or a range from at least one column). If the Y column(s) has an associated X column, then the X column supplies the X values. Otherwise, the worksheet’s default X values are used.

Creating the Graph

Select Plot:Smith Chart or click the Smith Chart button on the 2D Graphs toolbar.

Template

The Smith Chart graph is created from the SMITHCHT.OTP template located in the Origin folder.

Notes

To customize the Smith Chart, edit the Plot Details and Axes dialog boxes. Additionally, click the [image] button to open the Smith Chart tool.

The Normalization Group

Re-normalize the current Smith Chart by entering or selecting a factor from the Factor combo box. Click Normalize to perform the normalization.

The Current Active Data Set Group

If you have plotted multiple data sets into the Smith Chart, the "Convert Data to Mag / Angle" and the "Reinterpret Data as Mag / Angle" buttons act on the active data plot. You can change the active data plot in the Smith Chart from the Data menu or by selecting the data plot icon in the legend. To update the Smith Chart tool with this change, click the Update button on the tool. (Note: R = real part, X = imaginary part)

The "Convert Data to Mag / Angle" Button

Click this button to convert the active data plot into the Mag / Angle format and put the data in the source worksheet.

The "Reinterpret Data as Mag / Angle" Button

Click this button to treat the active data plot as the Mag / Angle format, and convert the data into R / X format. The data is then re-plotted.

The "Reverse R Axis" Button

Click this button to reverse the real part axis of the Smith Chart.

The Constant SWR Circle Group

Given the point position specified, select the circle point density and the line color. Click the Add button to add a constant SWR circle through the given point.


The leftmost Y column controls the Y coordinate of the vector tail (by default). The second Y column determines the angle of the vector. The angle is measured counterclockwise from a line parallel to the X axis, bisecting the vector. The third Y column controls the vector length in units of points. The Plot Details dialog box provides a control to scale the length of the vector (Format:Plot).

X, Y, Angle, Magnitude Vector Graph

Data Requirements

Select three Y columns (or a range from three Y columns). If there is an X column to the left of the Y columns, the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. Select Plot:Vector XYAM.

or

  2. Click the Vector XYAM [image] button on the 2D Graphs toolbar.

Template

VECTOR.OTP (installed to the program folder).

Notes


X, Y, X, Y Vector Graph

Data Requirements

Select two X columns and two Y columns (or a range from these columns).

Creating the Graph

  1. Select required data.

  2. Select Plot:Vector XYXY.

or

  2. Click the Vector XYXY [image] button on the 2D Graphs toolbar.

Template

VECTXYXY.OTP (installed to the Origin program folder).

Notes


The chart displays the high and low Y values for a given X value. These values are connected by a vertical line (the data points aren't displayed). The close Y value for a given X value displays as a tick mark on the vertical line.

High-Low-Close Charts

Data Requirements

Select exactly three Y column of values (or a range from three columns). The leftmost Y column contains the high values, the middle Y column displays the low values, and the rightmost Y column displays the closing values. If there is an X column to the left of the Y columns, the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. Select Plot:High-Low-Close.

or

  3. Click the High-Low-Close [image] button on the 2D Graphs toolbar.

Template

HLCLOSE.OTP (installed to the Origin program folder).

Notes


Creating Histograms

  1. Right-click on the histogram and select Go to Bin Worksheet from the shortcut menu.

To customize the histogram display:

  1. Double-click on the histogram, or right-click and select Plot Details.

Both actions open the Plot Details dialog box with the histogram data plot icon active on the left side of the dialog box. The histogram controls are available on tabs on the right side of the dialog box. Binning behavior is determined by controls on the Data tab. Note that some Data tab controls are relevant only to the Box Chart (which shares controls on this tab with the histogram).

The (Plot Details) Data Tab Controls ( see figure)

Edit the bin limits by:

  1. Clearing the Automatic Binning check box.

  2. Edit the Bin Size, and the Begin and End values.

To overlay a distribution curve on the binned data (the histogram):

  1. Select Normal, Lognormal, Poisson, Exponential, Laplace, or Lorentz from the Type drop-down list. The Preview window displays your selection.

Note that curves selected from the Type drop-down list are not "fitted" to your data. Instead, Origin looks for the mean of the data, then overlays the curve, placing the mean at the same location. If the curve is a two parameter curve, Origin takes into account the standard deviation of the curve.

The Scale combination box controls the curve's use of the drawing space in the X direction; for instance, if you select 100 from the drop-down list, then all the drawing space in the X direction will be used (the curve will be wider). If you have 50 selected, then the curve will only take up half of the allocated drawing space (the curve will be narrower).

To create a histogram with probabilities:

  1. Highlight a single worksheet column (or a range from a worksheet column) and select Plot:Statistical Graphs:Histogram + Probabilities.

This menu command is nearly identical to the Histogram menu command, except that the template invoked by this command (HISTCUMU.OTP) also displays a cumulative sum of the data (layer 2).

Additionally, the Histogram + Probabilities menu command types the statistical results -- the mean, the standard deviation, the maximum and minimum values, and the total number of values -- to the Results Log.

Creating Histograms

A histogram displays the number of times a data value in a selected column fell within a specified bin.

To create a histogram:

  1. Highlight one or more Y worksheet columns (or a range from one or more Y columns).

  2. Select Plot:Statistical Graphs:Histogram.

Origin automatically calculates the bin size and creates a new graph from the HISTGM.OTP template. The binned data is saved in a Binn worksheet. This worksheet contains the bin X values, counts, cumulative sum, and percentages.

To access the Binn worksheet:

To customize the histogram:

To create a histogram with probabilities:

Note: The Histogram menu command plots each selected data set in the same layer. The Stacked Histograms menu command (Plot:Statistical Graphs:Stacked Histograms) plots each selected data set in its own layer (using the same bin limit for each layer).

To learn more about histograms, review the HISTOGRAM.OPJ project located in your Origin \SAMPLES\GRAPHING\STATISTICAL GRAPHS folder.


Creating Box Charts

To customize the box chart display:

  1. Double-click on the box chart.

or

  1. Right-click and select Plot Details. Both actions open the Plot Details dialog box with the box chart data plot icon active on the left side of the dialog box. The box chart controls are available on tabs on the right side of the dialog box.

The Box Tab on the Plot Details Dialog Box

The Data Tab on the Plot Details Dialog Box

The Percentile Tab on the Plot Details Dialog Box

By default, the box chart displays only the box - not the binned data. You can, however, display the box and binned data, or only the binned data. The binned data is saved in a Binn worksheet. This worksheet contains the bin X values, counts, cumulative sum, and percentages.

To access the Binn worksheet:

  1. Right-click on the box chart and select Go to Bin Worksheet from the shortcut menu.

To display the binned data with the box chart, or only the binned data, select the desired display from the Type drop-down list. When you select a display that includes the binned data, the Plot Details Data tab becomes available for editing the bins and overlaying a distribution curve.

The Box group and the Whiskers group control the display of the box and whiskers. Select the desired percentiles or other values to represent the box or whiskers.

Outliers, diamond box, and box and whisker labels are activated by selecting the associated check boxes on the Box tab.

The Data tab is available when you select a box chart display that includes the binned data from the Type drop-down list on the Box tab. Edit this tab to control the display of binned data.

Select Dots, Bars, or Dots and Bars from the Type drop-down list. Dots shows the individual binned data points and bars shows a histogram-like representation of the data, with bars of the specified bin size.

Select the Single Block Bar Plot check box to remove the lines between bins when Bars is selected from the Type drop-down list. Select the Snap Points to Bin check box to align the binned data points horizontally in the bins.

Edit the bin limits by clearing the Automatic Binning check box and editing the associated text boxes.

Overlay a distribution curve on the binned data by selecting Normal, Lognormal, Poisson, Exponential, Laplace, or Lorentz from the Type drop-down list. The Preview window displays your selection.

Curves selected from the Type drop-down list are not "fitted" to your data. Instead, Origin determines the data mean, then overlays the curve so that means coincide. If it is a two parameter curve, Origin takes into account the standard deviation of your data.

The Scale combination box in the Curve group controls use of the drawing space in the X direction. For instance, if you have 100 selected from this drop-down list, then all the drawing space in the X direction will be used (the curve will be wider). If you have 50 selected, then the curve will only use half of the allocated drawing space (the curve will be narrower).

The Percentile tab provides controls for customizing the symbols for various percentiles in the box chart. Click the down arrow next to the symbol you want to change. Select the desired symbol from the symbol gallery that opens.

Creating Box Charts

To create a box chart, highlight one or more Y worksheet columns (or a range from one or more Y columns) and select Plot:Statistical Graphs:Box Chart.

Each Y column of data is represented as a separate box. The column names or labels supply the X axis tick labels. By default, the box is determined by the 25th and 75th percentiles. The whiskers are determined by the 5th and 95th percentiles.

Note: To learn more about box charts, review the BOX CHART.OPJ project located in your Origin \SAMPLES\GRAPHING\STATISTICAL GRAPHS folder.

Customizing the Box Chart


Creating QC Charts

  1. Highlight at least one column of values (or a range from at least one column) and select Plot:Statistical Graphs:QC (X bar R) Chart. Origin opens the X bar R Chart dialog box.

  2. Specify the subgroup size for the selected data set.

Origin creates a worksheet and graph window displaying two layers. The worksheet contains the mean, range, and standard deviation for each subgroup in the selected data set.

The upper layer of the QC chart is the X bar graph. This layer displays the mean value for each of the subgroups as a scatter graph with drop lines to the average of the mean for each group (X bar). This layer also displays two limit lines that are positioned Num Sigma standard deviations away from the X bar. Num Sigma is defined in the QC1 worksheet window and is three by default.

The lower layer of the QC chart is the R chart. This layer displays the range for each of the subgroups as a column graph. The range for each of the subgroups is plotted from the average line (or R bar). This line represents the groups average range, or the average of the mean range within each subgroup. This layer also displays two limit lines - the UCL and LCL lines. For information on the calculations for the UCL and LCL lines, see "Statistical Quality Control" 5th edition (1980) by Grant, E.R. and Leavenworth, R.S., McGraw Hill, pg 81.

Edit the desired text boxes in the QC1 worksheet, then click the Make QC Chart button.

To display multiple QC charts, type a new window name in the Graph Window text box.

To create a QC chart from more than one data set in the worksheet:

  1. Highlight the desired worksheet columns and select Plot:Statistical Charts:QC (X bar R) Chart.

An Attention dialog box informs you that a group is defined for each row, which extends over the selected column range.

Creating QC Charts

QC charts are used to study the fluctuation of data in a continuous process.

To create a QC chart

To create a new QC chart based on the original worksheet

To Create a QC Chart from Multiple Data Sets

Note: To learn more about QC charts, review the QC CHART.OPJ project located in your Origin \SAMPLES\GRAPHING\STATISTICAL GRAPHS folder.


Ternary Graphs

Ternary diagrams are used to represent the relative percentages (default is expressed as decimal) of three components (X, Y, and Z). Each worksheet row of X, Y, and Z values determines a data point in the ternary diagram.

  • Values for the Y component are read from 0.00 at the lower-right corner of the triangle, to 1.00 at the peak of the triangle.

  • Values for the Z component are read from 1.00 at the lower-left corner of the triangle, to 0.00 at the peak of the triangle.

  • Values for the X component are read from 0.00 at the lower-left corner of the triangle to 1.00 at the lower-right corner of the triangle.

When plotting XYZ data as a ternary diagram, Origin assumes that each row of X, Y, and Z values are normalized (so that X+Y+Z = 1). If your data are not normalized, Origin will do this for you. When you normalize your worksheet data for the ternary diagram, the Data Reader tool reads the actual X, Y, and Z worksheet values in the diagram.

To display the axis scales in percentages (0% to 100%):

To display data points outside of the plot axes:

  1. From the menu, choose Format:Axis Tick Labels:Axis....

  2. On the Tick Labels tab, specify a Divide By Factor of 0.01.

  3. Click Apply or OK.

  1. Click on your ternary graph to activate the graph window.

  2. Choose Format: Layer from the menu.

  3. Select the Display tab.

  4. In the Data Drawing Options group, select Show Points Outside Triangle.

Ternary Graphs

Data Requirements

Select one Z column of values (or a range from one Z column). The worksheet must also contain Y column values (and typically X column values). If there is an X column to the left of the Y column, the X column values are used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, choose Plot:Ternary.

or

  2. Click the Ternary [image] button on the 2D Graphs toolbar.

Template

TERNARY.OTP (installed to the Origin program folder).

Note: To learn more about the ternary diagram, review the TERNARY.OPJ project located in your Origin \SAMPLES\GRAPHING\2D PLOTS folder.

Notes


4 Panel Graph

Data Requirements

Select at least one Y column of values (or a range from at least one column). Ideally, select four Y columns of values. If the Y column(s) has an associated X column, then the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. Select Plot:Panel:4 Panel.

or

  2. Click the 4 Panel [image] button on the 2D Graphs Extended toolbar.

Template

PAN4.OTP (installed to the Origin program folder).

Notes


9 Panel Graph

Data Requirements

Select at least one Y column of values (or a range from at least one column). Ideally, select nine Y columns of values. If the Y columns have an associated X column, then the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. Select Plot:Panel:9 Panel.

or

  2. Click the 9 Panel [image] button on the 2D Graphs Extended toolbar.

Template

PAN9.OTP (installed to the Origin program folder).

Notes


The double Y axis graph contains two layers:

  • Layer 2 is linked to layer 1.

  • The X axis in layer 2 has a straight one-to-one link with the X axis in layer 1.

If two columns of values are selected (or a range of two columns), then one data plot displays in each layer. Each data point in the data plot is connected by a line. The default line connection between points is a straight line. The data points are displayed as symbols.

Double Y Axis Graph

Data Requirements

Requires a selection of at least two Y columns (or a range from at least two columns). If there is an X column to the left of the Y columns, the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select the required data.

  2. Select Plot:Special Line/Symbol:Double Y

or

  2. Click the Double Y Axis [image] button on the 2D Graphs Extended toolbar.

Template

DOUBLEY.OTP (installed to the Origin program folder).

Notes


Horizontal 2 Panel Graph

Data Requirements

Select at least one Y column of values (or a range from at least one column). Ideally, select two Y columns of values. If the Y columns have an associated X column, the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select the required data.

  2. From the menu, select Plot:Panel:Horizontal 2 Panel.

or

  2. Click the Horizontal 2 Panel [image] button on the 2D Graphs Extended toolbar.

Template

PAN2HORZ.OTP (installed to the Origin program folder).

Notes


Vertical 2 Panel Graph

Data Requirements

Select at least one Y column of values (or a range from at least one column). Ideally, select two Y columns of values. If the Y columns have an associated X column, then the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, choose Plot:Panel:Vertical 2 Panel.

or

  2. Click the Vertical 2 Panel [image] button on the 2D Graphs Extended toolbar.

Template

PAN2VERT.OTP (installed to the Origin program folder).

Notes


Each data plot displays in its own layer in a graph window. The layers are stacked in one column. The leftmost selected data set in the worksheet displays in the lower graph layer (layer 1). The data set to the right of the leftmost data set in the worksheet displays in layer 2, etc. Each child layer is linked to layer 1. Additionally, the X axis in each child layer has a straight one-to-one link with the X axis in layer 1.

The Y axis titles display the associated worksheet column names. No tick labels or X axis titles display.

Each data point in the data plot is connected by a line.

Stack Graph

Data Requirements

Select at least one Y column (or a range from at least one Y column). Ideally, select at least two Y columns (or a range of at least two Y columns). If the Y columns have an associated X column, the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. Select Plot:Panel:Stack.

or

  1. Click the Stack [image] button on the 2D Graphs Extended toolbar.

Template

STACK.OTP (installed to the Origin program folder).

Notes


For each row, the two Y column values determine the display of the data point. The leftmost Y column provides the Y data point values. The second Y column controls the data point symbol color. Origin finds the minimum and maximum values in the second Y column, creates eight evenly sized ranges of values between the minimum and maximum values, and then associates a color with each range of values. Each data point color is determined by finding the color associated with the second Y column value in the color map.

Color Mapped Graph

Data Requirements

Select two Y columns of values (or a range from two Y columns). If there is an X column to the left of the Y columns, the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, choose Plot:Bubble/Color Mapped:Color Mapped

or

  2. Click the Color Map [image] button on the 2D Graphs Extended toolbar.

Template

SCATTER.OTP (installed to the Origin program folder).

Notes


For each row, the three Y column values determine the display of the data point. The leftmost Y column provides the Y data point values. The second Y column controls the data point symbol size in units of points. The third Y column controls the symbol color. Origin finds the minimum and maximum values in the third Y column, creates eight evenly sized ranges of values between the minimum and maximum values, and then associates a color with each range of values. Each data point color is determined by finding the color associated with the third Y column value in the color map.

Indexed Size (Bubble) and Color Map Graph

Data Requirements

Select three Y columns of values (or a range from three Y columns). If there is an X column to the left of the Y columns, the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, choose Plot:Bubble/Color Mapped:Bubble + Color Mapped.

or

  2. Click the Bubble + Color Mapped [image] button on the 2D Graphs Extended toolbar.

Template

SCATTER.OTP (installed to the Origin program folder).

Notes


For each row, the two Y column values determine the display of the data point. The first Y column provides the Y data point values. The second Y column controls the data point symbol size in units of points.

Indexed Size (Bubble) Graph

Data Requirements

Select two Y columns of values (or a range from two Y columns). If there is an X column to the left of the Y columns, the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, choose Plot:Bubble/Color Mapped:Bubble.

or

  2. Click the Bubble [image] button on the 2D Graphs Extended toolbar.

Template

SCATTER.OTP (installed to the Origin program folder).

Notes


3D Bar Graph

Data Requirements

Select at least one Y column (or a range from at least one Y column). Ideally, select at least two Y columns (or a range of at least two Y columns). If the Y columns have an associated X column, then the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, choose Plot:3D XYY:3D Bars.

or

  2. Click the XYY 3D Bars [image] button on the 3D Graphs toolbar.

Template

BAR3D.OTP (installed to the Origin program folder).

Notes


Ribbon Graph

Data Requirements

Select at least one Y column (or a range from at least one Y column). Ideally, select at least two Y columns (or a range of at least two Y columns). If the Y column(s) has an associated X column, the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, choose Plot:3D XYY:3D Ribbons.

or

  2. Click the 3D Ribbons [image] button on the 3D Graphs toolbar.

Template

RIBBON.OTP (installed to the Origin program folder).

Notes


Wall Graph

Data Requirements

Select at least one Y column (or a range from at least one Y column). Ideally, select at least two Y columns (or a range of at least two Y columns). If the Y column(s) has an associated X column, then the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

Select Plot:3D XYY:3D Walls or click the 3D Walls button on the 3D Graphs toolbar.

Template

The 3D walls graph is created from the WALLS.OTP template located in the Origin folder.

Notes

The Y value of each data point is represented as the height of a wall. Each wall has a fixed width, and is labeled with its worksheet column name on the Z axis.


3D Waterfall Graph

Data Requirements

Select at least one Y column (or a range from at least one Y column). Ideally, select at least two Y columns (or a range of at least two Y columns). If the Y column(s) has an associated X column, the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, choose Plot:3D XYY:3D Waterfall.

or

  2. Click the 3D Waterfall [image] button on the 3D Graphs toolbar.

Template

WATER3D.OTP (installed to the Origin program folder).

Notes


3D Scatter Graph

Data Requirements

Select one Z column (or a range from one Z column). If the Z column has an associated X column, then the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. Select Plot:3D XYZ:3D Scatter.

or

  2. Click the 3D Scatter Plot [image] button on the 3D Graphs toolbar.

Note: To learn more about 3D scatter graphs, review the 3D SCATTER.OPJ project located in your Origin \SAMPLES\GRAPHING\3D PLOTS folder.

Template

3D.OTP (installed to the Origin program folder).

Click here to view a multi-media demonstration


Trajectory Graph

Data Requirements

Select one Z column (or a range from one Z column). If the Z column has an associated X column, then the X column is used; otherwise, the worksheet’s default X values are used.

Creating the Graph

  1. Select required data.

  2. From the menu, choose Plot:3D XYZ:3D Trajectory.

or

  2. Click the 3D Trajectory [image] button on the 3D Graphs toolbar.

Template

TRAJECT.OTP (installed to the Origin program folder).


Bars

Data Requirements

A matrix of Z values.

Creating the Graph

  1. Click on the matrix to activate it.

  2. From the menu, choose Plot:3D Bars.

or

  2. Click the Matrix 3D Bars [image] button on the 3D Graphs toolbar.

Click here to view a multi-media demonstration

Template

3DBARS.OTP (installed to the Origin program folder).

Notes


Color Fill Surface

Data Requirements

A matrix of Z values.

Creating the Graph

  1. Click on the matrix window to activate it.

  2. From the menu, choose Plot:3D Color Fill Surface.

or

  2. Click the 3D Color Fill Surface [image] button on the 3D Graphs toolbar.

Click here to view a multi-media demonstration

Template

MESH.OTP (installed to the Origin program folder).

Notes


The Z values determine a surface of X and Y grid lines with fill colors on the front and the back of the surface. The front of the surface is filled using a color map with associated Z levels.

To learn more about 3D color map surface graphs, review the 3D SURFACE & CONTOUR.OPJ project located in your Origin \SAMPLES\GRAPHING\3D PLOTS folder.

Color Map Surface

Data Requirements

A matrix of Z values.

Creating the Graph

  1. Click on the matrix to activate it.

  2. From the menu, choose Plot:3D Color Map Surface

or

  2. Click the 3D Color Map [image] button on the 3D Graphs toolbar.

Click here to view a multi-media demonstration

Template

CMAP.OTP (installed to the Origin program folder).

Notes


Wire Frame Surface

The Z values determine a surface of X and Y grid lines.

Wire Frame

Data Requirements

A matrix of Z values.

Creating the Graph

  1. Click on the matrix to activate it.

  2. From the menu, choose Plot:3D Wire Frame.

or

  2. click the 3D Wire Frame [image] button on the 3D Graphs toolbar.

Click here to view a multi-media demonstration

Template

WIREFRM.OTP (installed to the Origin program folder).

Notes


Wire Surface

Data Requirements

A matrix of Z values.

Creating the Graph

  1. Click on the matrix to activate it.

  2. From the menu, choose Plot:3D Wire Surface.

or

  2. Click the 3D Wire Surface [image] button on the 3D Graphs toolbar.

Click here to view a multi-media demonstration

Template

WIREFACE.OTP (installed to the Origin program folder).

Notes


X Constant with Base Surface

Data Requirements

A matrix of Z values.

Creating the Graph

  1. Click on the matrix to make it active.

  2. From the menu, choose Plot:3D X Constant with Base.

or

  2. Click the 3D X Constant with Base [image] button on the 3D Graphs toolbar.

Click here to view a multi-media demonstration

Template

XCONST.OTP (installed to the Origin program folder).

Notes


Y Constant with Base Surface

Data Requirements

A matrix of Z values.

Creating the Graph

  1. Click on the matrix to activate it.

  2. From the menu, choose Plot:3D Y Constant with Base.

or

  2. Click the 3D Y Constant with Base [image] button on the 3D Graphs toolbar.

Click here to view a multi-media demonstration

Template

YCONST.OTP (installed to the Origin program folder).

Notes


Black and White Lines with Labels Contour

Data Requirements

A matrix of Z values.

Creating the Graph

  1. Click on the matrix to activate it.

  2. From the menu, choose Plot:Contour - B/W Lines+Labels.

or

  2. Click the Contour B/W Lines [image] button on the 3D Graphs toolbar.

Click here to view a multi-media demonstration

Template

CONTLINE.OTP (installed to the Origin program folder).

Notes


Color Fill Contour

Data Requirements

A matrix of Z values.

Creating the Graph

  1. Click on the matrix to activate it.

  2. From the menu, choose Plot:Contour - Color Fill.

or

  2. Click the Contour - Color Fill [image] button on the 3D Graphs toolbar.

Click here to view a multi-media demonstration

Template

CONTOUR.OTP (installed to the Origin program folder).

Notes


Gray Scale Map Contour

Data Requirements

A matrix of Z values.

Creating the Graph

  1. Click on the matrix to activate it.

  2. From the menu, choose Plot:Gray Scale Map.

or

  2. Click the Gray Scale Map [image] button on the 3D Graphs toolbar.

Click here to view a multi-media demonstration

Template

CONTGRAY.OTP (installed to the Origin program folder).

Notes


The Graph: Layers

Defining the Layer

Examples of Multi-Layer Graphs

Creating a Simple Multi-Layer Graph

Adding Layers to the Graph

Linking Layers

Arranging and Resizing Layers


Defining the Layer

The layer is one of the fundamental building blocks of the Origin graph. Typically, the layer consists of one set of controlling axes, axis labels and one or more plotted data sets. The layer may also contain other objects -- for instance, data labels, text and drawing objects, etc. -- that pertain to the data that are plotted in the layer.

Each graph window is comprised of a single graph page and that page can contain up to 50 layers. The layers on a graph page can physically overlap or they can be spatially separated. Additionally, layers can be linked spatially or mathematically such that changes in location, size or axis scale of parent layers will affect the location, size, and axis scale of child layers. Because each graph layer is a distinct entity, you have great freedom to customize and combine layers in creative ways. Understanding the layer concept is key to creating unique, powerful, and highly effective graphs.

Typical Reasons for Adding Another Layer to a Graph:

  • You wish to display the same data plot on different axis scales (Celsius vs. Fahrenheit, miles vs. kilometers).

  • You want to create multiple separate data plots and include them on the same graph page.

  • You want to create an "inset graph" that focuses on a specific region of a data plot and displays on a smaller separate set of axes within the frame of the entire data plot.

Click here to view a multi-media demonstration


Examples of Multi-Layer Graphs

Click here to view a multi-media demonstration

This line and symbol graph has two layers. Layers are stacked vertically. Each layer contains multiple data plots; the top layer contains four data sets and the bottom layer contains two.

Note that the two layers share a common X axis -- that is, the X axes for top and bottom layers are linked in a straight, one-to-one fashion. The graphs author has opted not to display the X axis scale values for the top layer.

Step-by-step instructions for creating this graph can be found at SAMPLES\GRAPHING\2D PLOTS\LINE AND SCATTER PLOTS.OPJ in the Origin program folder.

In this 2D scatter graph, three layers are superimposed. The graph's author uses color in the axis titles to help the viewer associate the each data plot with its respective axis title and axis scale.

Note, too, that the author has chosen to offset the rightmost Y axis -- the layer 3 axis -- from the layer 2 axis in order to display two different scales on the right side of the graph.

Other things to note:

  • the logarithmic scale on the left Y axis.

  • all three layers share a common X scale; X scales in layers 1, 2, and 3 are linked in a one-to-one fashion.

Step-by-step instructions for creating this graph can be found at SAMPLES\GRAPHING\2D PLOTS\LINE AND SCATTER PLOTS.OPJ in the Origin program folder.

In this 3 layer, 2D line graph, the author takes advantage of graph layer flexibility to create a primary graph and two inset graphs. The author focuses on a region of the main, red data plot to create an inset (the blue line plot) and then zooms in further to focus on a sub-region of the blue line plot (the green line plot).

Judicious use of drawing objects -- in this case arrows and curved arrows -- helps to clarify what the author has done.

Step-by-step instructions for creating this graph can be found at SAMPLES\GRAPHING\2D PLOTS\INSET.OPJ in the Origin program folder.

In this example, the author has merged four separate graphs of various types (a stacked and an unstacked bar graph, a 2D scatter and 3D Wall graph) to create a four layer, four panel graph in a single Origin graph window.

Merging and arranging Origin graphs in this way is a simple process using Origin's merge graphs feature and the Layer tool.

Step-by-step instructions for creating each of these graphs can be found at SAMPLES\GRAPHING\EXCEL DATA\EXCEL DATA.OPJ in the Origin program folder.

Follow this link for more information on merging and arranging graphs using the Layer Tool.


Creating a Simple Multi-Layer Graph

One common two-layer graph type calls for two dependent variables to be plotted against a single independent variable. In this short exercise, we will plot Wind Speed and Power against a common X axis variable -- Months of the Year. To complete the exercise:

  1. Run Origin.

  2. Click the Import ASCII [image] button on the Standard toolbar.

  3. Look in the Tutorial subfolder of the Origin program folder.

  4. Select WIND.DAT and click Open. This opens a single worksheet named WIND.

  5. Highlight the Speed(Y) and Power(Y) columns.

  6. Click the Double Y Axis [image] button on the 2D Graphs Extended toolbar.

Origin uses the built-in graph template called DoubleY to create a graph that looks something like this:

Things to note:

  • The two small gray [image] icons in the upper left corner of the graph window represent the two layers in this graph. The layer 1 icon is depressed indicating that this is the active layer.

  • The Speed data -- represented by the open square line and symbol plot -- are plotted against the left Y axis.

  • The Power data -- represented by the filled square line and symbol plot -- are plotted against the right Y axis.

  • The left-most worksheet column -- Month -- supplies the X values for both Speed and Power data sets (thus, Speed and Power share a common X axis).

  • The two graph layers are necessary because the two Y data sets -- Speed and Power -- are measured in differing units (thus, require different axis scales).

Be sure to read the section, Linking Layers.

Click here to view a multi-media demonstration


Adding Layers to the Graph

Reasons for wanting to add one or more new layers to the graph might include the following:

You wish to display the same data plot, but on different axis scales (as, for example, Celsius and Fahrenheit, or miles and kilometers).

You need to create and arrange multiple graphs within one graph window.

You would like to inset a graph within a graph.

See these examples of multi-layer graphs, created by Origin users.

There are a number of ways to add layers to your graph window. The "best" method will depend upon your particular needs:

  • If you do not intend to overlay graph layers but want, instead, to add more panels to an existing graph window, use the Add and Arrange Layers menu command.

  • If you want to overlay a fresh layer on an existing graph and link layer scales, use the New Layers (Axes) menu command or the Layer Tool.

  • If you want to convert a single layer graph with multiple data plots into a multi-panel graph with one data plot per layer (per set of axes), use the Extract to Layers button on the Graph toolbar.

  • If you would like to add layers to your graph window by merging existing graph windows, use Origin's Merge All Graph Windows feature.

  • To add an inset graph to an existing graph, use the Layer Tool.

  • You can add a layer by script.

Note: For a step-by-step discussion on building multiple layer graphs, see Tutorial 7, "Creating Multiple Layer Graphs" (Help:Tutorials).


Using the Add & Arrange Layers Menu Command

To arrange layers on the page using the Add & Arrange Layers menu command (Edit:Add and Arrange Layers):

  1. Select Edit:Add & Arrange Layers.

This menu command opens the Total Number of Layers dialog box. This dialog assumes that you want to arrange your layers in a Rows by Columns array (e.g. if you want to arrange four layers on the graph page in a two layer by two layer fashion as in this figure, you would specify Number of Rows = 2 and Number of Columns = 2).

  2. Enter Number of Rows and Number of Columns and click OK. This opens the Spacings in % of Page Dimension dialog box.

  3. Specify layer spacings as a percentage of page dimensions and click OK. If you are unsure of the desired spacing, leave the settings at the default values. Note that you re-select the Add & Arrange Layers menu command if the spacing isn't to your liking.

The Add & Arrange Layers menu command requires that you specify a “complete” layer arrangement (i.e. 1, 2, 4, 9, 16, etc.). Therefore, if you specify a three by four arrangement and only have 11 layers, Origin will request permission to create an additional layer. If you decline, Origin arranges the existing layers, leaving blank spaces to round out the required number of layers.

All layers are necessarily the same size after the arrangement process. If you require layers of non-uniform size or spacing, resize layers graphically or use the controls on the Size/Speed tab of the layer's Plot Details dialog box.

Note: If you have any child layers that are spatially linked to a parent layer (% of Linked Layer is selected from the Units drop-down list on the Size/Speed tab of the child layer's Plot Details dialog box), then Origin maintains the parent/child relationship during layer arrangement. For example, if your graph window contains five layers and layer 2 is a linked right Y axis of layer 1, then when you select Edit:Add & Arrange Layers and specify a two column by two row arrangement, Origin will arrange the layers such that layer 2 maintains its right Y position with layer 1.


Using the New Layer (Axes) Menu Command

This method is useful for adding a new set of graph axes with a scale which is linked to the first layer. Each of these menu commands creates a new layer that is linked to the active layer (the layer that was active when the menu command was selected, as indicated by the depressed layer icon). The new layer becomes a child layer of the parent (active) layer. The new child layer becomes the active layer once the operation is completed.

  • Edit:New Layer(Axes):(Linked):Top X + Right Y

  • Edit:New Layer(Axes):(Linked):Top X

  • Edit:New Layer(Axes):(Linked):Right Y

For the Edit:New Layer(Axes):(Linked):Top X and Edit:New Layer(Axes):(Linked):Right Y menu commands, the axis that is not mentioned in the menu command is not displayed. It will, however, have its scale linked one-to-one with the corresponding axis in the parent layer.

Additionally, new linked layers can be added to the graph window using the Layer tool.


Adding Layers with the Layer Tool

To open the tool:

  1. From the menu, select Tools:Layer.

  2. Click on the Add tab to access the “new layer” buttons.

  • Click the Normal X and Y button [image] to add a layer with independent axes to the active graph window.

  • Click the Linked Top X button [image] to add a linked layer displaying a top X axis. The new layer is linked to the layer that was active when the button was clicked.

  • Click the Linked Right Y button [image] to add a linked layer displaying a right Y axis. The new layer is linked to the layer that was active when the button was clicked.

  • Click the Linked Top X and Right Y button [image] to add a linked layer displaying a top X and right Y axis. The new layer is linked to the layer that was active when the button was clicked.

  • Click the Linked Inset button [image] to add a linked inset layer displaying a bottom X and left Y axis. The new layer displays as an inset in the layer that was active when the Linked Inset button was clicked. The inset layer is created with a link to this layer.

  • Click the Linked Inset with Data button [image] to add a linked inset layer displaying a bottom X and left Y axis. This button functions the same as the Linked Inset button, however the inset layer displays all the data plots that are included in the parent layer.


Converting a Single Layer Graph into Multiple Layers

To convert a single layer graph window containing multiple data plots into a multiple layer graph window:

  1. Activate the graph window and click the Extract to Layers button [image] on the Graph toolbar (View:Toolbars). This opens the Total Number of Layers dialog box. This dialog box assumes that you wish to arrange layers in a Rows by Columns array in the graph window.

  2. Specify the Number of Rows and Columns and click OK. This opens the Spacings in % of Page Dimension dialog box.

  3. Specify the page spacings (you can accept the defaults) and click OK. If you are not satisfied with the layer spacings, you can adjust layer spacings graphically or arrange them using the Layer Tool.


Adding Layers by Merging Pages

To merge separate graph pages into one graph window:

  1. Activate the graph layer that you want to designate the parent layer in the new graph window. Note that this may not be important to you.

  2. Select Edit:Merge All Graph Windows.

Any links that existed between layers before merging are preserved by the Merge All Graph Windows menu command. If a graph window contains two layers, and layer 2 is linked to layer 1, after the merge process this layer linking arrangement will still exist (although the layer numbers may change).

The Merge All Graph Windows command also preserves:

  • Your Custom axis link settings.

  • Spatial linking established by the specifying % of Linked Layer (from the Units drop-down list on the Size/Speed tab of the Plot Details dialog box).

Note: Spatial linking can sometimes produce unwanted layer arrangements in the merged graph window. We recommend removing any spatial links between layers before using the merge feature. To remove the link, open the Size/Speed tab of the Plot Details dialog box and select % of Page from the Units drop-down list.


Adding an Inset Graph

An inset graph is a layer which is added to an existing layer in a graph window. The dimensions of the inset layer are reduced so that the "host" layer remains at least partially visible in the graph window.

Though inset layers can be created manually by adjusting the position and size of two (or more) existing layers, Origin provides two buttons on the Layer tool to automatically create an inset graph.

Open the Layer tool by selecting Tools:Layer. Click on the Add tab.

  1. Click the Linked Inset button [image] to add a linked inset layer displaying a bottom X and left Y axis. The new layer displays as an inset in the layer that was active when the Linked Inset button was clicked. The inset layer is created with a link to this layer. Thus, the inset layer is the child layer of its "host" layer (or parent layer).

  2. Click the Linked Inset with Data button [image] to add a linked inset layer displaying a bottom X and left Y axis. This button functions the same as the Linked Inset button, however the inset layer displays all the data plots that are included in the "host" (or parent) layer.

Note: To learn more about inset graphs, review the INSET.OPJ project located in your Origin \SAMPLES\GRAPHING\2D PLOTS folder.


Using LabTalk to Add a Layer

You can add a layer to the active graph window by typing the following LabTalk command into the Script Window:

layer -n (ENTER)

The layer is created with the default layer size and placement. The layer is not linked to a parent layer.


Linking Layers

When referring to a controlling layer -- that is the layer to which other layers are linked -- we use the term parent layer and when referring to a subordinate layer -- that is any layer which is linked to a parent layer -- we use the term child layer. For example, if layer 4 is linked to layer 2, then layer 4 is termed the child layer and layer 2 is termed the parent layer.

Layers in a multi-layer graph or graph window do not have to be linked. However, linking graph layers can be quite useful. For instance:

  • A multi-panel graph can be configured so that when a parent layer is resized or moved, linked child layers are simultaneously resized and moved. This is particularly useful when you have created a certain spatial arrangement among graph layers and you wish to preserve this while making some adjustments to the size or position of those layers. To learn more, see Linking Layers to Control the Child Layer Position and Size.

  • Child layer linkages can be established such that changes to parent layer axis scale values will be reflected in child layer axis scale values. This could be particularly useful when zooming in on a portion of a parent layer's graph axis. In such a case, child layer axis scales would change when the parent layer's axis scales changed. To learn more, see Linking Axes Scales and Creating a Custom Link Between Temperature Scales.

It is worth mentioning that all layers need not be linked to the same parent layer. It is possible, for instance, to have a three layer graph in which layer 2 is linked to layer 1 and layer 3 is linked to layer 2. However, when resizing and repositioning linked layers, linking all child layers to a single parent layer will simplify operations.


Linking Layers to Control the Child Layer Position and Size

  1. Click the New Graph [image] button on the Standard toolbar.

  2. Select Edit:Add & Arrange Layers.

  3. In the Number of Rows text box, type 2 and click OK.

  4. Click Yes at the Attention prompt (confirm the need to create one more layer).

  5. Click OK to accept the default values in the Spacings in % of Page Dimension dialog box. You now have a two-layer graph, with the two layers stacked vertically.

  6. Press CTRL while double-clicking on the layer 2 icon in the upper-left corner of the graph window. This opens the Plot Details dialog box. The layer 2 icon is highlighted in the left-hand pane.

  7. Select the Link Axes Scales tab.

  8. From the Link To drop-down list, select Layer 1.

  9. Click the Apply button.

  10. Select the Size/Speed tab.

  11. From the Units drop-down list, select % of Linked Layer.

  12. Click OK to close the dialog box.

  13. Now click on the X axis in layer 1 (the bottom layer) to expose the layer's control handles. Drag a control handle to resize the layer. Note that when you release the mouse button, layer 2 is automatically resized.

  14. Move the pointer back to layer 1. When it becomes a 4-headed arrow, drag to move layer 1 to a new position on the graph page. Note that layer 2 moves with layer 1.

Linking Layers to Control the Child Layer Position and Size

To create a link between two layers:

  1. Click on the graph layer icon of the layer that you wish to establish as the child layer.

  2. From the menu, select Format:Layer. This opens the layer's Plot Details dialog box.

  3. Select the Link Axes Scales tab.

  4. Select Layer n from the Link To drop-down list.

  5. Click the Apply button.

Once you've linked the child layer to the parent layer, you can force the child layer to follow the size and position of the parent layer. To do this:

  6. Select the Size/Speed tab (the child layer icon should still be selected on the left side of the Plot Details dialog box).

  7. From the Units drop-down list, select % of Linked Layer.

  8. Click OK to close the dialog box.

When the link is configured in this way, changes to the parent layer's size or position will force equivalent changes in the size or position of the child layer. The spatial relationship between parent and child layers is maintained. Note that the parent layer must be the active layer, when resizing or repositioning; if a child layer is the active layer, resizing or repositioning will break the established spatial relationship.

Note: The parent layer must have a lower layer number than the child layer. If necessary, use this LabTalk command to swap layer numbers:

page.reorder(Layer1, Layer2) <ENTER>

where Layer1 and Layer2 are layer numbers of the active graph window that you wish to exchange. To learn more about issuing LabTalk commands at the command prompt, see The LabTalk Language Reference section of the Programming Help file (Help:Programming).

A Layer Linking Example


Linking Axes Scales

In addition to linking layers so that the child layer resizes and moves with the parent layer, you can also link layers so that the parent layer axis scale controls a child layer's axis scale values. To do this:

  1. Click on the child layer's icon (or the layer that you want to be the child layer) in the upper-left corner of the graph window (note that the parent layer must always have a lower layer number than the child layer).

  2. Select Format:Layer. This opens the child layer's Plot Details dialog box.

  3. Select the Link Axes Scales tab. If you have not linked this layer to a parent layer, select the parent layer from the Link To drop-down list.

To establish an axis scale link:

  • Select None to remove an existing link between the axes scales.

  • Select Straight (1 to 1) to create a link in which the child layer axes mirror the scale values of the parent layer.

  • Select Custom to create a mathematical relationship between the axes’ scales. Specify this relationship using the X1= and X2= (or Y1= and Y2=) text boxes. These variables establish the From and To values for the axes of the child layer. Type the desired mathematical relationship in these text boxes to set the initial and final scale values for the child layer in terms of the parent layer scale values. For example:

Note 1: You only have to link the X or the Y axis in a layer, without reference to the left versus right or top versus bottom axis. This is because the axes within a single layer necessarily share the same scale as they are effectively the same axis.

Note 2: The axis linking relationship is limited to the currently selected axis scale type (the Type drop-down list on the Scale tab of the Axis dialog box).

Note 3: If you add a layer to your graph by selecting either Edit:New Layer(Axes):(Linked):Right Y or Edit:New Layer(Axes):(Linked):Top X, an asterisk (*) displays in the X1 and X2 text boxes (linked right Y) or in the Y1 and Y2 text boxes (linked top X). This indicates that the link is a Straight (1 to 1) relationship.


Example: Creating a Custom Link Between Temperature Scales

The custom link option on the Link Axes Scales tab of the child layer's Plot Details dialog box is particularly useful if you want to display the same data plot on two scales, such as Celsius and Fahrenheit.

  1. Create the following worksheet.

  2. Highlight the B(Y) column and click the Scatter button [image] on the 2D Graphs toolbar.

  3. Double-click on the X axis title (graph window) to enter the text editing mode and overtype X Axis Title with Centigrade.

  4. Click OK to close the dialog box.

  5. Select Tools:Layer to open the Layer tool.

  6. Click the Add tab and select the Linked Top X button [image] to add a linked layer (Layer 2) displaying a top X axis.

  7. Double-click on the top X axis to open the X Axis - Layer 2 dialog box. Select the Title & Format tab. Type Fahrenheit in the Title text box.

  8. Click OK to close the dialog box.

  9. Press CTRL while double-clicking on the graph window's layer 2 icon (in the upper left corner of your graph window). This action opens the Plot Details dialog box for layer 2.

  10. Select the Link Axes Scales tab. In the X Axis Link group, select the Custom radio button and type the following expressions in the text boxes:

X1 = (X1*1.8)+32

X2 = (X2*1.8)+32

Origin recognizes X1 and X2 as LabTalk system variables for the From and To axis scale values, respectively. So these expressions say, in effect...

"Take the From axis scale value of layer 1, multiply it by 1.8, add 32 and use the resulting value for the From axis value of layer 2; take the To axis scale of layer 1, multiply it by 1.8, add 32 and use the resulting value for the To axis value of layer 2."

  2. Click OK to close the Plot Details dialog box.


Arranging and Resizing Layers

There are a number of ways in which you can affect the size and placement of layers on the graph page. Perhaps the simplest way is to select the layer frame, then move or resize the layer graphically. You can opt to display a grid on the graph page to facilitate positioning or resizing of the layer.

If you need more precise control over the size and position of the layer, you can specify both size and position in the Layer Area group on the Size/Speed tab of the layer's Plot Details dialog box.

The Layer Tool can be very useful for positioning multiple graph panels on the graph page, for adding panels or layers -- including an inset graph -- to the graph page, or for swapping positions of graph panels in a multi-panel graph.

Using the Axis Grid

Graphically Resizing Layers on the Page

Graphically Positioning Layers on the Page

Controlling Layer Size and Position via the Plot Details dialog box

Controlling Layer Size and Position Using the Layer Tool

Exchanging Layer Positions with the Layer Tool

Overlaying Layers with the Layer Tool


Using the Axis Grid

You can enable a non-printing grid in the graph window to help you in graphically resizing or repositioning the layer. To enable the grid:

  1. Make sure that the graph window is active.

  2. From the menu, choose View:Show:Axis Grid.

A check mark next to the menu item indicates that the grid is enabled. To turn off the grid, reselect (to uncheck) the Axis Grid menu item.

Other Grid Options

  • To ensure that the layer axes are perfectly aligned with the grid, choose Format:Snap Axes to Grid, before moving the layer.

  • To control axis grid spacing, choose Tools:Options. Select the Page tab and specify (type or select) Grid Spacing for Axis.


Graphically Resizing Layers on the Page

Activate the layer frame for sizing by clicking on one of the axes in the layer. When the frame is active, a sizing box with control handles displays:

  • To graphically resize the layer frame, drag a control handle. While dragging the control handle, an outline shows the size of the layer frame. The layer frame is resized when you release the left mouse button.

  • To maintain the current aspect ratio of the layer while resizing, press and hold the CTRL key as you manipulate the control handle.

Use the axis grid to help you graphically resize or reposition the graph layer.


Graphically Positioning Layers on the Page

  1. Activate the layer frame for sizing by clicking on one of the axes in the layer. Once the frame is active, a sizing box with control handles displays:

  2. Point anywhere inside the layer frame. When the pointer becomes a four-headed arrow, drag the layer to its new position.

Use the axis grid to help you graphically resize or reposition the graph layer.


When Units = % of Page, layer size is controlled by page size.

Inch, cm, mm, pixel and point allow the user to specify exact layer position, independent of page size.

The % of Linked Layer option is only available if the active layer is linked to a parent layer. This option is especially useful for applying changes that you have made to the size or position of a parent layer, to linked child layers. To learn more, see Linking Layers to Control the Child Layer Position and Size.

Note that when the unit selection changes, the Left, Top, Height, and Width values are converted automatically.

Controlling Layer Size and Position via the Plot Details Dialog Box

Layer dimensions and position are controllable via the Size/Speed tab of the layer's Plot Details dialog box. This method is potentially more time-consuming than graphically resizing and repositioning the layer, but offers the advantage of more precise control.

To open Size/Speed tab of the Plot Details dialog box:

  1. Activate the graph window.

  2. Choose Format:Layer. The Plot Details dialog box opens. Note that the active layer icon will be highlighted in the left-hand pane of Plot Details.

  3. Select the Size/Speed tab. Layer Area settings pertain to the active layer:

  • Left determines the position of the frame relative to the left side of the page.

  • Top determines the position of the frame relative to the top of the page.

  • The Height and Width values determine the size of the frame.

Use these settings in conjunction with the Units list, to control layer size and position.

Note: Unless you have specifically chosen to offset axes, setting the size of the layer also sets the size of the axes in the layer. To specify axis width and height, select Units (for example, inch, cm, or mm) , then enter the your dimensions in the Width and Height text boxes.


Layer Size and Position Using the Layer Tool

  1. Activate the graph window.

  2. Choose Tools:Layer from the menu.

Select the Vertical Panel radio button and click the Arrange button to arrange layers vertically, using settings in the Margins group.

Select the Horizontal Panel radio button and click the Arrange button to arrange layers horizontally, using settings in the Margins group.

Use the N x M Panel radio button in conjunction with the Columns by Rows text boxes to specify the layer arrangement, using the settings in the Margins group.

  • If Add New Layers is selected, additional layers are created, as needed, to construct the Columns by Rows layer array.

  • If Add New Layers is cleared, additional layers are not created, though spaces are created on the graph page if the specified Columns by Rows array is greater than the number of layers in the graph window.

Use Vertical Gap and Horizontal Gap specify spacings between layers.

Use Top, Left, Bottom and Right to control the distance between the nearest graph layer and the edge of the graph page.

Controlling Layer Size and Position Using the Layer Tool

The Arrange tab of the Layer tool is especially useful for these layer positioning and resizing functions:

  • Arranging (and adding) layers on the page.

  • Specifying the page margins and spacings between graphs on a multi-panel graph page.

To open the Layer tool:

The Arrange tab controls

  • Layer Arrangement Group

  • Margins Group

Note: Layers added by operations performed via the Arrange tab are not automatically linked to a parent layer.


Exchanging Layer Positions with the Layer Tool

Use the Move tab on the Layer Tool to swap the positions of two layers in your graph window:

  1. Activate the graph window and select Tools:Layer.

  2. In the Move Layers group, specify Layer A and Layer B and click the Swap Layers A and B button. Note that the layers keep their original layer numbers; only positions are swapped.

If one or both of layers A and B is a child layer which is dimensionally linked to a parent layer (% of Linked Layer is selected from the Units drop-down list on the Size/Speed tab of the Plot Details dialog box), Origin will update the Layer Area group information (Left, Top, Width, and Height) on the Size/Speed tab of the linked layer's Plot Details dialog box to reflect the layer's new position.

If one or both of layers A and B is a parent layer which is dimensionally linked to a one or more child layers, swapping a parent layer's position with another layer (either parent or child layer) will cause the Units of linked child layers to revert to the % of Page setting (Units drop-down list on the Size/Speed tab of the child layer's Plot Details dialog box). Subsequent resizing or repositioning of the parent layer will not produce a commensurate resizing or repositioning of child layers unless % of Linked Layer has been re-selected for the child layers.


Overlaying Layers with the Layer Tool

To precisely overlay one graph layer with another:

  1. Open the Layer tool (Tools:Layer).

  2. Select the Move tab.

  3. Choose (or type) the number of the layer to be moved in the Layer A text box.

  4. Choose (or type) the number of the receiving layer in the Layer B text box

  5. Click the Move Layer A to B button.

Layer A moves to Layer B. Origin resizes layer A, as necessary, so that layer dimensions are equal to those of layer B. Layer A is not automatically linked to Layer B.

Note: As the layers are drawn in order according to layer number, it is possible that overlaying one layer with another may obscure elements of the underlaying layer. If this occurs, select Format:Page from the menu, select the Miscellaneous tab, and verify that Draw All Layers as a Single Composite is selected (Drawing Order group). This setting will not affect coincident data points.


Reference: The Layer Tool

  • Click the Normal X and Y button [image] to add a layer with independent axes to the active graph window.

  • Click the Linked Top X button [image] to add a linked layer displaying a top X axis. The new layer is linked to the layer that was active when the button was clicked.

  • Click the Linked Right Y button [image] to add a linked layer displaying a right Y axis. The new layer is linked to the layer that was active when the button was clicked.

  • Click the Linked Top X and Right Y button [image] to add a linked layer displaying a top X and right Y axis. The new layer is linked to the layer that was active when the button was clicked.

  • Click the Linked Inset button [image] to add a linked inset layer displaying a bottom X and left Y axis. The new layer displays as an inset in the layer that was active when the Linked Inset button was clicked. The inset layer is created with a link to this layer.

  • Click the Linked Inset with Data button [image] to add a linked inset layer displaying a bottom X and left Y axis. This button functions the same as the Linked Inset button, however the inset layer displays all the data plots that are included in the parent layer.

  • Choose the X Scale type for the added layer.

  • Choose the Y scale type for the added layer.

  • Select Vertical Panel to stack layers vertically using the Margins dimensions.

  • Select Horizontal Panel to arrange layers horizontally using the Margins dimensions.

  • Select N x M Panel to arrange layers in a Columns by Rows array using the Margins dimensions.

  • Select Add New Layers to create additional layers required to fill out the N x M Panel.

  • Use Margins group settings to specify page margins and gaps in percentage of page size.

  • Click the Arrange button to arrange layers in the active graph page according to specifications on the Arrange tab.

  • Use the Layer A and Layer B drop-down lists to specify two layers to be combined or swapped.

  • Use the 2 buttons on the bottom of the Move tab to Move or Swap Layer A and Layer B.

Reference: The Layer Tool

Dialog Box Controls


The Graph Axes

  1. Double-click on an tick label, axis grid line or axis break.

or

  1. Right-click on an axis, tick mark, tick label, or axis break.

  2. Select Scale, Tick Labels, or Properties from the shortcut menu.

or

  1. Right-click in (or near) the layer containing the axis you want to edit.

  2. Select Axis from the shortcut menu. (This shortcut menu command always opens the Axis dialog box with the X axis controls active.)

or

  1. Select Format:Axes:Axis Type or Format:Axis Tick Labels:Axis Tick Label Type.

The Graph Axes

The graph axes are a key element of your graph. The axes control the way that your data plot and they provide the necessary context by which your audience can interpret your data.

Origin allows great flexibility in customizing the graph axes. Most axis customizations are set in the Axis dialog box. This chapter will focus primarily on the manipulating the graph axes using the controls in the Axis dialog box.

To open the Axis dialog box:


General Tips on Editing Graph Axes

In this example, the selected axis is the Bottom X Axis of Layer 1.

Typical 2D graph Scale tab selections are Horizontal or Vertical but the Title & Format tab settings for the same graph are Top, Bottom, Left, and Right. This is because a single 2D layer can have only one X (or one Y) scale, but could certainly display both Top X and Bottom X (or Left Y and Right Y) axes using the same scale. Settings on the Scale tab affect the axis scales. Settings on the Title & Format tab affect display of the top, bottom, left, and right axes.

  1. Double-click on an tick label, axis grid line or axis break.

or

  1. Right-click on an axis, tick mark, tick label, or axis break.

  2. Select Scale, Tick Labels, or Properties from the shortcut menu.

or

  1. Right-click in (or near) the layer containing the axis you want to edit.

  2. Select Axis from the shortcut menu. (This shortcut menu command always opens the Axis dialog box with the X axis controls active.)

or

  1. Select Format:Axes:Axis Type or Format:Axis Tick Labels:Axis Tick Label Type.

General Tips on Editing Graph Axes

  • Most graph axis properties are controlled by settings in the Axis dialog box. The Axis dialog box is a tabbed dialog that operates on the currently selected axis. The currently selected axis is identified by combined information in the Axis dialog box title and the Selection list box to the left side of the Axis dialog box.

You can move freely from editing axis properties for any axis in a given layer to any other axis in the layer without closing the Axis dialog box. To edit the properties of other axes in the active graph layer, simply select the appropriate axis icon from the Selection list box.

Selections in this list box are limited to those that are relevant to the active graph template (for instance, you will not see a Z axis listed for a 2D plot-type) and to the properties that are relevant to controls on a particular dialog box tab, for example...

  • When you want to customize a particular Origin graph element, you usually gain access to element controls by double-clicking on that element. In the case of graph axes, double-clicking on the tick labels, axis grid lines, or an axis break, will open the Axis dialog box. There are other ways in which you can open the Axis dialog box:

  • When editing axis properties, you can prevent application of changes by clicking the Cancel button (provided you have not clicked Apply).


Axis Scale Format

This section focuses on formatting the graph axis:

  • Origin supports various linear (linear) and non-linear numeric scales (log2, log10, ln, probability, logit, etc.), various date and time scales (date, time, month, day of the week), and nominal scales. To specify the type of data that you want to plot, you must set the axis Type, using controls on the Scale tab of the Axis dialog box. To learn more about specifying the axis type, see Changing the Axis Scale Type.

If you are plotting date and/or time data, be sure to see Creating a Time Series Graph.

  • Each 2D graph layer contains a set of X and Y coordinate axes. The set of X and Y coordinate axes includes a bottom X, top X, left Y, and right Y axis. 3D graphs contain a set of X, Y and Z coordinate axes (bottom X, top X, left Y, right Y, front Z, and back Z axis). By default, most 2D graph templates display only the bottom X and left Y axes in the layer. However, you can display all four axes in the layer (6 axes in a 3D graph), if you so choose. To learn more about showing or hiding graph axes, see Turning On and Off the Display of the Axes.

  • Most 2D graph templates display a left Y and bottom X axis with the graph origin in the lower left corner of the page. However, Origin supports drawing the graph axes in almost any location on the graph page. To learn more about how you can customize the position of the graph axes, see Adjusting the Axis Position.

  • Axis color, thickness, and tick mark display properties are controlled by settings on the Title & Format tab of the Axis dialog box.

  • You can display or hide grid lines, and customize grid line spacing in 2D and 3D graph axes. To learn more, see Adding a Grid.

  • If you would like to "skip" a range of values in your 2D graph axis scales, you can add an axis break by specifying the range of values that you wish to exclude. To learn more, see Adding, Deleting, and Formatting an Axis Break in a 2D Graph.


Changing the Axis Scale Type

Starting with Origin 7, if the log scale range is within one decade, the ticks and grids will be linear. A LabTalk system variable @TL determines whether to use linear tick marks by the following relation:

10 * log10(max/min) <= value

Thus, to support linear tick locations for two decades, set this variable to 14. For example, you could enter the following in the Script window:

@TL = 14 ;

The default value for @TL is 10.

  1. Double-click on the X, Y, or Z axis tick labels to open the Axis dialog box.

  2. Select the Scale tab.

  3. Select Horizontal, Vertical, or Z Axes from the Selection list box.

  4. Select the axis scale from the Type drop-down list.

  5. Click OK to close the dialog box and effect changes in the graph window.

The offset reciprocal scale type is defined as x' = 1/(x+273.14), where 273.14 is the absolute temperature corresponding to zero degrees Celsius.

  1. Click the New Graph [image] button on the Standard toolbar.

  2. Double-click on the X axis.

  3. Select the Scale tab (if it is not already active).

  4. Type 0 in the From text box and 100 in the To text box.

  5. Select Offset Reciprocal from the Type drop-down list.

  6. Type 10 in the Increment text box.

  7. Click OK to close the dialog box.

  8. Select Edit:New Layer (Axes):(Linked): Top X.

  9. Press CTRL while double-clicking on the layer 2 icon located in the upper-left corner of the graph. This action opens the layer's Plot Details dialog box.

  10. Select the Link Axes Scales tab.

  11. Select the Custom radio button in the X Axis Link group.

  12. In this same group, type 1/(X1+273.14) in the X1 text box.

  13. Type 1/(X2+273.14) in the X2 text box.

  14. Click OK to close the dialog box.

Changing the Axis Scale Type

Origin supports the following axis scale types for 2D graphs:

Linear | Standard linear scale: X'=X.
Log10* | Base 10 logarithmic scale: X'=log(X).
Probability | Represents the inverse of a cumulative Gaussian distribution. Plotting a cumulative Gaussian distribution produces a sigmoidally-shaped curve. This curve, when displayed on a probability scale, appears as a straight line. Since probabilities are expressed as percentages, all values must fall between 0 and 100. The probability scale range is 0.0001 to 99.999.
Probit | Like the probability scale, a sigmoidally-shaped curve plots as a straight line. In this case, however, the scale is linear, and the increment between tick marks is exactly one standard deviation. The value "5" on the scale shows the mean, or 50% probability. "6" is one standard deviation away, etc.
Reciprocal | Reciprocal scale, where X'=1/X.
Offset Reciprocal | Offset reciprocal scale, where X'=1/(X+offset). Offset is defined as 273.14, where 273.14 is the absolute temperature for 0° C.
Logit | Logit=ln(Y/(100-Y)). As with the probability and probit scales, a sigmoidally shaped curve plots as a straight line.
ln | Natural log scale (base e logarithmic scale).
log2 | Base 2 logarithmic scale.

* A note about log10 scales:

To change the axis scale type:


Creating a Time Series Graph

Origin provides a powerful time series tick labeling feature that lets you automatically create axis tick labels with major tick units of seconds, minutes, hours, days, weeks, months, quarters, or years. You can display any date value between 1/1/0100 and 12/31/9999. Major and minor tick marks can be labeled separately. For example, you could label the major ticks as years and the minor ticks as months.

This short tutorial illustrates the development of a time series graph.

Setting the Axis Tick Label as Date

  1. Click the New Graph button [image] on the Standard toolbar.

  2. Double-click on the X axis tick labels to open the Tick Labels tab of the Axis dialog box.

  3. Select Date from the Type drop-down list. The Date tick label type specifies that calendar values are to be used as labels.

  4. To establish the tick label format, select Jan 2 from the Format drop-down list.

Setting the Label Options

  1. Select the Minor Tick Labels tab.

  2. Select the Enable Minor Labels check box in the Minor Labels group. Minor tick marks on this axis will now be labeled.

  3. Select the Minor Label on Major Ticks check box in the Minor Labels group. Minor tick labels will now display at major tick marks.

  4. Type 110 in the Offset Major by (%) text box in the Minor Labels group. This will offset the major tick labels 110% of font height away from the axis.

Setting the Axis Range and Increment

  1. Select the Scale tab.

  2. Type 1/1/99 in the From text box, and 2/15/99 in the To text box.

  3. Select the Increment radio button if it is not already selected.

  4. Type 1week in the Increment text box (do not leave a space between “1” and “week”). This establishes a major tick increment of one week. (Note: You can specify the following increment values when working with a time series axis (shown with appropriate abbreviations): sec (s), min (m), hour (h), day (d), week (w), month (mo), quarter (q), year (y).)

  5. To specify a minor tick increment of one day, type 6 in the # Minor Ticks text box. Origin will draw six minor tick marks between each pair of major ticks. Origin automatically selects appropriate minor tick values, based on the increment setting. Since the major tick increment in the current example is one week, Origin will use the days of the week as minor tick values. In other circumstances, Origin might choose to use months or quarters as the minor tick increment.

  6. Click OK to close the dialog box.


Other Axis and Tick Mark Format Options

  1. Double-click on the axis tick labels to open the Axis dialog box.

  2. Select the Title & Format tab.

  3. Select a color from the Color drop-down list.

  4. Click Apply or OK.

Select Color in the Apply To group to apply Color to This Layer, This Window, or All Windows (in project).

  1. Double-click on the axis tick labels to open the Axis dialog box.

  2. Select the Title & Format tab.

  3. Specify an axis and tick Thickness(pts).

  4. Click Apply or OK.

Select Thickness in the Apply To group to apply Thickness(pts) to This Layer, This Window, or All Windows (in project).

  1. Double-click on the axis tick labels to open the Axis dialog box.

  2. Select the Title & Format tab.

  3. Specify a Major Tick Length.

  4. Click Apply or OK.

Select Tick Length in the Apply To group to apply Major Tick Length to This Layer, This Window, or All Windows (in project).

  1. Double-click on the axis tick labels to open the Axis dialog box.

  2. Select the Title & Format tab.

  3. Set Major and Minor Ticks as In, Out, In & Out or None.

  4. Click Apply or OK.

Select Ticks in the Apply To group to apply Major and Minor Ticks configurations to This Layer, This Window, or All Windows (in project).

Other Axis and Tick Mark Options

Use settings on the Title & Format tab of the Axis dialog box control the following:

  • Set axis and tick mark Color.

  • Set axis and tick mark Thickness(pts).

  • Set Major Tick Length.

  • Set Major and Minor Ticks as In, Out, In & Out, or None.


Turning On and Off the Display of the Axes and Tick Labels

  1. Double-click on the X axis tick labels to open the X Axis dialog box.

  2. Select the Title & Format tab.

  3. Select Top from the Selection list box.

  4. Select the Show Axis & Ticks check box.

  5. Select Right from the Selection list box.

  6. Select the Show Axis & Ticks check box.

  7. Click OK to close the dialog box and effect changes in the graph window.

  1. Open the Axis dialog box.

  2. Select the Title & Format tab.

  3. Highlight the appropriate axis in the Selection list box.

  4. Clear the Show Axis & Ticks check box.

To hide the axis tick labels:

  5. Select the Tick Labels tab.

  6. Highlight the appropriate axis in the Selection list box.

  7. Clear the Show Major Labels check box.

To hide an axis and its tick labels:

  1. Right-click on the axis or tick labels.

  2. Select Hide Axis from the shortcut menu.

The axis and tick labels are hidden when this command is checked. Furthermore, the Show Axis & Ticks check box on the Title & Format tab and the Show Major Labels check box on the Tick Labels tab of the Axis dialog box are simultaneously cleared.

To display the hidden axis and tick labels:

  1. Reselect the shortcut menu command (which can be difficult because the axis is hidden).

or

  1. Open the Axis dialog box and select the appropriate check boxes on the Title & Format tab and the Tick Labels tab.

  1. Activate the graph layer.

  2. From the menu, choose Format:Layer. This opens the layer's Plot Details dialog box.

  3. Select the Display tab.

  4. Clear the X Axes check box in the Show Elements group (the Labels box controls display of axis titles, arrows, text labels, shapes, and objects -- not axis tick labels).

When X axes and tick labels are hidden at this level, you can still control their display properties from the Axis dialog box, but X axes and tick labels will not display until X Axes is restored to the Display tab.

Turning On and Off the Display of the Axes

Each 2D graph layer can display Bottom X, Top X, Left Y, and Right Y axes. In addition, Origin's 3D graph layers can display Front Z and Back Z axes. By default, most built-in 2D graph templates display only the Bottom X and Left Y axes; the Top X and Right Y axes are hidden. You can opt to display all, some, or none of the layer's axes (and their associated tick marks). For instance...

To display the Top X and Right Y axes and tick marks

To hide any of the axes in your graph layer

Origin provides a shortcut menu command to control the display of axes.

In addition to turning on and off the display of individual axes, Origin provides controls for display of sets of axes. For instance, to disable the display of the bottom X and top X axes (and tick labels) (even if they are currently hidden):


Adjusting the Axis Position

Bottom (X), Top (X), Left (Y), Right (Y), Front (Z), or Back (Z)

Move the axis back to its default location.

% from Bottom (Top, Left, Right, etc.)

Offset the axis from its default location. Type a “percent-of-axis-length” value in the Percent/Value text box.

For axes in 2D graph layers, type a positive value to move the axis away from the center of the page; type a negative value to move the axis toward the center of the page.

At Position=

Position the axis at a specific X or Y axis scale value. Type the X or Y value in the Percent/Value text box.

...to create this axis configuration:

  1. Click the New Graph button [image] on the Standard toolbar.

  2. Double-click on the X axis. This opens the X Axis - Layer 1 dialog box.

  3. Select the Title & Format tab.

  4. Set Axis Position to At Position= and enter 0 in the Percent/Value text box.

  5. Click Apply. The X axis moves to position Y = 0.

  6. Select the Scale tab and change the From to -10 and To to 10.

  7. From the Selection list, choose Left (note that the dialog box name is changed to Y Axis - Layer 1 -- we are now formatting the Y axis).

  8. Set Axis Position to At Position= and enter 0 in the Percent/Value text box.

  9. Select the Scale tab and change the From to -10 and To to 10.

  10. Click Apply or OK. The Y axis moves to position X = 0.

Adjusting the Axis Position

By default, most 2D graph templates display a left Y and bottom X axis with the graph's origin being located in the lower left corner of the page. However, axes can be intersect at any value on the X or Y scale. Additionally, you could offset an axis from the layer frame so that, for instance, you could have multiple Right Y axes and not have the axes overlap (see example).

To adjust the axis position:

  1. Double-click on the X, Y, or Z axis to open the Axis dialog box.

  2. Select the Title & Format tab.

  3. Select Bottom, Top, Left, Right, Front, or Back from the Selection list box.

  4. Make your selection from the Axis Position drop-down list:

  5. Click OK to close the dialog box and effect changes in the graph window.

Example


Grid lines can be displayed in front of, or behind, the data in your 2D graphs. To change the way that grid lines display:

  1. Press CTRL while double-clicking on the appropriate layer icon in the upper-left corner of the graph window. This action opens the layer's Plot Details dialog box.

  2. Select the Display tab.

  3. To display the grid lines in front of the data, select the Grid on Top of Data check box (in the Data Drawing Options group).

or

  3. Clear this check box to display the grid lines behind the data.

Adding a Grid

Grid lines can be displayed at major and minor ticks for the X, Y, and Z axes. When displayed, these lines will appear in the printed graph.

To add grid lines to the graph

  1. Double-click on the X, Y, or Z axis to open the Axis dialog box.

  2. Select the Grid Lines tab.

  3. Select Horizontal, Vertical, or Z Axes from the Selection list box.

  4. Select the Major Grids and/or the Minor Grids check boxes to display the respective grid.

  5. Set the grid line display options.

  6. Click OK to close the dialog box and effect changes in the graph window.

Note: The grid lines as controlled from the Axis dialog box are not the same as the axis and object grids used for alignment. Note that the alignment grids do not appear in the printed graph.


Adding, Deleting, and Formatting an Axis Break in a 2D Graph

  1. Double-click on the axis break. This action opens the Break tab of the Axis dialog box.

  2. To remove the break, clear the Show Break check box.

or

  2. To modify the break, edit the options on this tab and click OK.

  1. From the menu, choose Format:Page. This opens the page's Plot Details dialog box.

  2. Select the Display tab.

  3. Select the Connect Line Across Axis Break check box.

In a line+symbol data plot, the line across the break region displays as a dashed line.

Adding, Deleting, and Formatting an Axis Break in a 2D Graph

An axis break is a gap inserted into an axis to indicate that a range of values is skipped (not displayed in the graph). A single axis break can be added to any X or Y axis in a 2D graph.

To add an axis break:

  1. Double-click on the X (or Y) axis to open the Axis dialog box.

  2. Select the Break tab.

  3. Select Horizontal or Vertical from the Selection list box.

  4. Select the Show Break check box.

  5. Type the starting break value in the From text box.

  6. Type the ending break value in the To text box.

  7. Click OK to close the dialog box and effect changes in the graph window.

To edit or remove an axis break

To connect a (plotted) line across an axis break


Axis Scale Values

This section is primarily concerned with control over the display range of the axis scale values. There are several ways in which these can be manipulated:

  • You can change the From and To values on the Scale tab of the Axis dialog box.

  • You can use the Enlarger Tool [image] on the Tools toolbar to zoom in on a portion of the axis scale. This automatically resets the From and To values in the Axis dialog box.

  • You can center your graph axis (and your data plot) on a particular axis value, using the Center or the Axis Zoom In/Axis Zoom out shortcut menu commands.

  • Origin normally rescales graph axes automatically to accommodate minimum and maximum data set values. However, you have several options for controlling axis rescaling behavior.


Changing the Axis Scale and Increment

To alter the default display margin, change the value of the layer.axis.rescaleMargin object property.

For more information, see documentation of the layer.axis property in the LabTalk Language Reference section of the Programming Help file (Help:Programming).

  1. Double-click on the X, Y, or Z axis to open the respective Axis dialog box.

  2. Select the Scale tab.

  3. Select Horizontal, Vertical, or Z Axes from the Selection list box.

  4. Type your starting axis scale value in the From text box.

  5. Type your ending axis scale value in the To text box.

  6. To set the major tick increment, select the Increment radio button. Type the increment between major ticks in the associated text box.

  7. To specify the number of major ticks displayed on the axis, select the # Major Ticks radio button. Type the number of major ticks in the associated text box.

  8. Specify the number of minor ticks to display between adjacent major ticks in the # Minor Ticks text box.

  9. Click OK to close the dialog box and effect changes in the graph window.

Changing the Axis Scale and Increment

When you plot data from the worksheet or import data into a graph window, X, Y, and Z axes are automatically scaled so as to include all data points in the data plot. All built-in Origin graph templates determine minimum and maximum axis values by padding the range of X, Y, and Z data by 8%.

To change the axis scale and customize the increment

other methods of changing the axis scale:

  • Changing the Axis Scale using the Zoom In Button on the Tools Toolbar

  • Changing the Axis Scale using the Center Shortcut Menu Command

  • Changing the Axis Scale Using the Axis Zoom In and Axis Zoom Out Shortcut Menu Commands


Locating Tick Marks

The location of tick marks is controlled by settings on the Scale tab of the Axis dialog box. The format of tick marks is controlled by settings on the Title & Format tab.

To control the location of tick marks

  1. Double-click on the X, Y, or Z axis to open the Axis dialog box.

  2. Select the Scale tab.

  3. Select Horizontal, Vertical, or Z Axes from the Selection list box.

  4. To set the major tick increment, select the Increment radio button and specify the increment between major ticks in the associated text box.

  5. To specify the number of major ticks displayed, select the # Major Ticks radio button and specify the number of major ticks in the associated text box.

  6. Specify the number of minor ticks between adjacent major ticks, in the # Minor Ticks text box.

  7. Click OK to close the dialog box and effect changes in the graph window.

Note: Major tick length is set from the Major Tick Length combination box on the Title & Format tab. Units are 0.1 point.


Changing the Axis Scale using the Zoom In Button on the Tools Toolbar

To change the axis scale and enlarge a region of your data plot, use the Zoom In button [image] on the Tools toolbar:

  1. Click once on the button to select it.

  2. Drag out a rectangle around the region of the graph that you want to enlarge. When you release the mouse button, the axes rescale to display only the selected data.

To return the axis scale to the full range:

Note: Though the Zoom In button on the Tools toolbar is available (not grayed out) for 3D graphs, its use is not recommended. Use one of the other axis scale editing methods.


  1. Right-click on a tick label.

  2. Choose Center from the shortcut menu.

This alters the From and To values in the Axis dialog box.

  1. Right-click on the axis tick labels.

  2. Select Rescale to Show All from the shortcut menu

or

  2. Click the Rescale [image] button on the Graphs toolbar.

Changing the Axis Scale using the Center Shortcut Menu Command

To center your data plot on a particular X, Y or Z axis scale value:

To return the axis scale to its full range:


Note that the shortcut menu item, Axis Zoom Out has the effect of expanding the scale. However, to show all data and return to the original scale values:

  1. Right-click on the axis tick labels.

  2. Select Rescale to Show All from the shortcut menu or click the Rescale [image] button on the Graphs toolbar.

Changing the Axis Scale Using the Axis Zoom In and Axis Zoom Out Shortcut Menu Commands

You can modify the From and To axis scale values using the Axis Zoom In and Axis Zoom Out shortcut menu commands. Decide which axis scale value you want to zoom in on, then:

  1. Right-click on that axis tick label.

  2. Choose Axis Zoom In from the shortcut menu.

Origin rescales the axis so that the X, Y, or Z location that you chose displays near the center of the graph axis. This narrows the range of the From and To values in the Axis dialog box. Note that this is similar to Changing the Axis Scale using the Center Shortcut Menu Command.

To return the axis scale to its full range:


Rescaling the Axes to Display Data that Extends Beyond the Current Axes Range

Origin provides an option to reset the axes scale values so that all the data included in the active layer displays within the layer frame. To reset the axes scale values:

  1. From the menu, select Graph:Rescale to Show All

or

  1. Click the Rescale button [image] on the Graph toolbar. This operation is most useful when data plots that extend beyond the current axes range are added to the layer, or when the worksheet display range is modified.

The operation has no affect on the “speed mode” setting which reduces the number of points in a data plot by plotting only every nth data point in the data set. The rescale operation resets axis scale values only.

Note: If you have selected Manual from the Rescale drop-down list on the Scale tab of the Axis dialog box, Origin asks you if you want to override the manual rescale setting. If you click No, the axes will not rescale to show all the data.


Controlling the Axis Rescale Mode

Manual

The axis is not scaleable. If you try to change the scale or perform an operation which changes the scale (for example, using the Enlarger tool), Origin preserves the From and To values.

If both axes in a 2D graph layer are set to Manual, using the Enlarger tool opens a dialog box asking if you want to change to Normal mode and rescale. Click Yes to temporarily override the scaling restriction.

Normal

The axis is scaleable. Alter the axis scale and use the Enlarger tool (for 2D graph layers) without restriction.

Auto

This option is identical to the Normal option, but also allows Origin to automatically scale the axis to accommodate plotted data, if necessary.

Fixed From

The From value of the axis is fixed and can only be changed by editing the From text box value in the Axis dialog box.

Fixed To

The To value of the axis is fixed and can only be changed by editing the To text box value in the Axis dialog box.

Controlling the Axis Rescale Mode

Origin provides an option to control the conditions under which the axis is rescaled.

To control the axis rescale mode:

  1. Double-click on the X, Y, or Z axis to open the respective Axis dialog box.

  2. Select the Scale tab.

  3. Select Horizontal, Vertical, or Z Axes from the Selection list box.

  4. Select the rescale mode from the Rescale drop-down list.

  5. Click OK to close the dialog box and effect changes in the graph window.


Ticks and Tick Labels

Tick Marks and Tick Labels

Tick marks are the scale markings that appear on an axis scale. Tick labels are the axis scale values that display adjacent to tick marks.

Customizing Tick Labels

Advanced Control over Tick Labels


Formatting Tick Labels

Select this check box to display major tick labels (this control also appears on the Minor Tick Labels tab and the Custom Tick Labels tab).

Use the Apply To group to apply your settings to This Layer, This Window, or All Windows (this project).

The default selection in this drop-down list is the Format selection in the Worksheet Column Format dialog box. However, editing Type does not reset the Worksheet Column Format.

If you edit the Type drop-down list, you may have to adjust the axis scale and increment (the Scale tab). For instance, when choosing the Day of Week option for X axis tick labels, select the Scale tab and set the scale From 0 To 6, and the Increment to 1.

Numeric

The tick labels are decimal numbers representing the axis scale range.

Text from Data set

Uses a data set as the source of the tick labels. You can select a data set from any worksheet in the project by typing or selecting the data set from the Data set combination box (for example, data1_c). For each major tick label, Origin checks what the tick label value of numeric type would be (using the settings on the Scale tab). It then uses that numeric value as a row number, and displays the cell value in the selected data set at that row number for the tick label.

Time

Displays tick labels in 24-hour clock format, with hour:minute:second:fraction-of-second separated by semicolons.

Date

Displays tick labels as calendar-accurate date values.

Month

Displays tick labels as month values. This option accepts numeric or text data set values.

Day of Week

Displays tick labels as days of the week.

Column Headings

Uses (plotted) worksheet column headings as tick labels. Plot the desired data sets from the worksheet into the layer. Select the Column Headings option from this drop-down list.

Origin creates tick labels from the headings of the plotted columns. The tick labels derived from column headings are positioned along the axis such that the numeric axis scale value equals the column number. For example, if the numeric axis tick label reads "5," Origin replaces that tick label with the heading from column 5. (When counting columns, Origin ignores any X column.

Note: Column headings include both the column name and label. To display only the worksheet column label as a tick label, clear the Column Name check box (Heading Options group) and click OK. Make the graph active again and select Window:Refresh.

Tick Indexed Dataset

As with the Text from Dataset option, the Tick Indexed Dataset option uses a data set as the source of the tick labels. You can select a data set from any worksheet in the project by typing or selecting the data set from the Dataset combination box (for example, data1_c).

This option differs from the Text from Dataset option in that each data set value is indexed to sequential major tick positions, starting with the first major tick on the axis. Thus, the value in row one of the specified data set displays at the first major tick, the value in row two displays at the second major tick, etc.

Use the Apply To group to apply your settings to This Layer, This Window, or All Windows (this project).

Use the Apply To group to apply your settings to This Layer, This Window, or All Windows (this project).

Type = Numeric

Option | Description
Decimal:1000 | (1, 1000, 1E6, 1E9) Note: The threshold for conversion to scientific notation is controlled on the Numeric Format tab of the Options dialog box (Tools:Options).
Scientific:1E3 | (1E0, 1E3, 1E6, 1E9)
Engineering:1k* | (1.0, 1.0k, 1.0M, 1.0G) Origin supports the following Engineering data suffixes:
Decimal:1,000 | (1, 1,000, 1E6, 1E9) Note: The threshold for conversion to scientific notation is controlled on the Numeric Format tab of the Options dialog box (Tools:Options).

*A LabTalk system variable (@EF) is provided to enter engineering notation in a non-engineering column. If you set @EF = 1, and then enter engineering notation in a non-engineering column, Origin will treat the entry as numeric. Otherwise (@EF = 0), Origin will treat the entry as text (default). To learn more about LabTalk system variables, see the LabTalk Help file.

Type = Time

The Display drop-down list provides a display selection of hours (hh), minutes (mm), seconds (ss), fractions-of-second (#=tenths, ##=hundredths, ###=thousandths), and an AM/PM indicator (am/pm).

Type = Date

The Display drop-down list provides a display selection of date values. The entire date value - month, day, and year - is always preserved, but specific sections of the date can be displayed.

The first two date formats from the drop-down list display your Windows regional date setting (the first item is the short regional format and the second is the long regional format). You can customize these Windows regional settings and thus access the custom format in Origin.

Origin's date formats are listed below these regional formats.

The last two date formats in the drop-down list are Origin's available custom date formats. To customize these date formats, edit the Custom Dates Formats group on the Miscellaneous tab of the Options dialog box (Tools:Options).

Also, see the Worksheet Column Format Dialog Box.

Type = Month

Three month display formats are available: J abbreviates the month to a single letter, Jan abbreviates to three letters, and January displays the entire month.

Type = Day of Week

Three day of week display formats are available: M abbreviates the day to a single letter, Mon abbreviates to three letters, and Monday displays the entire word.

suffix | equivalent | quantity
k | kilo | 10^3
M | mega | 10^6
G | giga | 10^9
T | tera | 10^12
P | peta | 10^15
m | milli | 10^-3
u | micro | 10^-6
n | nano | 10^-9
p | pico | 10^-12
f | femto | 10^-15

Note that "u" is Origin's universal notation for micron. The only exception is graph axes tick labels, which support "mu". Note also that Origin 7 does not support "E" and "a" as suffixes.

Formatting Tick Labels

To customize the axis tick labels:

  1. Double-click on the X, Y, or Z axis labels to open the respective Axis dialog box.

  2. If not already selected, select the Tick Labels tab.

  3. Use the Selection list box to choose Bottom, Top, Left, Right, Front or Back axes.

The Tick Labels tab settings control these tick label format options:

    • Show or hide major tick labels.

    • Specify the source for labels using the Type drop-down list.

    • Specify Font, Color, Bold and/or Point (size).

    • Specify a label Display.

    • Optionally, specify a Divide By Factor, Decimal Places, Prefix and/or Suffix.

  4. Click Apply or OK.


  1. Activate the graph layer.

  2. From the menu, choose Format:Layer. This opens the layer's Plot Details dialog box.

  3. Select the Display tab.

  4. Clear the X Axes check box in the Show Elements group (the Labels box controls display of axis titles, arrows, text labels, shapes, and objects -- not axis tick labels).

When X axes and tick labels are hidden at this level, you can still control their display properties from the Axis dialog box, but X axes and tick labels will not display until X Axes is restored to the Display tab.

Turning On and Off the Display of Tick Labels

To turn on or off the display of tick labels

  1. Double-click on the X axis to open the X Axis dialog box.

  2. Select the Tick Labels tab.

  3. Select Top from the Selection list box.

  4. Select the Show Major Labels check box.

  5. Select Right from the Selection list box.

  6. Select the Show Major Labels check box.

  7. Click OK to close the dialog box and effect changes in the graph window.

In addition to turning on and off the display of individual axes and tick labels, Origin provides controls for display of sets of axes and associated tick labels. For instance, to disable the display of the bottom X and top X axes and tick labels (even if they are not currently visible):


The Custom Tick Labels Tab: Advanced Control over Tick Labels

Origin provides advanced control over tick labels. These options include tick label formatting, alignment, and control over individual tick labels. To access the advanced tick label control, select the Custom Tick Labels tab of the Axis dialog box. For more information on this tab, see The Custom Tick Labels Tab.


Adding, Editing, and Positioning an Axis Title

  1. Right-click on the axis title and choose Label Control.

  2. Edit the Object Name text box.

You now have complete control over the axis title but note that such things as automatic positioning and scaling of the axis title have been disabled.

  1. Select Format:Axis Titles:X (or Y or Z) Axis Title to open the Text Control dialog box for the associated axis.

  2. Type the desired title text into the text box and format the text as desired.

  3. Click OK to close the dialog box. The axis title displays near the center of the axis.

or

  1. Select Format:Axes:X Axis (or Y Axis or Z Axis).

  2. Select the Title & Format tab.

  3. Choose the appropriate axis in the Selection list box.

  4. Select (if not checked) the Show Axis & Ticks check box.

  5. Enter a Title.

  6. Click Apply or OK.

  1. Double-click on the axis title to activate in-place editing mode.

  2. Edit the axis title as desired.

  3. To exit the text editing mode, click off the label or press ESC.

Tip: To control rotation of vertical labels during in-place editing, select Tools:Options, select the Text Fonts tab, edit the Do Not Rotate Text While In-Place Editing check box.

Adding, Editing, and Positioning an Axis Title

Origin’s graph window templates attach a default title to each axis. In most cases, the default axis titles are visible when the graph window is created.

Axis titles display just outside of their respective axes. The default distance between the axis tick labels and the axis title is controlled on the Axis tab of the Options dialog box (Tools:Options).

Though you can modify the location of an axis title by selecting and dragging the title, its movement is restricted to a small area in the vicinity of the axis tick labels. The is because the axis title is a special Origin text object. The formatting of this object (font size, position, attachment method, etc.) is modified by several "hard-coded" parameters associated with the axis title Object Name (e.g. XB is the object name of the bottom X axis in a 2D plot). Any time the graph is refreshed, these parameter specifications are read and this object is automatically formatted. If you wish to have complete control over the position, attachment method, etc. of your axis title, you must rename the object.

To display an axis title for an axis which currently does not include a title

To edit an existing axis title

For more information on naming and formatting of text and drawing objects, see Editing Objects.


Exchanging the X and Y Axes in a 2D Graph Layer

To exchange the X and Y axes so that the X axis becomes the vertical axis and the Y axis becomes the horizontal axis:

  1. Activate the graph window.

  2. Select Graph:Exchange X-Y Axis.


Changing the Length of the Axis

The length of a set of axes in a layer is determined by the dimensions of the layer that contains the axes. The layer size is set on the Size/Speed tab of the layer’s Plot Details dialog box (Format:Layer).

To set the layer (and thus the axes) to a specific width and height, select the desired units (for example, inch, cm, or mm) from the Units drop-down list in the Layer Area group. Then enter the desired dimensions in the Width and Height text boxes. (The Left and Top text boxes determine the position of the layer relative to the left side and top of the page.)

You can also set the layer size in relation to the size of the page, or in relation to a linked layer. For more information on these options, see Plotting: Graph Layers.


Reference Section: The Axis Dialog Box

The tabs of the Axis dialog box provide controls for the display of most axis-related elements in your graph layer. Once this dialog box has been opened, you can customize any axis in the graph layer by selecting the appropriate icon from the Selection list box.

The Axis dialog box includes an Apply button (available from any tab). Click Apply to incorporate any changes that you have made on the current tab settings or to other tab settings, since you last clicked Apply. After updating the graph, you can continue editing the current tab or you can switch to another Axis dialog box tab.

The Scale Tab

The Title & Format Tab

The Grid Lines Tab

The Break Tab

The Tick Labels Tab

The Minor Tick Labels Tab

The Custom Tick Labels Tab


The Scale Tab

Horizontal | This is, by default, the bottom and top X axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Horizontal icon is associated with the left and right Y axes.
Vertical | This is, by default, the left and right Y axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Vertical icon is associated with the bottom and top X axes.
Z Axes | This is, by default, the front and back Z axes.

After you finish editing the properties of an axis, you can begin editing any other axis in your graph by selecting the appropriate icon from the Selection list box. To prevent your selections from applying to your graph, click the Cancel button at any time during the editing process (but before clicking Apply).

Set the initial scale value in this text box.

Set the final scale value in this text box.

Linear | Standard linear scale: X'=X.
Log10* | Base 10 logarithmic scale: X'=log(X).
Probability | Represents the inverse of a cumulative Gaussian distribution. Plotting a cumulative Gaussian distribution produces a sigmoidally-shaped curve. This curve, when displayed on a probability scale, appears as a straight line. Since probabilities are expressed as percentages, all values must fall between 0 and 100. The probability scale range is 0.0001 to 99.999.
Probit | Like the probability scale, a sigmoidally-shaped curve plots as a straight line. In this case, however, the scale is linear, and the increment between tick marks is exactly one standard deviation. The value "5" on the scale shows the mean, or 50% probability. "6" is one standard deviation away, etc.
Reciprocal | Reciprocal scale, where X'=1/X.
Offset Reciprocal | Offset reciprocal scale, where X'=1/(X+offset). Offset is defined as 273.14, where 273.14 is the absolute temperature for 0° C.
Logit | Logit=ln(Y/(100-Y)). As with the probability and probit scales, a sigmoidally shaped curve plots as a straight line.
ln | Natural log scale (base e logarithmic scale).
log2 | Base 2 logarithmic scale.

* A note about log10 scales:

Starting with Origin 7, if the log scale range is within one decade, the ticks and grids will be linear. A LabTalk system variable @TL determines whether to use linear tick marks by the following relation:

10 * log10(max/min) <= value

Thus, to support linear tick locations for two decades, set this variable to 14. For example, you could enter the following in the Script window:

@TL = 14 ;

The default value for @TL is 10.

Manual | The axis is not scaleable. If you try to change the scale or perform an operation which changes the scale (for example, using the Enlarger tool), Origin preserves the From and To values. If both axes in a 2D graph layer are set to Manual, using the Enlarger tool opens a dialog box asking if you want to change to Normal mode and rescale. Click Yes to temporarily override the scaling restriction.
Normal | The axis is scaleable. Alter the axis scale and use the Enlarger tool (for 2D graph layers) without restriction.
Auto | This option is identical to the Normal option, but also allows Origin to automatically scale the axis to accommodate plotted data, if necessary.
Fixed From | The “From” value of the axis is fixed and can only be changed by editing the From text box value in the Axis dialog box.
Fixed To | The “To” value of the axis is fixed and can only be changed by editing the To text box value in the Axis dialog box.

Select this radio button and set the major tick increment for this axis in the associated text box. Tick labels are placed at each major tick mark. For example, type 10 to display a major tick mark at every tenth value.

If the scale units for this axis are time series values, then the value in the Increment text box must indicate the increment in appropriate time series terms. The permissible time series step increment units and their allowable abbreviations are:

Increment | Abbreviation
sec | s
min | m
hour | h
day | d
week | w
month | mo
quarter | q
year | y

For time series graphs, set the size of the increment by typing a number followed by an increment unit. For example, 1month sets a major tick increment of one month. 4Q sets a major tick increment of four quarters. (Do not leave a space between the number and the increment unit.)

Select this radio button to set the absolute number of major ticks displayed on the axis. Type the desired value in the associated text box.

The maximum number of major ticks is controlled on the Axis tab of the Options dialog box (Tools:Options).

Specify the number of minor ticks to display between adjacent major ticks in this text box. For example, select the Increment radio button, type 1 in the associated text box, and type 1 in the # Minor Ticks text box to set the tick sub-step to 0.5. One minor tick will display between each pair of major ticks.

If the scale units for this axis are time series values, then Origin uses the value in the # Minor Ticks text box to automatically determine the most appropriate minor tick labels. This option is available only if the Enable Minor Labels check box is selected on the Minor Tick Labels tab of the Axis dialog box.

Specify the position of the first major tick, and the increment for each minor tick, in the First Tick text box. This text box can be left blank for most graphs. However, when using calendar-accurate date values as tick labels, you may want to specify the value of the first major tick label to be displayed, and at what value subsequent minor ticks should fall. For example, if your X axis range runs from 1/1/99 to 12/31/99, you could specify that the first major tick label fall at 1/4/99, and that all subsequent minor tick marks fall on a Monday.

To edit the First Tick text box, type the desired major tick value. To specify both a major and minor tick value, include a comma after the major tick value, followed by the minor tick value.

When working with date values, Origin recognizes most common date notations. For example, to create an axis that starts at 1/4/99 and has minor tick marks at all Mondays, enter any of the following in the First Tick text box:

1/4/99, Monday

1-4-99, Mon

Jan 4 1999, M

The Scale Tab

Scale tab controls (see figure)

The Selection List Box

The From Text Box

The To Text Box

The Type Drop-down List

The Rescale Drop-down List

The Increment Radio Button and Text Box


The Title & Format Tab

Horizontal | This is, by default, the bottom and top X axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Horizontal icon is associated with the left and right Y axes.
Vertical | This is, by default, the left and right Y axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Vertical icon is associated with the bottom and top X axes.
Z Axes | This is, by default, the front and back Z axes.
Bottom | This is, by default, the bottom X axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Top | This is, by default, the top X axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Left | This is, by default, the left Y axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Right | This is, by default, the right Y axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Front | This is, by default, the front Z axis.
Back | This is, by default, the back Z axis

After you finish editing the properties of an axis, you can begin editing any other axis in your graph by selecting the appropriate icon from the Selection list box. To prevent your selections from applying to your graph, click the Cancel button at any time during the editing process (but before clicking Apply).

Select this check box to display the axis and ticks for the current axis Selection.

Conversely, to hide the axis and ticks, clear this box.

Type an axis title in this text box.

Select an axis and tick color from this drop-down list.

Type or select the desired line thickness (in points, where 1 point=1/72 inch) for the axis and ticks from this combination box.

Type or select the desired major tick length (in points, where 1 point=1/72 inch) from this combination box.

Control the display of the major ticks from this drop-down list.

Control the display of the minor ticks from this drop-down list.

Bottom (X), Top (X), Left (Y), Right (Y), Front (Z), or Back (Z)

Move the axis back to its default location.

% from Bottom (Top, Left, Right, etc.)

Offset the axis from its default location. Type a “percent-of-axis-length” value in the Percent/Value text box.

For axes in 2D graph layers, type a positive value to move the axis away from the center of the page; type a negative value to move the axis toward the center of the page.

At Position=

Position the axis at a specific X or Y axis scale value. Type the X or Y value in the Percent/Value text box.

Select the Color check box to apply the current selection from the Color drop-down list to: This Layer, This Window, or All Windows (in the current project).

Select the Thickness check box to apply the current selection from the Thickness (pts) combination box to: This Layer, This Window, or All Windows (in the current project).

Select the Ticks check box to apply the current selection from the Major Ticks and the Minor Ticks drop-down lists to: This Layer, This Window, or All Windows (in the current project).

Select the Tick Length check box to apply the current selection from the Major Tick Length combination box to: This Layer, This Window, or All Windows (in the current project).

The Title & Format Tab

Title & Format tab controls (see figure)

The Selection List Box

The Show Axis & Ticks Check Box

The Title Text Box

The Color Drop-down List

The Thickness (pts) Combination Box

The Major Tick Length Combination Box

The Major Ticks Drop-down List

The Minor Ticks Drop-down List

The Axis Position Drop-down List and the Percent/Value Text Box

The Apply To Group


The Grid Lines Tab

Horizontal | This is, by default, the bottom and top X axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Horizontal icon is associated with the left and right Y axes.
Vertical | This is, by default, the left and right Y axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Vertical icon is associated with the bottom and top X axes.
Z Axes | This is, by default, the front and back Z axes.

After you finish editing the properties of an axis, you can begin editing any other axis in your graph by selecting the appropriate icon from the Selection list box. To prevent your selections from applying to your graph, click the Cancel button at any time during the editing process (but before clicking Apply).

Select the Major Grids check box to display major grids. Major grid lines are straight lines that emanate from major tick marks.

Select the desired line color and line type from the associated drop-down lists.

Type or select the desired line thickness (in points) from the Thickness (pts) combination box.

Select the Minor Grids check box to display minor grids. Minor grid lines are straight lines that emanate from minor tick marks.

Select the desired line color and line type from the associated drop-down lists.

Type or select the desired line thickness (in points) from the Line Thickness (pts) combination box.

Select the Grid Lines check box to apply the current selection from the Line Color and the Line Type drop-down lists, and the Thickness (pts) combination box for both the Major Grids and the Minor Grids group to: This Layer, This Window, or All Windows (in the current project).

Select the Opposite check box to display a straight line opposite the current axis. Select the Y=0 (X=0, or Z=0) check box to display a straight line at Y=0 (X=0, or Z=0).

The Grid Lines Tab

Grid Lines Tab Controls (see figure)

The Selection List Box

The Major Grids Group

The Minor Grids Group

The Apply To Group


The Break Tab

Horizontal | This is, by default, the bottom and top X axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Horizontal icon is associated with the left and right Y axes.
Vertical | This is, by default, the left and right Y axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Vertical icon is associated with the bottom and top X axes.

After you finish editing the properties of an axis, you can begin editing any other axis in your graph by selecting the appropriate icon from the Selection list box. To prevent your selections from applying to your graph, click the Cancel button at any time during the editing process (but before clicking Apply).

Note: You cannot add an axis break to the axes in a 3D graph layer.

Select this check box to create an axis break.

The From text box value determines the last value displayed before the axis beak. The To text box value determines the first value displayed after the axis break.

The % of Axis Length text box value determines the position of the break on the axis. This value is in units of % of axis length. For example, type 50 in this text box to position an axis break at the mid-point of the axis. If necessary, Origin will alter the scale on either side of the break to accommodate the specified position.

Select this check box to set the post-break scale to log10.

The Before Break and the After Break text box values determine the pre-break and post-break step increment. Origin draws a major tick mark and a tick label at each step increment interval.

The Before Break and the After Break text box values determine the number of minor ticks (between major ticks) before and after the break. This setting overrides the # Minor Ticks text box value on the Scale tab.

The Break Tab

Break Tab Controls (see figure)

The Selection List Box

The Show Break Check Box

The Break Region Group

The Break Position Group

The Log10 Scale After Break Check Box

The Scale Increment Group

The Minor Ticks Group


The Tick Labels Tab

Bottom | This is by default the bottom X axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Top | This is by default the top X axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Left | This is by default the left Y axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Right | This is by default the right Y axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Front | This is by default the front Z axis.
Back | This is by default the back Z axis.

Note that you can move from editing one axis to another without closing the Axis dialog box, by selecting another axis in the Selection list box. To discard changes, click the Cancel button (but before clicking Apply).

Select this check box to display major tick labels. This display is also controlled on the Minor Tick Labels tab and the Custom Tick Labels tab.

Select the label type from this drop-down list. The default selection in this drop-down list is the Format selection in the Worksheet Column Format dialog box. However, editing Type does not reset the Worksheet Column Format.

If you edit the Type drop-down list, you may have to adjust the axis scale and increment (the Scale tab). For instance, when choosing the Day of Week option for X axis tick labels, select the Scale tab and set the scale From 0 To 6, and the Increment to 1.

Numeric

The tick labels are decimal numbers representing the axis scale range.

Text from Data set

Uses a data set as the source of the tick labels. You can select a data set from any worksheet in the project by typing or selecting the data set from the Data set combination box (for example, data1_c). For each major tick label, Origin checks what the tick label value of numeric type would be (using the settings on the Scale tab). It then uses that numeric value as a row number, and displays the cell value in the selected data set at that row number for the tick label.

Time

Displays tick labels in 24-hour clock format, with hour:minute:second:fraction-of-second separated by semicolons.

Date

Displays tick labels as calendar-accurate date values.

Month

Displays tick labels as month values. This option accepts numeric or text data set values.

Day of Week

Displays tick labels as days of the week.

Column Headings

Uses (plotted) worksheet column headings as tick labels. Plot the desired data sets from the worksheet into the layer. Select the Column Headings option from this drop-down list.

Origin creates tick labels from the headings of the plotted columns. The tick labels derived from column headings are positioned along the axis such that the numeric axis scale value equals the column number. For example, if the numeric axis tick label reads "5," Origin replaces that tick label with the heading from column 5. (When counting columns, Origin ignores any X column.

Note: Column headings include both the column name and label. To display only the worksheet column label as a tick label, clear the Column Name check box (Heading Options group) and click OK. Make the graph active again and select Window:Refresh.

Tick Indexed Dataset

As with the Text from Dataset option, the Tick Indexed Dataset option uses a data set as the source of the tick labels. You can select a data set from any worksheet in the project by typing or selecting the data set from the Dataset combination box (for example, data1_c).

This option differs from the Text from Dataset option in that each data set value is indexed to sequential major tick positions, starting with the first major tick on the axis. Thus, the value in row one of the specified data set displays at the first major tick, the value in row two displays at the second major tick, etc.

Select the major and minor tick label font from this drop-down list.

Select the desired major and minor tick label color from this drop-down list.

Select the Bold check box to bold major and minor tick labels.

Type or select the desired line thickness (in points) for the major and minor tick labels from the Point combination box.

The drop-down list options differ depending on the selection from the Type drop-down list.

Each major and minor tick label is divided by the number in this text box. Note that this text box also supports expressions. For example, to divide all the labels by 1/3, enter 1/3 in the text box.

To specify the number of decimal places displayed in the numeric tick labels, select this check box and type the desired value in the associated text box.

Type a prefix in this text box to display before the major and minor tick labels.

Note: The Prefix and Suffix text boxes support special formatting commands (for example, superscript and subscript). For information on using special formatting commands, see Plotting: Customizing the Graph.

Type a suffix in this text box to display after the tick labels. For example: mm, mF, K.

The Prefix and Suffix text boxes support special formatting commands (for example, superscript and subscript). For information on using special formatting commands, see Plotting: Customizing the Graph.

Select the Font check box to apply the current selection from the Font drop-down list to: This Layer, This Window, or All Windows (in the current project).

Select the Color check box to apply the current selection from the Color drop-down list to: This Layer, This Window, or All Windows (in the current project).

Select the Point check box to apply the current selection from the Point combination box to: This Layer, This Window, or All Windows (in the current project).

Select the Bold check box to apply the current selection from the Bold check box to: This Layer, This Window, or All Windows (in the current project).

The Tick Labels Tab

Tick Labels Tab Controls (see figure)

The Selection List Box

The Show Major Labels Check Box

The Type Drop-down List

The Font Drop-down List

The Color Drop-down List

The Bold Check Box

The Point Combination Box

The Display Drop-down List

The Divide By Factor Text Box

The Set Decimal Places Check Box and Text Box

The Prefix Text Box

The Suffix Text Box

The Apply To Group


The Minor Tick Labels Tab

Horizontal | This is, by default, the bottom and top X axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Horizontal icon is associated with the left and right Y axes.
Vertical | This is, by default, the left and right Y axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Vertical icon is associated with the bottom and top X axes.
Z Axes | This is, by default, the front and back Z axes.
Bottom | This is, by default, the bottom X axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Top | This is, by default, the top X axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Left | This is, by default, the left Y axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Right | This is, by default, the right Y axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Front | This is, by default, the front Z axis.
Back | This is, by default, the back Z axis

After you finish editing the properties of an axis, you can begin editing any other axis in your graph by selecting the appropriate icon from the Selection list box. To prevent your selections from applying to your graph, click the Cancel button at any time during the editing process (but before clicking Apply).

To display minor tick labels, major tick labels must be displayed.

Select the Show Major Labels check box to display major tick labels. Other major tick label display controls are on the Tick Labels tab and on the Custom Tick Labels tab.

Select the Enable Minor Labels check box to display minor tick labels.

Select the Minor Labels on Major Ticks check box to display both a minor tick label and a major tick label for each major tick. This option is only meaningful for time series labels, in which you specify different tick label types for major and minor tick marks. For example, month and day.

To view both labels in the graph, type a value in the Offset Major by % text box. The major tick labels move the specified distance away from the center of the page, in units of % of font height.

Select the Box Around Labels check box to draw a box around each tick label.

Select the Plus Signs check box to display a plus “+” sign to the left of positive tick labels.

Select the Minus Signs check box to display a minus “-” sign to the left of negative tick labels.

The Minor Tick Labels Tab

Minor Tick Labels Controls (see figure)

The Selection List Box

The Show Major Labels Check Box

The Minor Labels Group

The Other Options Group


The Custom Tick Labels Tab

Horizontal | This is, by default, the bottom and top X axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Horizontal icon is associated with the left and right Y axes.
Vertical | This is, by default, the left and right Y axes. However, if you have exchanged the X and Y axes (Graph:Exchange X-Y Axis) or if you are editing an axis of a bar, floating bar, or stacked bar graph, then the Vertical icon is associated with the bottom and top X axes.
Z Axes | This is, by default, the front and back Z axes.
Bottom | This is, by default, the bottom X axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Top | This is, by default, the top X axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Left | This is, by default, the left Y axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Right | This is, by default, the right Y axis (except if the X and Y axes have been exchanged or if you are editing bar-style graphs).
Front | This is, by default, the front Z axis.
Back | This is, by default, the back Z axis

After you finish editing the properties of an axis, you can begin editing any other axis in your graph by selecting the appropriate icon from the Selection list box. To prevent your selections from applying to your graph, click the Cancel button at any time during the editing process (but before clicking Apply).

Select the Show Major Labels check box to display major tick labels. The major tick label display is also controlled on the Tick Labels tab and on the Minor Tick Labels tab.

Origin supports arbitrary rotation of tick labels. Type a positive number in this text box to rotate labels counterclockwise, and a negative number to rotate labels clockwise.

If you are not using one of the vector fonts or TrueType fonts supplied with Windows 95 (or later) or Windows NT, or a typeface scaling software such as Adobe Type Manager, the rotated labels will not display on the screen. They will, however, print correctly (provided the output device supports text rotation).

Select Next to Ticks to align the left edge of the tick labels with the major ticks.

Select Center Between Ticks to locate tick labels equidistantly between adjacent major ticks.

Select Center (Default) to center the tick labels with the major ticks.

Select this check box to ensure that tick labels always draw adjacent to the axis. When this check box is cleared, the tick labels remain in their default position, even if the axis position is altered.

Type the desired value in these text boxes to control the horizontal and vertical position of the tick labels relative to the axis (100%=one full font width).

Up to three tick labels can be customized for each axis: the first major tick (At Axis Begin), the last major tick (At Axis End), and/or at a user-specified (Special) axis value.

The At Axis Begin Radio Buttons

The At Axis End Radio Buttons

The Special Radio Button and At Axis Value Text Button

Auto: The default tick label display settings are used.

Hide: If there is a tick label displayed at this value, hide it. Otherwise, do nothing.

Show: If no tick label is displayed at this value, show one. Otherwise, do nothing.

Manual: Display the contents of the Labels text box at this axis value. Use the %1 notation to include the current tick label at any point in the expression. For example, if the current tick label reads “19”, type %199 in the Labels text box to display “1999”. Use the $(x) notation to include the current tick label in a calculation, where x is the current tick label value. For example, if the current tick label is “99”, type $(1900+x) to display “1999”.

Auto: The default tick label display settings are used.

Hide: If there is a tick label displayed at this value, hide it. Otherwise, do nothing.

Show: If no tick label is displayed at this value, show one. Otherwise, do nothing.

Manual: Display the contents of the Labels text box at this axis value. Use the %1 notation to include the current tick label at any point in the expression. For example, if the current tick label reads “19”, type %199 in the Labels text box to display “1999”. Use the $(x) notation to include the current tick label in a calculation, where x is the current tick label value. For example, if the current tick label is “99”, type $(1900+x) to display “1999”.

Show, hide, or specify a Special tick label at the axis value specified in the At Axis Value text box. Origin also adds a major tick mark at this value, if necessary.

Auto: The default tick label display settings are used.

Hide: If there is a tick label displayed at this value, hide it. Otherwise, do nothing.

Show: If no tick label is displayed at this value, show one. Otherwise, do nothing.

Manual: Display the contents of the Labels text box at this axis value. Use the %1 notation to include the current tick label at any point in the expression. For example, if the current tick label reads “19”, type %199 in the Labels text box to display “1999”. Use the $(x) notation to include the current tick label in a calculation, where x is the current tick label value. For example, if the current tick label is “99”, type $(1900+x) to display “1999”.

The Custom Tick Labels Tab

Custom Tick Labels Controls (see figure)

The Selection List Box

The Show Major Labels Check Box

The Rotation (degree) Text Box

The Tick to Label Drop-down List

The Labels Stay with Axis Check Box

The Offset in % Point Size Group


The Graph: Customizing

  • Making a Data Plot Active

  • The Plot Details Dialog Box and the Editing of Data Plots

  • Switching Between Graph Types

  • Controlling the Display Properties of Grouped Data Plots

  • Controlling the Display Properties of a Single Data Point

  • Moving a Data Point

  • Deleting a Data Point

  • Displaying the Data Plot's Worksheet Data

  • Ways to Increase Redraw Speed

  • Speed Mode

  • Setting the Dimensions of the Graph Page

  • The Miscellaneous Tab of the Page's Plot Details Dialog Box

  • Controlling the Graph Window Redraw Conditions

  • Setting the Page Color and Other Page Display Preferences

  • Controlling the Display of Graph Legends on the Page

  • Displaying a Layer Background Color and Adding a Border

  • Specifying New Layer Dimensions in the Plot Details Dialog Box

  • Controlling the Display and Scaling of the Objects in a Layer

  • Controlling the 3D Axis Length, Rotation, and Perspective in a Layer

  • Controlling the Display of the 3D Planes in a Layer

  • Clipping the Data Plot to the Frame

  • Viewing a 3D Graph with a Perspective or Orthographic Projection

  • Hiding Data in the 3D XY Plane

  • Plotting Your Data Using a Specific Color

  • Displaying Each Data Point in Your Plot Using the Sequence of Colors in the Color Palette

  • Using Values in a Data Set to Control Data Plot Color

  • Creating a Custom Color

  • Group Incremental Color Lists

  • Using a Selected Data Set to Control the Color of Your Data Plot

  • Symbols

  • Lines

  • Displaying Every nth Data Point

  • Fill Patterns

  • The (Plot Details) Pattern (or XY/YZ/XZ Faces) Tab

  • Column, Bar, and Box Spacing

  • Pie Slices

  • Vectors

  • Contours

  • 3D Surfaces

  • Group Incremental Lists

  • Independent Editing of Grouped Data Plots

  • Reference: The (Plot Details) Group tab

  • Copying Graphs Between Pages

  • Copying the Entire Page of the Active Graph Window (as an Object) to another Graph Window

  • Merging

  • How Merging Affects Linked Layers

  • Converting a Multiple Layer Graph Window into Multiple Graph Windows

  • Hiding Data Plots

  • Hiding Labels, Data, and Layers

  • Deleting Layers

The Graph: Customizing

Expand each item to see a list of subtopics:

Data Plots: General Tips

Controlling the Display of Elements Associated with the Page

Controlling the Display of Elements Associated with the Layer

Customizing the Colors in Your Data Plot

Using Data Sets as a Plotting Enhancement

Data Plots: Customizing Specific Elements

Customizing Grouped Data Plots

Exchanging Graphics Between Graph Windows

Merging and Extracting Graphs

Hiding Graph Elements


Data Plots: General Tips

Making a Data Plot Active

The Plot Details Dialog Box and the Editing of Data Plots

Switching Between Graph Types

Controlling the Display Properties of Grouped Data Plots

Controlling the Display Properties of a Single Data Point

Moving a Data Point

Deleting a Data Point

Displaying the Data Plot's Worksheet Data

Ways to Increase Redraw Speed

Speed Mode


Making a Data Plot Active

  1. Select the data plot from the data list at the bottom of the Data menu.

or

  1. Right-click in the layer and select the data plot from the data list at the bottom of the shortcut menu.

or

  1. Right-click on the layer icon and select the data plot from the data list at the bottom of the shortcut menu.

or

  1. Right-click on the desired data plot in the graph and select Set as Active from the shortcut menu (the shortcut menu command is grayed-out if the data plot is already active).

or

  1. Right-click on the desired data plot in the graph and select the primary data set name (Worksheet_dataset) for the data plot from the bottom of the shortcut menu.

or

  1. Click on the data plot type icon in the legend (if the Indicate Active Dataset check box is selected on the Legend tab of the Plot Details dialog box for the graph page (Format:Page).

Making a Data Plot Active

Only one graph layer may be active at any given time. Likewise, only one data plot within a layer can be active at any given time. A data plot must be made active before you can do such things as change plot color, use the Data Selector tool, fit a curve, or perform any mathematical operation on the data plot.

A data list appears at the bottom of the Data menu. The list includes all data plots in the active graph layer. A check mark identifies the active data plot in the data list. The data list updates each time you add or remove a data plot from the active layer. Since the list shows only those data plots in the active layer, the entire list changes whenever you switch the active layer.

In this example, layer 2 is the active layer; the active data plot is Lead(Y) - the data set with the check mark next to it in the above figure.

To change the active data plot, do one of the following:


The Plot Details Dialog Box and the Editing of Data Plots

  1. Double-click on the data plot in the graph window.

or

  1. Right-click on the data plot.

  2. Select Plot Details from the shortcut menu.

Note that if you right-click in the layer, but not on a data plot, Origin opens the Plot Details dialog box for the first data plot in the Data menu data list.

or

  1. Double-click on the data plot type icon displayed on the left side of the graph legend (double-clicking on the legend text opens the Text Control dialog box).

or

  1. Right-click in the layer containing the data plot.

  2. Select Plot Details from the shortcut menu.

  3. On the left side of the Plot Details dialog box, click to select the icon for the data plot of interest.

Note that if the data plot is part of a group in which the display properties between data plots are incrementing, Origin only allows you to select the first data plot icon of the group.

or

  1. Click on the graph window to make it the active window.

  2. Select Format:Plot.

  3. On the left side of the Plot Details dialog box, lick to select the icon for the data plot of interest.

or

  1. Click on the graph window to make it the active window.

  2. From the menu, choose Data and CTRL + click on any data plot in the data list.

  • If you open the Plot Details dialog box by double-clicking outside of the page, the dialog box displays the controls that pertain to the graph page. Note the tab headings on the right-hand side of the dialog box:

  • If you click on the plus sign next to the graph icon on the left side of the dialog box and select a layer icon, the dialog box displays the controls that pertain to the graph layer. Note the tab headings on the right-hand side of the dialog box:

  • If you click the plus sign next to a layer icon, the tree expands to list the data plots in the layer. You can then click on a data plot icon to display controls relevant to the data plot. Note the tab headings on the right-hand side of the dialog box:

click the [image] button at the bottom of the Plot Details dialog box.

click the [image] button at the bottom of the Plot Details dialog box.

The Plot Details Dialog Box and the Editing of Data Plots

Controls for the most elements of the data plot -- the data points, data plots (including data labels and error bars), functions, layers, and the graph page -- are in the multi-tabbed Plot Details dialog box. Tab display (and the suite of available controls) is dependent upon:

  • The plot type.

  • The program's focus in the graph page's Page > Layer > Data Plot > Data Point hierarchy.

Because the Plot Details dialog box provides controls for so many elements in the graph, it can be opened a variety of ways. The following operations open the Plot Details dialog box with the data plot controls -- the tabs and options that affect the characteristics of the data plot -- active. To open the Plot Details dialog box:

Once the Plot Details dialog box is open, you can activate any Plot Details-accessible control -- regardless of how you opened the dialog box -- by selecting the various components in the tree structure on the left side of the dialog. You then expand the tree on the left side of the dialog box by clicking on the plus signs (+) to expose additional graph elements. For example:

To hide the tree structure,

To redisplay the tree structure,

Click here to view a multi-media demonstration


  1. Make a data plot active, then click the desired graph type button on the 2D Graphs, the 2D Graphs Extended, or the 3D Graphs toolbars.

or

  1. Open the Plot Details dialog box and select the desired data plot icon from the left side of the dialog box.

  2. Select one of the listed types in the Plot Type drop-down list.

or

  1. Right-click on the data plot and select Change to:Graph Type from the shortcut menu.

Switching Between Graph Types

If you plotted your data using a particular graph template (for example, a scatter plot template), Origin allows you to change your graph type selection -- within limits -- from the Plot Details dialog box or directly from the graph window. To change the graph type, do one of the following:

When you switch graph types using one of the above methods, Origin does not use the default template associated with the new graph type button. Instead, Origin modifies the data plot properties of the existing graph template.

For example, if your current graph is a customized line and symbol plot with blue symbols and red lines, and you click the Scatter button on the 2D Graphs toolbar, Origin continues to display the symbols with blue color in the scatter data plot. Furthermore, if you then click the Line+Symbol button on the 2D Graphs toolbar, Origin again displays the data plot with blue symbols and red lines. When you switch graph types using one of these methods and the selected data plot is part of a data plot group, each of the data plots in the group changes to the new graph type.

Origin does not allow switching among all graph types. For example, Origin prohibits switching between a line data plot and a ternary data plot because of differing data requirements; the line data plot requires XY values and the ternary data plot requires XYZ values.

In the Plot Details dialog box and the data plot shortcut menu methods (the second and third methods listed above), Origin only lists the graph types that support this switch. If using the toolbar button method (first in the above list), Origin opens an Attention box informing you that the switch is not supported.


  1. Right-click inside the graph's layer frame.

  2. From the shortcut menu, choose Plot Details. The Plot Details dialog box opens to the Group tab.

  3. In the Edit Mode group, select Independent.

You are now able to customize the display properties of any data plot in the group. Note that when you select the Independent radio button, the increment controls for the grouped data plots are removed from the Plot Details dialog box. You can freely edit the display properties of any data set in the plot group and editing the display properties of the first data plot in the data list will no longer affect the display properties of other grouped plots.

Controlling the Display Properties of Grouped Data Plots

When data plots are grouped in the layer, Origin, by default, sets the display properties of each data plot automatically. However, it is possible to customize grouped data plots through the Plot Details dialog box and using the color list options on the Style toolbar.

If you open the Plot Details dialog box and select a data plot icon (on the left side of the dialog box) that is part of a data plot group, the right side of the dialog will display a Group tab. The controls that appear on this tab will vary depending on the graph type and the display options that have been made on other Plot Details dialog box tabs.

It is important to understand the functioning of the Edit Mode (Dependent/Independent) radio buttons. If you leave the Dependent radio button selected (the default data plot group setting), you are prevented from selecting any of the subordinate data sets in the data list on the left side of the Plot Details dialog box. This is because the properties of subordinate plots are controlled by the plot characteristics of the first plot in the list and the order of options -- colors, symbol shapes, etc. -- in the increment lists applied to the plot group.

If you wish to modify the properties of grouped data plots, you can take one of two approaches:

  • You can choose the Independent radio button, in which case you are free to edit the display properties of any data set; subsequently, changes to the appearance of any plot will not affect, nor be affected by, the order of data sets in the plot group or by incremental lists of colors, symbol shapes, line types, fill patterns, etc.

  • You can modify or create your own Group Incremental Lists, using only the colors, symbol shapes, line types, etc. that you wish to use, but still allow plot display properties to be determined automatically according to the ordering of those lists.

For most, the use of Group Incremental Lists will prove the more satisfactory solution. In addition to creating your own incremental lists, you have control over the way in which properties are incremented, as you can choose between Concerted or Nested incrementing behaviors.

To learn more about managing increment lists, see Group Incremental Lists.


  1. Click once on the data point to select it (a selection handle will appear) and press the DELETE key.

or

  1. Right-click on the data point and select Delete from the shortcut menu.

The data point is not deleted. Its object status is merely removed and the display properties of the data point revert to those of the data plot.

Controlling the Display Properties of a Data Point

You can modify the display properties of an individual data point, even if it is part of a data plot group.

To modify the display of an individual data point:

  1. Hold the CTRL key down and double-click on the data point. This opens the Plot Details dialog box for this particular data point.

  2. Edit the data point display properties, as needed, and click OK.

Note that the tree on the left side of the Plot Details dialog box displays a data point icon beneath the associated data plot icon. The worksheet row index number of this data point displays to the right of the icon.

If an individual data point is edited in this fashion, the data point becomes an Origin object. Subsequently, if you double-click on the same data point (without holding down the CTRL key), the Plot Details dialog box opens with the data point controls displayed.

To remove the object status from the data point:


Moving a Data Point

To move a data point in the active data plot:

  1. Select Data:Move Data Points If this menu command has not previously been selected for the data plot, an Attention dialog box opens stating that the data plot is not set to have movable data points.

  2. Click Yes to enable the option. A cursor appears on a data point in the data plot. The Data Reader tool also becomes active and the Data Display tool opens.

  3. Click on the desired data point and drag it to a new location using your mouse.

or from the keyboard...

  3. Use the ¬ and ® keys to select the active data point. The [image] and ¯ keys move the active data point up and down. Use the CTRL+ ¬ (and ®) keys to move the active data point left and right.

The Data Display tool displays the XY coordinates of the selected data point.

When you have moved the point to the desired position, do one of the following to complete your edit:

  • Press ESC.

  • Click on the Pointer tool [image] (the Tools toolbar).

  • Press ENTER.

The new XY value of the data point is also modified in the worksheet.


Deleting a Data Point

To delete a data point from the active data plot:

  1. Select Data:Remove Bad Data Points. After selecting this menu command, the Data Reader tool becomes active and the Data Display tool opens.

To delete a data point...

  2. ... click on the desired data point and press ENTER.

or

  2. ... double-click on the desired data point.

The data point is deleted from the data plot as well as from the worksheet cell. In the worksheet, all values below the deleted value shift up one row in the column.


Displaying the Data Plot's Worksheet Data

To display the worksheet associated with a data plot, perform one of the following operations:

  • Right-click on the data plot and select Go to Worksheet from the shortcut menu.

  • Double-click on the data plot to open the Plot Details dialog box and click the Worksheet button.

Origin opens the worksheet containing the data for the data plot. If no worksheet exists, Origin creates the worksheet. If the worksheet exists but is "filed" in a different Project Explorer folder than the graph, Origin opens the worksheet in the current (graph) folder. To remove the display of the worksheet in the graph folder, make the worksheet's Project Explorer folder active, and then re-select the graph folder.


Ways to Increase Graph Redraw Speed

Ways to Increase Redraw Speed

Origin provides various methods to increase the redraw speed of the active graph window as well as the redraw criteria of the non-active graph windows in your workspace. These tools are most helpful when working with graph windows that:

  • are supported by a large amount of data.

  • have large numbers of annotations.

  • have numerous layers.

or

  • your workspace contains many graph windows.

Ways to increase screen redraw speed:

The Origin Basics section discusses the use of a less-accurate (but faster) video mode.

Another way you can improve screen redraw speed is to control redrawing of non-active graph windows in your workspace. When you are customizing a single graph window, there is no need to continually redraw every window in your workspace.

Another way to improve the redraw speed of the active graph window is to hide graphic elements in the graph window. For example, if your graph window contains multiple layers - but you are only editing one layer - you could temporarily hide the other layers while you are editing.

At the graph layer level, Origin provides a couple of other controls for increasing the redraw speed:

  • Speed Mode lets you specify the maximum number of data points that can display for each data plot in a layer. This has the dual benefit of increasing redraw speed and allowing you to systematically filter the number of data points in your plot (think, for instance, about the difficulty of creating a legible scatter graph of one million data points). To learn more, see Speed Mode.

  • Graphic image caching lets you use vector or raster buffering to display data plots in a layer, instead of having Origin redraw the data plots each time the graph window is made active, or when a dialog box is closed that was covering the data plots.

Speed mode and graphic image caching controls are on the Size/Speed tab of the layer's Plot Details dialog box.


Speed Mode

  1. With your graph active, select Format:Layer from the Origin menu.

  2. Select the Size/Speed tab.

  • For plots created from worksheet data:

  • For 3D data plots created from a matrix or for contour data in the layer:

  1. Select the Worksheet Data, Maximum Points Per Curve check box to enable speed mode for all the data plots in the layer that are created from worksheet data.

  2. Type the desired value (n) in the associated text box. If the number of data points in a data plot exceeds n, Origin displays a subset of the data plot containing n points, drawn by extracting values at regular intervals from the data set.

  1. Select the Matrix Data, Maximum Points Per Dimension check box to enable speed mode.

  2. Type the desired value (n, m) in the X and Y text boxes. If the number of data points in a data plot exceeds n or m, Origin displays a subset of the data plot composed of -- at maximum -- n by m points. This subset is drawn by extracting values at regular intervals from the matrix columns (X) and rows (Y).

  1. Select Tools:Options to open the Options dialog box.

  2. Select the Graph tab and clear the Speed Mode Show Watermark check box.

Speed Mode

In addition to graphic image caching, you can use Origin's Speed Mode to increase the redraw speed of your graph layer. With speed mode, you can control the number of data points displayed in a graph layer. This option is most useful when working with large data sets. Speed Mode can be applied to any 2D or 3D graph.

When Speed Mode is enabled, the layer icon displays in red and a Speed Mode is On watermark appears in the layer. The watermark is not included when printing, copying, or exporting the graph. (see figure).

To adjust Speed Mode settings:

To turn off the Speed Mode is On watermark:

Click here to view a multi-media demonstration

Note1: The Speed Mode settings as applied on the Size/Speed tab of the layer's Plot Details only apply to what you see on screen. They do not apply to graphs that are printed or exported.

If you wish to apply Speed Mode settings to printing, see this discussion of the Skip Points feature as it applies to graph windows.

If you wish to apply Speed Mode settings to graphic export, see this discussion of Performance Group controls on the Miscellaneous tab of the Plot Details dialog box.

Note2: All Speed Mode settings are saved with the graph template. If you wish to make changes to Speed Mode settings permanent, you must resave the graph template once changes are made.

Note3: You should always exercise caution when applying Speed Mode settings. Since Speed Mode systematically removes a portion of your data points, it should be kept in mind that any graph in which Speed Mode is turned on, may -- or may not -- accurately represent your entire data set. Always familiarize yourself with your data and adjust and compare Speed Mode settings to ensure that your data are accurately represented.


Controlling the Display of Elements Associated with the Page

Settings on the Print/Dimensions tab control the page size (most relevant when printing or creating graphs for export) and the printing of crop marks for printing across multiple pages.

To learn more, see Setting the Dimensions of the Graph Page.

Settings on the Miscellaneous tab control the graph window View Mode (Page View, Draft View, Print View, etc.). Other settings control the application of Speed Mode settings to graphic export, layer activation control, and the drawing order of the layers on the page.

To learn more about use of controls on the Miscellaneous tab, see The Miscellaneous Tab of the Page's Plot Details Dialog Box.

Settings on the Display tab control the page background color and connecting plot lines across missing data or axis breaks.

To learn more about use of the controls on the Display tab, see Setting the Page Color and Other Page Display Preferences.

Settings on the Display tab control the use of Master Items.

To learn more about use of the controls on the Display tab, see Setting the Page Color and Other Page Display Preferences.

Settings on the Legends tab control the display of the full data set name (WorksheetName_ColumnName), an active data set indicator, automatic update of the legend whenever data sets are added or removed and the width of the data plot icons in the legend.

To learn more about use of the controls on the Legends tab, see Controlling the Display of Graph Legends on the Page.

Controlling the Display of Elements Associated with the Page

Settings on the various Page tabs of the Plot Details dialog box control things such as:

  • The graph page dimensions.

  • Screen View Mode, layer drawing order and screen redraw criteria.

  • Adding background color and connecting (plotted) lines across axis breaks and missing data.

  • The use of Master Items.

  • Certain legend display options.


The (Plot Details) Print/Dimensions tab

  1. With the graph active, select Format:Page. This opens the Plot Details dialog box.

  2. Select the Print Dimensions tab if it is not already selected.

Enter Width and Height in Units.

Select Set to Printer Dimension when Opened from a Template to reset page dimensions to those of the currently-selected printer when creating graphs from this template (By default, this is checked for all Origin built-in templates). If you clear this check box and save the active graph window as a template, when you next create a graph window from this template, page dimensions will be determined by the Width and Height settings at the time the template was saved.

You can print a graph page that is smaller or larger than the current printer driver's "printable area."

  • A graph page with dimensions that are smaller than those of the printable area will print on one page. The upper-left corner of the graph will be positioned in the upper-left corner of the printable area.

  • A graph page with dimensions that are larger than those of the printer page will print across multiple pages (see the Print Cropmarks check box).

To ensure that the Width and/or Height text box values in the Dimensions group control the size of the printed graph, clear the Width and/or Height check boxes in the Use Printer Default Dimensions When Printing group. Otherwise, Origin will adjust the graph page to fit the printer page, independent of the Dimensions group settings (example).

The controls in this group are also accessible when printing. To access them when printing, select File:Print and then click the Options button. Edit the More Print Options dialog box as desired. Note that when you edit the controls in the Plot Details dialog box, information in the More Print Options dialog box is updated. Similarly, when you edit the controls in the More Print Options dialog box, the Plot Details dialog box is updated.

If the Width of a graph page is set to 20 inches and the Height is set to 8 inches, while the printer page Width is 10 inches and the Height is 8.5 inches, and the Width check box (Use Printer...group) is cleared but the Height check box is selected, Origin will print the graph across two pages (because 20 inches /10 inches = 2).

Select this check box to display crop marks at the margins of the printer's printable area.

Note: You can also print crop marks by selecting the Print Crop Marks check box in the More Print Options dialog box (click the Options button on the Print dialog box).

Setting the Dimensions of the Graph Page

Settings on the Print/Dimensions tab control the graph page size and the printing of crop marks for printing graphs across multiple sheets.

To open the (Plot Details) Print/Dimensions tab:

The (Plot Details) Print Dimensions Tab Controls (see figure)

The Dimensions Group

The Use Printer Default Dimensions When Printing Group

The Print Crop Marks Check Box


The (Plot Details) Miscellaneous tab

  1. With the graph window active, select Format:Plot from the Origin menu. This opens the Plot Details dialog box.

  2. Select the Miscellaneous tab.

Select View Mode drop-down list. Options: Print View, Page View, Window View, and Draft View. This option is identical to selecting View:View Mode.

The Percent of Page Uncovered to Redraw Page text box controls the redraw criteria of the graph window when it is not active. Units are in % of page. Enter a redraw threshold value n; if more than n% of the graph page is uncovered, the graph window will redraw when the active window on top of it is moved. For a more detailed discussion of this setting, see Controlling the Graph Window Redraw Conditions.

The If Speed Mode is Enabled for Display, Apply to Graphic Export as Well check box allows you to apply speed mode when your graph is exported to a file or copied to the Clipboard. Speed mode is set on the Size/Speed tab of the layer's Plot Details dialog box. Enabling speed mode increases the redraw speed of your graph layer by limiting the number of data points displayed in that graph layer.

Select this check box to ensure that a layer can be made active only by clicking on the layer icon.

Draw All Layers As a Single Composite forces display of data in both layers even if one or both layers have a background color.

Draw Layer by Layer will draw layer 2 after completely drawing layer 1, including the layer 1 background. If you specify a background color for layer 2 by selecting layer 2 from the tree structure in Plot Details, and choosing a color on the Background tab, then the background in the second layer will mask elements of the first layer. If you leave the background as None then the data in layer 1 will be visible in layer 2.

The (Plot Details) Miscellaneous tab

The Miscellaneous tab of the page's Plot Details dialog box provides control of the view mode and the redraw criteria of a graph window (when it is non-active), the application of speed mode settings to graphic export (includes graphs copied to the Clipboard), and layer activation by the layer icon only.

To open the (Plot Details) Miscellaneous tab of the Plot Details dialog box:

The (Plot Details) Miscellaneous Tab Controls (see figure)

The Performance Group

The Set Active Layer by Layer Icon Only Check Box

The Drawing Order Group


Controlling the Graph Window Redraw Conditions

  1. Select Format:Page when the graph window is active.

or

  1. Double-click in the gray area outside of the graph page.

Both actions open the Plot Details dialog box with the graph page icon selected on the left side of the dialog box.

  2. Select the Miscellaneous tab on the right side of this dialog box. The Percent of Page Uncovered to Redraw Page text box controls the redraw criteria of this graph window when it is non-active. The text box is in units of % of page.

  3. Type a redraw threshold value n, so that if more than n% of the graph page is uncovered, the graph window will redraw when:

    • The active graph window that is on top of the non-active graph window is moved.

    • A dialog box that was covering this non-active graph window is moved or closed.

The smaller that n is, the more frequently the graph window is redrawn.

Controlling the Graph Window Redraw Conditions

When you are making changes to a graph window, and your workspace includes additional graph windows, you can prevent the non-active graph windows from redrawing as you make changes to the active graph window. Preventing the non-active graph window from redrawing can save you considerable time, in some cases:

  • If you are editing the Plot Details dialog box for a particular graph window, and this dialog box obscures part or all of a non-active graph window, you may not want the non-active graph window to redraw (not to be confused with "refreshed" in which case, a graph is actually changed/updated) after you close the Plot Details dialog box.

  • Similarly, if your workspace includes a number of graph windows, and the active graph window is covering part or all of a non-active graph window, you may not want the non-active graph window to redraw when you move your active graph window in the workspace.

To control the redraw criteria of a graph window (when it is non-active):


Setting the Page Color and Other Page Display Preferences

To display no page color:

To display a single color on the page:

To display a gradient of colors on the page:

  1. Select None from the Base Color drop-down list.

When None is selected and the page is exported or copied to the Clipboard, the page is transparent (displays the background color of the host application).

  1. Select a Base Color.

  1. Select the Base Color and Gradient Color.

  2. Specify the location for the Base Color from the Gradient Control drop down list.

To connect the clipped ends of a line or a line+symbol data plot at an axis break:

  1. Select the Connect Line Across Axis Break check box.

In a line+symbol data plot, the line across the break region displays as a dashed line.

Origin provides an option for connecting lines across missing data in line and line + symbol data plots.

To enable this option:

  1. Select the Connect Line Across Missing Data check box.

Setting the Page Color and Other Page Display Preferences

To set a page color, or to enable the display of a data plot line connection across axis breaks and missing data:

  1. Select Format:Page when the graph window is active.

or

  1. Double-click in the gray area to the right of the graph page.

Both actions open the Plot Details dialog box with the graph page icon selected on the left side of the dialog box.

  2. Select the Display tab on the right side of this dialog box.

The (Page) Display Tab on the Plot Details Dialog Box (see figure)


Controlling the Display of Graph Legends on the Page

  1. Select Format:Page when the graph window is active.

or

  1. Double-click in the gray area outside of the graph page.

Both actions open the Plot Details dialog box with the graph page icon selected on the left side of the dialog box. Select the Legends tab on the right side of this dialog box.

The default legend displays only the column name for each data set (or the column label, if it exists). To display the full data set name in the legend:

  1. Select the Full Dataset Name check box.

The full data set name has the syntax WorksheetName_ColumnName.

Select the Auto Update check box to automatically update the legend(s) whenever a data plot is added to, or deleted from, the associated layer on the page. If this check box is cleared, you must manually update the legend for each layer by selecting Graph:New Legend when the desired layer is active. Alternatively, right-click in the layer and select New Legend from the shortcut menu.

By default, Origin only includes datasets contained in the graph layer that is active when the legend object is created.

Select this box to include all datasets in all layers in the legend.

To learn more, see Creating and Updating a Legend.

Select the Indicate Active Dataset check box to denote the active data set in the legend. When this check box is selected, a black square surrounds the legend's data plot type icon for the active data plot in the layer.

Additionally, when this check box is selected, the active data plot can be selected by clicking on the data plot type icon in the legend.

Note: You can also select the active data plot from the Data menu or from shortcut menus. If you change the active data plot by selecting a data plot from the data list or from a shortcut menu, you must refresh the graph window to reflect the change in the legend.

The value in the Symbol Width text box determines the width of the data plot type icon(s) in the legend in % of the legend font size.

Controlling the Display of Graph Legends on the Page

The legend is a special Origin text label that identifies each data plot in the associated layer by name and plot type. The data plot name is determined by the name of the worksheet column in which the data set resides. If the worksheet column includes a label, the label is used to create the legend.

Though each legend is associated with a particular layer, controls on the Legends tab of the page's Plot Details dialog box control some properties of legends in all the layers on the page.

To open the (Plot Details) Legends tab:

Controls for the (Page) Legends Tab of the Plot Details Dialog Box (see figure)

The Full Dataset Name Check Box

The Auto Update Check Box

The Include Data Plots from All Layers Check Box


Settings on the Background tab control the Layer background color and the display of a border around the layer.

To learn more, see Displaying a Layer Background Color and Adding a Border.

  • Click on the X or Y axis of the layer (or within the layer frame) to select the layer. From the menu, choose Format:Layer.

  • Press CTRL while double-clicking on the layer icon.

  • Double-click on the layer icon to open the Layer n dialog box. Click Layer Properties.

  • Right-click on the active layer icon and select Layer Properties from the shortcut menu.

Controlling the Display of Elements Associated with the Layer

Layer properties are controlled in the Plot Details dialog box. These properties and associated controls vary somewhat by plot type but, in general, they deal with such things as:

  • layer background color and border.

  • controlling the layer size.

  • increasing layer redraw speed by enabling graphic image caching and/or Speed Mode.

  • the scaling behavior of objects attached to the layer.

  • displaying or hiding of axes and tick labels, text and drawing objects and data plots.

  • clipping (hiding) data that extend beyond the layer frame.

Some plot types add tabs with additional controls for:

Plot Types

Properties

multi-layer graphs

  • control of axis scale linking.

3D Color Map and Color Fill Surfaces, Wire Frame and 3D Bar graphs

  • color and position of XY, YZ, and ZX planes.

  • choice of orthographic or perspective projections.

  • viewing angle, length, and rotation angles of axes.

  • clipping (hiding) data in the XY plane.

  • locating the "front corner" of the XY, YZ, and ZX planes.

To open the Plot Details dialog box for a given layer, do one of the following:


Displaying a Layer Background Color and Adding a Border

By default, the layer does not display a background color; it is transparent. Any color that is subsequently applied to the graph page also displays in each of the layers that it contains. Controls for adding a layer (background) color and a border, are found on the Background tab of the layer's Plot Details dialog box.

To add a background color to a layer:

  1. From the menu, choose Format:Layer. This open the Background tab of the layer's Plot Details dialog box.

  2. Select a color from the Color drop-down list (None = transparent).

The layer border is a bounding box outside of the layer frame. To display the layer border:

  1. Select a Border Style from the drop-down list.

Note that the border can be moved and resized independently of the layer. To move or resize the border:

  1. Click on the border line to select it. A highlighted boundary with control handles displays.

  2. Move or resize the border in the same way as you would other objects.


Specifying New Layer Dimensions in the Plot Details Dialog Box

  • To Position or Resize the Layer:

  • Graphic Image Caching:

To numerically position or resize the layer, type values in the Left, Top, Width, and Height text boxes. The Left text box value determines the position of the frame relative to the left side of the page. The Top text box value determines the position of the frame relative to the top of the page. The Height and Width text box values determine the size of the frame.

Specify the units with the Units drop-down list.

  • Specify inch, cm, mm, pixel or point.

  • The % of Page unit is useful for maintaining the same layer size relative to the page size. When this unit is selected, the Left, Top, Height, and Width text box values are in percentage of the graph page height and width.

  • The % of Linked Layer unit is useful for creating inset graphs. This unit allows you to specify the frame dimensions and offsets for a child layer in terms of the dimensions of the parent layer frame. When this unit is selected, the Left, Top, Height, and Width text box values are in percentage of the height and width of the parent layer frame. (This unit is not available unless the current layer is linked to a parent layer.)

Note1: When the unit selection is changed in the drop-down list, the Left, Top, Height, and Width text box values are automatically updated so that the layer retains the same size and position.

Note2: When you set the size of the layer, you are also setting the size of the axes in the layer. To set the layer (and thus the axes) to a specific width and height, select the units (for example, inch, cm, or mm) from the Units drop-down list in the Layer Area group, then enter the dimensions in the Width and Height text boxes.

Select a buffering method from the Graphic Image Caching drop-down list. Graphic image caching can be used whenever a 2D or 3D graph layer needs to be redrawn without being refreshed. For example, when a graph window is overlaid by a worksheet window and then brought to the front again, or when the graph window is resized. For 2D graph layers, select Raster to use caching. For 3D graph layers, select Raster or Vector.

  • Vector (metafile) buffering provides Origin with a detailed description of how to draw the graph and is fully scaleable.

  • Raster (bitmap) buffering tells Origin how many pixels of what color to draw at what position. This information is based on a certain resolution and will become distorted when resized.

  • If you select None, Origin redraws the graph layer every time the graph window is moved, brought to the front, or resized.

Note: If you resize your graph in raster caching mode, the graph may get a rough pixel appearance. If this occurs, select Window:Refresh to restore the display.

In addition to graphic image caching, you can use Origin's Speed Mode to increase the redraw speed of your graph layer. With speed mode, you can control the number of data points displayed in a graph layer. This option is most useful when working with large data sets.

When Speed Mode is enabled, the layer icon displays in red and a Speed Mode is On watermark appears in the layer (see illustration). The watermark is not included when printing, copying, or exporting the graph. To control watermark display, see the information under the next heading.

  • To Adjust Speed Mode settings

Note: If you are producing graphs for printing or graphic export, be sure to see Note1 on Speed Mode.

  1. With your graph active, select Format:Layer from the Origin menu.

  2. Select the Size/Speed tab.

For plots created from worksheet data:

    3. Select the Worksheet Data, Maximum Points Per Curve check box to enable speed mode for all the data plots in the layer that are created from worksheet data.

    4. Type the desired value (n) in the associated text box. If the number of data points in a data plot exceeds n, Origin displays a subset of the data plot that contains n points. This subset contains evenly spaced data - by the worksheet rows.

For 3D data plots created from a matrix or for contour data in the layer:

    3. Select the Matrix Data, Maximum Points Per Dimension check box to enable speed mode.

    4. Type the desired value (n, m) in the X and Y text boxes. If the number of data points in a data plot exceeds n or m, Origin displays a subset of the data plot composed of, at maximum, n by m points. This subset contains evenly spaced data - by the matrix columns (X) and matrix rows (Y).

To turn off the Speed Mode is On watermark:

  1. Select Tools:Options to open the Options dialog box.

  2. Select the Graph tab and clear the Speed mode show watermark check box.

Note: All Speed Mode settings are saved with the graph template. If you wish to make changes to Speed Mode settings permanent, you must resave the graph template once changes are made.

Specifying New Layer Dimensions in the Plot Details Dialog Box

The layer dimensions are set on the Size/Speed tab of the layer's Plot Details dialog box.

The Plot Details (Layer) Size/Speed Tab Controls (see figure)

The Layer Area Group


Controlling the Display and Scaling of the Objects in a Layer

This group determines how the axes, axes labels, legend, data plots, and other objects that are attached to the Layer Frame or Layer and Scales are affected when the layer is resized.

Select the Scale with Layer Frame radio button to scale the layer elements proportionally with the layer.

Select the Fixed Factor radio button to determine the scale factor of the layer elements. This scale factor determines the size of the layer elements relative to their original size (font size, symbol size, and line width, etc.). The size of these elements is determined by multiplying their original size by the scale factor when the Fixed Factor radio button is selected. Type the desired scale factor in the associated text box.

Clear the X Axes, Y Axes, and Z Axes check boxes to hide the X, Y, and Z axes in the layer (Note that similar controls are provided in the Axis dialog box). If you edit the check boxes on the Display tab, the controls in the Axis dialog box update to reflect your changes. Similarly, if you edit the check boxes on the Axis dialog box, the controls on the Plot Details dialog box update to reflect your changes.

Clear the Labels check box to hide all axis titles, arrows, text labels, shapes, and objects in the active layer. (To view the labels in the printout, remember to select the Labels check box before printing.)

Clear the Data check box to hide all data plots in the active layer. (To view the data in the printout, remember to select the Data check box before printing.)

Select the Clip Data to Frame check box to hide data that extends beyond the layer frame. If the Clipping Margins settings have been set, select this check box to hide all data outside of the customized clipping margins.

Select the Data on Top of Axes check box to display data plots and symbols superimposed over the layer axes.

Select the Grid on Top of Data check box to display axis grid lines superimposed over data plots and symbols.

Edit the Clipping Margins (%) sub-group to set the clipping margins inside, or outside, the active layer frame. The default units are in % of the layer frame size. Type a negative value to clip the data to a point outside the frame. Type a positive value to clip the data to a point inside the frame. To clip the data, select the Clip Data to Frame check box.

Controlling the Display and Scaling of the Objects in a Layer

The Display tab of the layer's Plot Details dialog box provides controls to turn on and off the display of the axes, axes labels, legend, and data in the layer - as well as any other objects that are attached to the Layer Frame or Layer and Scales in their respective Label Control dialog box (Format:Label Control). Additionally, you can control the scale of these objects with respect to the layer on this tab.

The Plot Details (Layer) Display Tab Controls (see figure)

The Scale Elements Group

The Show Elements Group

The Data Drawing Options Group


Specify the X, Y, and Z axis length in the Length text boxes. The text boxes are in units of percent of the layer frame. Thus, to display the X axis at 50% of its full length, type 50 in the X Length text box.

To manually set the rotation angle about the X, Y, or Z axis, type the rotation angle in the Rotation text boxes. This text box value is in units of degrees, and is independent of the Angular Unit setting on the Numeric Format tab of the Options dialog box.

You can also use the 3D Rotation toolbar buttons to rotate the graph about the axes.

To rotate the tick labels so that they align with the axes as you rotate the graph, select the Rotate Labels check box.

In addition to rotating the 3D graph, you can change the perspective angle. When you change the perspective angle you change the effective distance from the observation point. Type the desired perspective angle (in degrees) in the Perspective Angle text box. You are limited to a range of 0 to 30 degrees.

You can choose either a perspective or orthographic projection from the Miscellaneous tab of the Layer's Plot Details dialog box.

You can also use the 3D Rotation toolbar buttons to change the perspective angle.

Controlling the 3D Axis Length, Rotation, and Perspective in a Layer

Use controls on the Axis tab of the layer's Plot Details dialog box to:

  • Specify the X, Y, and Z axes physical length in relation to the layer frame.

  • Manually set the rotation angle about the X, Y, or Z axes.

  • Change the perspective angle.

The (Layer) Axis Tab on the Plot Details Dialog Box (see figure)

The Length and Rotation Text Boxes


Select the Auto Position check box to automatically re-display the back plane when the graph is rotated such that one of the planes shifts to the front. When this event occurs, the % Position text box values update. For example, a text box value displaying 100 before the rotation would display 0 after - if the rotation caused the plane to shift to the front.

To control the position and display color of the XY, YZ, or ZX planes, select the associated check box. The % Position text box value controls the position of the respective plane, from the bottom of its orthogonal axis, as a percentage of the axis's length. Select the plane color from the associated Color drop-down list.

In addition to controlling the display of the back planes, you control the display of the outline of the front planes. Selecting this option gives your graph a 3D cube effect. Select the Enable check box to display the front plane outlines. Control the line display from the associated controls.

Controlling the Display of the 3D Planes in a Layer

In 3D graph layers, you can control the position and display of the XY, YZ, and ZX planes. You can also display the outlines of the front planes in your 3D graphs.

To control the display of the 3D planes, edit the Planes tab of the layer's Plot Details dialog box.

The (Layer) Planes Tab on the Plot Details Dialog Box (see figure)


Clipping the Data Plot to the Frame

Data plots that extend beyond the layer frame, or beyond the customized clipping margins, can be hidden from view. To clip the data plot in the active layer:

  1. Select Format:Layer.

or

  1. Double-click on the layer icon to open the associated Layer n dialog box.

  2. Click the Layer Properties button.

Both actions open the Plot Details dialog box with the layer icon selected on the left side of the dialog box.

  3. Select the Display tab and then select the Clip Data To Frame check box in the Data Drawing Options group. To view the clipped data, clear this check box.

To set the clipping margins inside or outside the active layer frame, type the margin value percentages in the Horizontal and Vertical text boxes in the Data Drawing Options group.

  • Type a negative value to clip the data plot to a point outside the frame.

  • Type a positive value to clip the data plot to a point inside the frame.


Viewing a 3D Graph with a Perspective or Orthographic Projection

You can control the projection of your 3D graph from the Projection drop-down list on the Miscellaneous tab of the layer's Plot Details dialog box.

Photographs show a perspective projection. The effect of perspective is to make railroad tracks look narrower in the distance.

Orthographic projection is an approximation to perspective projection when the viewpoint is located at infinity relative to the objects being imaged. With orthographic projection, there is no distortion of the coordinates of a point. In an orthographic projection, the railroad tracks look parallel.


Hiding Data in the 3D XY Plane

You can specify the plotting range on the XY plane of your 3D graph - without changing the axis range - by editing the XY Clipping group on the Miscellaneous tab of the layer's Plot Details dialog box.

The (Layer) Miscellaneous Tab on the Plot Details Dialog Box

Select the Enable check box to hide (clip) all data points with XY coordinates outside the range specified in the % From and % To text boxes. (Note that the axes will continue to display their current range.) Customize the clipping area by editing these text box values. The text box values are in units of percentage of the axes scales.


The (Plot Details) Background tab

By default, the layer does not display a background color. Rather, its display is transparent. Therefore, any color that is applied to the graph page also displays in each of the layers that it contains.

The (Layer) Background Tab Controls (see figure)

The Color Drop Down List.

To add a background color to a layer, select the desired color from the Color drop-down list (None = transparent).

The Border Style Drop Down List.

The layer border is a bounding box outside of the layer frame. To display the layer border:

  1. Select a border from the Border Style drop-down list.

Note that the border can be moved and resized independently of the layer. To do this:

  1. Click on the border line to select it. A highlighted boundary with control handles displays.

  2. Move or resize the border in the same way as other objects.


Controlliing the Display of the Data Plot

Controlling the Display of the Data Plot

Most plot display controls are located on the various tabs of the multi-tabbed Plot Details dialog box. The tabs -- and thus the controls -- are dependent upon the type of plot that is being edited. Controls that are not relevant to a particular plot type (e.g. symbol color and shape for a color-mapped contour plot) do not appear.

Customizing the Colors in Your Data Plot

Using Data Sets as a Plotting Enhancement

Data Plots: Customizing Specific Elements

Customizing Grouped Data Plots


Customizing the Colors in Your Data Plot

Plot color options for any plot type can be set using controls in the Plot Details dialog box. Many 2D plots can be customized using the three Color drop down lists on the Style Toolbar.

If you are customizing colors of grouped data (data sets are grouped in the graph layer), see Group Incremental Color Lists.

If you are customizing colors of one plot at a time, there are two additional types of color controls that you should be concerned with:

  • For data plot elements that can be customized for each data point in a data plot -- such as symbol edge or fill color -- color options are accessed via a button that looks like this.

  • For data plot elements that cannot be customized for each data point in a data plot -- lines, for instance -- color options are accessed via a drop-down list that looks like this.

Plotting Your Data using a Specific Color

Creating a Custom Color

Applying Color to Each Data Point in Your Data Plot by Incrementing Colors in the Color Palette

Using Values in a Data Set to Control the Color of Your Data Plot


To specify a color from the color palette, click the color button and select Individual Color:Color.

If you're editing a color drop-down list, select the desired color from the drop-down list.

You can create a custom color from the color button options and from some of the color drop-down lists. To create a custom color:

  1. Click the color button and select Custom.

  2. Right-click on the Custom button to open the Color dialog box.

After defining a custom color, the color displays in the Custom button.

Plotting Your Data Using a Specific Color

A specific color can be chosen from either color buttons or color drop-down lists. You can choose:

  • A color in the color palette.

  • A custom color

Some of the color buttons and color drop-down lists include an Automatic color option which, when available, is chosen by default. For each color button or drop-down list with this option, the color currently associated with Automatic displays on the button or in the drop-down list:

The Button

The Drop-Down List

Origin selects the Automatic color using the following scheme:

When Automatic is selected in this color control... | ...This setting determines color
(Fill) Pattern Color | (Border) Color
(Drop Lines) Color | Symbol Color
Symbol Color | (Line) Color. If the data plot does not include a Line tab, then display Black.
(Symbol) Edge Color | (Line) Color. If the data plot does not include a Line tab, then display Black.
(Symbol) Fill Color | Default Symbol Fill Color drop-down list selection on the Graph tab of the Options dialog box.
(Error bar) Color | Symbol Color. If no symbol exists, (Line) Color.

Some of Origin's color buttons and color drop-down lists also include a None option. When you select None, the data plot element display is transparent.


Displaying Each Data Point in Your Plot Using the Sequence of Colors in the Color Palette

To increment the color of all data points in a data plot:

  1. Click the color button and select Increment.

  2. Choose your starting color from the associated submenu. Origin displays the selected sequence on the Increment button.

  3. Click OK or Apply. Origin increments the color across data points (by index or row number) following the sequence of colors in the color palette.

Note: Increment is not available if the data plot is part of a data plot group and color incrementing is enabled on the Group tab for that particular data plot element (for example, Symbol Color for grouped Scatter plots). To make Increment available, select the Edit Mode = Independent radio button on the Group tab of the Plot Details dialog box.


Using Values in a Data Set to Control Data Plot Color

This option allows you to specify a data set whose values denote the order of colors (index number) in the Origin Color Palette.

For example, if the selected data set contains values 2 and 5 in rows 1 and 2 respectively. Origin displays the first data point using the second color (color 2) in the Color Palette, and the second data point using the fifth color (color 5) in the Color Palette.

If a color control data set value exceeds the number of colors in the color palette, Origin displays the associated data point in black.

To use this option:

  1. Double-click on the data plot that you wish to modify. This opens the Plot Details dialog box.

  2. Select the Symbol tab, Pattern tab, etc.

  3. Click the Color button to the right side of the dialog box and select Indexing:Dataset - Dataset being the name of the column that stores the color control data.

An RGB composite value is computed from triplet components of Red, Green, and Blue. The R, G, and B component values range from 0 to 255.

RGB composite = (2560 * R) + (2561 * G) + (2562 * B)

which is equivalent to:

RGB composite = R + (256 * G) + (65536 * B)

To use this option:

  1. Double-click on the data plot that you wish to modify. This opens the Plot Details dialog box.

  2. Select the Symbol tab, Pattern tab, etc.

  3. Click the Color button to the right side of the dialog box and select Direct RGB:Dataset, where Dataset contains the RGB composite values.

With this option you create a mapping relationship between ranges of 2D Y values or 3D Z values and an associated scale of colors. The 2D Y values or 3D Z values are then used to determine the data point element colors in the data plot, based on the established color map.

To use this option:

  1. Double-click on the data plot that you wish to modify. This opens the Plot Details dialog box.

  2. Select the Symbol tab, Pattern tab, etc.

  3. Click the Color button to the right side of the dialog box and select Color Mapping:Dataset. When the option is selected, a Color Map/Contours tab displays in the Plot Details dialog box.

Origin automatically creates a color scale with 8 colors (plus a color above and below), and maps the data set values to these colors by finding the maximum and minimum data set values, and an increment that results in 8 levels.

To customize this default color map:

  1. Select the Color Map/Contours tab and assign custom Y or Z value ranges to associated colors.

  2. Select Graph:New Color Scale (or right-click in the layer and select New Color Scale) to display a color scale and the associated data set mapping relationship in the graph. (The numeric format of the color scale is set on the (Plot Details) Numeric Formats tab.)

The color mapping option is particularly useful for presenting data in which you have two independent variables and one dependent variable. You can plot the dependent variable versus one of the independent variables, and then use the second independent variable to color map your data plot. For example, suppose you measured some response of a sample at various positions along its length, while also varying the temperature of the sample along its length.

Without using the color mapping option, you could present your results in a two layer graph, showing the variation of temperature along the sample length, as well as the measured response.

However, by using the color mapping option, you can plot the measured response of the sample versus position, and use the temperature data to color map the data plot.

To learn more about color maps, review the 3D SURFACE & CONTOUR.OPJ and the CONTOUR.OPJ projects located in your Origin \SAMPLES\GRAPHING\3D PLOTS folder. Additionally, review the COLOR SCALE.OPJ project located in your Origin \SAMPLES\GRAPHING\2D PLOTS folder.

Using Values in a Data Set to Control Data Plot Color

Origin can use the values in a column of worksheet data to set colors in a data plot. Setting color control by data set is done via a data plot element's color button (for example, the Symbol Color button).

Origin uses the value in a given row to set colors for data set values in the same worksheet (or Excel workbook) row. For instance, for the data point defined by XY values in row 56, Origin would set the XY data point color by the value in row 56 of the designated "color control" data set. The color control data set must be to the right of the data plot data set in the worksheet.

If the data plot is part of a (dependent) data plot group, Origin applies the values of the designated color control data set to the first data plot in the group. Simultaneously, Origin checks the worksheet column number of the first grouped data plot's Y data set, and compares this location to the worksheet column number of the "color control" data set, storing the difference, n. For the remaining data plots in the group, Origin looks n columns to the right for each grouped data plot's respective color control data set.

A color control data set can be used in one of three ways:

  • Indexing

  • Direct RGB

  • Color Mapping

Note: You cannot designate a color control data set that is to the left of the Y or Z data plot column in the worksheet. If necessary, move the color control data set using the Move Right [image] button on the Column toolbar.


Creating a Custom Color

In addition to selecting a color, you can create a custom color from the color button options and from some of the color drop-down lists. To create a custom color:

  1. Click the color button and select Custom.

  2. Right-click on the Custom button to open the Color dialog box.

After defining a custom color, the color displays in the Custom button.


  1. Click on any plot in the plot group to select the entire group. Selection handles will appear on all grouped data plots.

  2. Scroll to the bottom of the (Font/Line/Border) Color drop-down list on the Style toolbar and choose your incremental color list.

or

  1. Activate your graph window and choose Format:Plot. This opens the Group tab of the Plot Details dialog box.

  2. Right-click inside the properties list and choose Load..., selecting your incremental list from the drop-down list.

Group Incremental Color Lists

Commonly, users would like to apply a different color scheme to their grouped data plots. You can create and apply custom incremental color schemes to grouped data plots.

To create an incremental color scheme:

  1. Activate your graph containing your grouped data plots and select Format:Plot. This opens the Group tab of the Plot Details dialog box.

  2. Click once on the Details column heading. A button will appear to the right side of the color scale (Line Color).

  3. Click once on the [image] button. This opens a color scheme dialog box.

  4. Customize the color scheme:

    • To add a color, right-click on the list and choose Add...

    • To delete a color, right-click on the color and choose Delete.

    • To switch color schemes, right-click on the list and choose Load.... Choose an alternate color scheme from the shortcut menu.

    • To save a customized color scheme, right-click and choose Save.... Name your color scheme and save it for future use.

Note that once you save a color scheme, you can recall it from the Load... shortcut menu command or you can load it from the (Font/Line/Border) Color drop-down list on the Style toolbar.

To apply an incremental color scheme to your graph:

Note that other incremental schemes can be developed for other plot characteristics -- line style, symbol type, fill color, fill style, etc. To learn more, see Group Incremental Theme Lists.


Using Data Sets as a Plotting Enhancement

  • Color

  • Symbol Shape

  • Symbol Interior

  • Symbol Size

  • Angle (for XYAM vector data)

  • Magnitude (XYAM vector data)

Origin provides three methods for using the values in a specified column to control the color of elements in a data plot:

  • indexing

  • direct RGB

  • color mapping

To learn more, see Customizing the Colors in Your Data Plot

To specify a column to control symbol shape:

  1. Open the Plot Details dialog box (Format:Plot).

  2. Choose the Symbol tab.

  3. Select the Show Construction check box.

  4. Select the plot control data set in the Shape drop-down list.

When you select a column from the Shape drop-down list, Origin makes the following association between numeric values and symbol shapes: 0 = no symbol, 1 = square, 2 = circle, 3 = up triangle, 4 = down triangle, 5 = diamond, 6 = cross (+), 7 = cross (x), 8 = star (*), 9 = bar (-), 10 = bar (|), 11 = number, 12 = LETTER, 13 = letter, 14 = right arrow, 15 = left triangle, 16 = right triangle, 17 = hexagon, 18 = sphere, 19 = star, 20 = pentagon. For any numeric values outside of this range (except 56 and 58), no symbol displays.

The numeric values of 56 and 58 display special symbol types: 56 = data markers and 58 = vertical lines that mark the X position of the data point.

If your data plots are part of a plot group, you will note that the Shape drop-down list does not support use of a data set to control display of plot symbol shape.

To specify a column to control symbol interior:

  1. Open the Plot Details dialog box (Format:Plot).

  2. Choose the Symbol tab.

  3. Select the Show Construction check box.

  4. Select the plot control data set in the Interior drop-down list.

When you select a column from the Interior drop-down list, Origin makes the following association between numeric values and symbol interiors: 0 = no symbol, 1 = solid, 2 = open, 3 = dot center, 4 = hollow, 5 = + center, 6 = x center, 7 = - center, 8 = | center, 9 = half up, 10 = half right, 11 = half down, 12 = half left. For any numeric values outside of this range, no symbol displays.

If your data plots are part of a plot group, you will note that the Interior drop-down list does not support use of a data set to control display of plot symbol shape.

To specify a column to control symbol size:

  1. Open the Plot Details dialog box (Format:Plot).

  2. Choose the Symbol tab.

  3. Select the Show Construction check box.

  4. Select the plot control data set from the Size drop-down list.

When you select a column from the Size combination box, the data set values determine the data point size in units of points. You can scale those data set values by selecting or typing a value in the associated Scaling Factor combination box.

To specify a column to control angle:

  1. Open the Plot Details dialog box (Format:Plot).

  2. Choose the Vector tab.

  3. Select the plot control data set in the Angle drop-down list (Vector Data group).

When you select a column from the Angle drop-down list, the data set values determine the vector angle for each data point in the associated row. The units are determined by the Angular Unit group on the Numeric Format tab of the Options dialog box (Tools:Options).

To specify a column to control magnitude:

  1. Open the Plot Details dialog box (Format:Plot).

  2. Choose the Vector tab.

  3. Select the plot control data set in the Magnitude combination box (Vector Data group).

When you select a column from the Magnitude drop-down list, the data set values determine the vector magnitude in units of points.

In this example, a line + symbol data plot is created. Subsequently, a data set is designated to control symbol shape, with symbols alternating between squares and circles.

  1. Create the following worksheet and then highlight column B(Y) and click the Line + Symbol [image] button on the 2D Graphs toolbar.

  2. Double-click on the data plot to open the Plot Details dialog box.

  3. On the Symbol tab, select the Show Construction check box.

  4. Scroll to the bottom of the Shape drop-down list and select Col(C).

  5. Click OK.

Note that the Line & Symbol plot now displays with two symbol shapes -- filled circle and filled square. What you have done is to use the C(Y) column values -- either 1 or 2 -- to determine symbol shape. You are probably wondering how these values relate to symbol shape. If you

To Display Both Symbol Shapes in the Legend:

In the previous example, we used values in data set to determine symbol shape for a single 2D line & symbol plot. The result was a plot where symbol type varied by data point. In such cases, the plot symbol in the legend will not accurately represent the data plot.

In the following example, an empty D(Y) column (without data) is added to the graph layer as a line + symbol data plot with circle symbols. Because the column contains no data, the data plot doesn't actually plot in the graph layer. However, we can use the data set's plot attributes to customize the legend display.

  1. Make the worksheet active and click the Add New Columns [image] button on the Standard toolbar. Origin adds a D(Y) column to the worksheet.

  2. Make the graph active and double-click on the layer [image] icon in the upper-left corner of the graph. This opens the Layer 1 dialog box.

  3. Select the added D(Y) column in the Available Data list and click [image] to move this data set into the Layer Contents list.

  4. Click the Layer Properties button to open the Plot Details dialog box with the layer 1 icon selected on the left side of the dialog box.

  5. Click the plus sign next to the layer icon to view the associated data plot icons.

  6. Click on the WorksheetName: A(X), D(Y) icon on the left side of the dialog box. The controls for this data plot become active (on the right side of the dialog box).

  7. Select Line + Symbol from the Plot Type drop-down list (bottom-left side of the dialog box).

  8. On the Symbol tab, click the down arrow next to the Preview view box.

  9. Select the filled circle (column 1, row 2).

  10. Click OK twice to close both dialog boxes.

  11. Right-click on the B in the legend and select Properties from the shortcut menu. This opens the legend's Text Control dialog box.

  12. Replace \L(1) %(1) with the following text: \L(1)\L(2) %(1)

  13. Click OK. The legend now displays a square and circle data plot icon.

To learn more about customizing the legend, see How to Have Complete Control Over the Legend Display.

Note: To display an enhanced legend that conveys information about the data point display properties, select Graph:Enhanced Legend.

  1. Create the following worksheet and then highlight column B and click the Line + Symbol button on the 2D Graphs toolbar.

A(X) B(Y) C(Y)

1 1 1

2 2 2

3 3 1

4 4 2

5 3 1

6 2 2

7 1 1

  2. Double-click on the data plot to open the Plot Details dialog box.

  3. On the Symbol tab, select the Show Construction check box.

  4. Select Col(C) from the Shape drop-down list.

  5. Click OK.

Displaying Both Symbol Shapes in the Legend

  1. Make the worksheet active and click the Add New Columns button on the Standard toolbar. Origin adds one D(Y) column to the worksheet.

  2. Make the graph active and double-click on the layer 1 icon in the upper-left corner of the graph. This action opens the Layer 1 dialog box.

  3. Click on data1_d in the Available Data list and then click the right arrow button to move this data set into the Layer Contents list.

  4. Click the Layer Properties button to open the Plot Details dialog box with the layer icon selected on the left side of the dialog box.

  5. Click the plus sign next to the layer icon to view the associated data plot icons.

  6. Click on the Data1: A(X), D(Y) icon on the left side of the dialog box. This data plot's controls become active on the right side of the dialog box.

  7. Select Line + Symbol from the Plot Type drop-down list (on the left side of the dialog box).

  8. On the Symbol tab, click the down arrow next to the Preview view box.

  9. Select the filled circle (column 1, row 2).

  10. Click OK twice to close both dialog boxes.

  11. Double-click on the "B" in the legend to open the legend's Text Control dialog box.

  12. Replace \L(1) %(1) with the following text: \L(1)\L(2) %(1)

  13. Click OK. The legend updates displaying a square and circle data plot icon.

Using Data Sets as a Plotting Enhancement

Color is not the only plot attribute that is controllable by values in a data set (see, Using Values in a Data Set to Control Data Plot Color). Other data plot elements (for example, scatter plot symbol size) can be set by values from an Origin worksheet or Excel workbook data set. These plot control options are chosen from drop-down lists and combination boxes in the Plot Details dialog box. When such options are available for a specific data plot element, Origin will list Col(Name) entries at the bottom of the drop-down list or combination box, where Name is the worksheet or Excel workbook column name.

Origin only lists the active data plot's Y or Z columns in the worksheet, and columns that are located to the right of these columns. If you want to specify a column that is not listed (because it is located to the left of the data plot's Y or Z column), move the desired worksheet column with the Move Right [image] button on the Column toolbar.

Note that if you intend to implement data set control of plot elements for each plot in a (dependent) group, you will need to supply a separate column of control values for each data plot in the group. When you group data sets, Origin increments display properties among grouped data sets. Thus , Origin expects that you will specify a display control data set for the first Y column in a group that is n columns to the right of the Y data set. For the next data plot in the group, Origin, looks n columns to the right of this Y column to find the display control data set for that data plot, and so on. So, if your group contains 5 plots, you will need to set up your worksheet with 5 display control data sets; each control data set must be n columns to the right of the data set that it controls.

Origin supports data set control of the following data plot elements:

Note: The X End and Y End drop-down lists on the Vector tab of the XYXY vector Plot Details dialog box also list columns for control selection. However, the XYXY vector plot elements are only controllable by worksheet data set selection.


Data Plots: Customizing Specific Elements

The elements in your data plot -- symbols, lines, fill patterns, error bars, data labels, etc. -- are customized in the Plot Details dialog box. You can initiate editing of most elements by double-clicking on a particular data plot element. This opens the Plot Details dialog box tab with controls relevant to the particular element.

Symbols

Lines

Fill Patterns

Column, Bar, and Box Spacing

Pie Slices

Vectors

Contours

3D Surfaces


Symbols

Origin allows considerable flexibility when choosing symbols for 2D scatter, line + symbol, and ternary graphs; box, histogram (+ probabilities), and QC statistical charts; as well as in 3D scatter and trajectory graphs. Symbols are chosen from the symbol gallery on the (Plot Details) Symbol tab.

To open the gallery:

  1. Click the down arrow next to the Preview box.

  2. Click on a symbol in the gallery to select it. The selected symbol then displays in the Preview box.

The default symbol gallery can be expanded to include characters from the Symbol font set. To include characters from the Symbol font set in the symbol gallery:

Other Symbol Display Options:

  • Displaying Every nth Data Point

  • Displaying Your Bitmaps as Symbols

  • Constructing Custom Symbols Including Geometric Symbols, Characters from any Font Set, and Row

  • Displaying a Box Around Alphabetic Symbols

  • Using a Data Set to Control the Symbol Display in a Data Plot

  • Controlling Symbols with Grouped Data Plots

  • Working with Symbols in 3D Graphs


Displaying Every nth Data Point

To display every nth data point in a line + symbol or scatter data plot:

  1. Double-click on the data plot to open the Plot Details dialog box.

  2. Select the Drop Lines tab, and then select the Skip Pts check box in the Data Points Display Control group.

  3. Specify the data point display frequency in the associated text box. For example, type 5 in the text box to display every 5th data point as a symbol.

  4. To display a continuous line in a line + symbol data plot with "skip points" enabled, select the (Plot Details) Line tab and clear the Gap to Symbol check box in the Symbol/Line Interface group.


Displaying Your Bitmaps as Symbols

You can display bitmaps that you have created in other programs as symbols in your graph. The bitmaps cannot exceed 16 x 16 pixels in size. If a bitmap is larger than this, Origin will display only the upper-left corner of the bitmap.

To display your bitmap as a data plot symbol, do the following:

  1. Copy your bitmap to the Clipboard.

  2. In Origin, select Tools:Options and then select the Graph tab.

  3. Click on a cell in the User Defined Symbols grid. While pointing at the cell, press CTRL+V. This keyboard operation pastes the symbol from the Clipboard into the cell. To copy a symbol from a cell in the grid, click on the cell and press CTRL+C. To delete a symbol from a cell, press CTRL+X.

  4. Click OK to close the Options dialog box.

  5. Re-open the (Plot Details) Symbol tab. Your user-defined symbols display at the bottom of the symbol gallery. You can also use your symbols when the Show Construction check box is selected and the associated User Defined Symbols radio button is selected.

All white portions of your bitmap will display as transparent in the data plot symbol. The black portions of your bitmap, or any colored portions, will display using the color from the Symbol Color button.

Note: On some computers, user-defined symbols may display as black squares in regions of the graph. If you experience such display problems, try resolving the problem by increasing the setting of your Windows Color Palette. For example, if your current setting is 256 color, increase the setting to True Color (24 bit). Additionally, the user-defined symbols display problem might be resolved by updating your printer driver. To check if the printer driver is causing the display problem, restart your computer in Safe Mode. If this change resolves the display problem, then consider updating your printer driver.


Constructing Custom Symbols Including Geometric Symbols, Characters from any Font Set, and Row

Select Geometric to use a symbol from the Shape drop-down list and an interior pattern from the Interior drop-down list.

Select Hollow from the Interior drop-down list to display overlapping data plot elements through the symbol.

Select Open from the Interior drop-down list to prevent overlapping data plot elements from displaying through the symbol (except when None is selected from the Fill Color button, in which case the overlapping elements display).

Select Single Alphabetic to use a single alphanumeric character for all the points in the data plot. Select the desired font set and character from the associated controls.

Select Incremental Alphabetics to use alphanumeric characters incrementing by one for each consecutive data point in the data plot. Select the desired font set and "start" character from the associated controls.

Select Row Number Numerics to use the data point's row number as the symbol in the data plot. Select the desired font set from the associated drop-down list.

Select User Defined Symbols to use a bitmap that you added to the User Defined Symbols grid on the Graph tab of the Options dialog box. Available user-defined symbols display in the Symbol List drop-down list.

Constructing Custom Symbols: Geometric Symbols, Font Set Characters, Row Numbers and User-Defined Symbols

In addition to using symbols from the Symbol Gallery you can construct custom symbols. To construct symbols, select the Show Construction check box on the (Plot Details) Symbol tab.

Once selected, a number of controls display beneath the check box that allow you to:

  • Construct a geometric symbol.

  • Use a character from a font set as a symbol.

  • Select a starting character from which to increment through a font set.

  • Use row numbers as symbols.

  • Select a user-defined symbol.

Note: When either Single Alphabetic or Incremental Alphabetics is selected, the Outline check box is available. Select this check box to display an outline or box around each data point symbol.


Using a Data Set to Control the Symbol Display in a Data Plot

  1. Create this worksheet, highlight column B(Y) and click the Scatter button [image] on the 2D Graphs toolbar.

This creates a scatter plot with black, filled-square symbols.

  2. From the menu, select Format:Plot. This opens the Symbol tab of the Plot Details dialog box.

  3. Select the Show Construction check box.

  4. Select the Geometric radio button.

  5. From the Shape drop-down list, select the col(B) (at the bottom of the list).

  6. Click OK. The scatter plot symbols should display as square, circle, up triangle, down triangle, and diamond.

Note that symbol shape increments by data point, with the values in column B -- 1, 2, 3, 4, and 5 -- controlling symbol shape; the first five symbol shapes are nothing more than the first five symbols in the Symbol tab's Shape drop down list.

Using a Data Set to Control the Symbol Display in a Data Plot

Use the Show Construction controls on the Symbol tab to specify a worksheet column whose values determine the symbol display on a point-by-point basis. Column values are index numbers associated with the symbol list. This option is available for geometric symbols and user-defined symbols. However, it is only available when editing a data plot that is either...

  • not part of a group.

  • is part of a group but which has Edit Mode set to Independent.

This short tutorial illustrates how this works:

Note: The symbol control data set and the data points data set don't need to be the same data set. A separate column can supply the symbol shape specification.


Controlling Symbols within Grouped Data Plots

The method for editing symbol shape in grouped data plots is determined by the Edit Mode setting on the Group tab of the Plot Details dialog box.

When Edit Mode is set to Dependent (default), you can best control symbol shape (or any other plot attribute) by creating and manipulating Group Incremental Lists.

When Edit Mode is set to Independent, you are free to edit data plot attributes independently. The plot attributes that were set at the time of grouped data plot creation are retained but there is no longer any dependency of plot attributes among grouped data sets. Note that choosing Independent will remove the Group Incremental List controls from the Group tab of the Plot Details dialog box. Hence, any editing of plot attributes should be done for each data set using the controls on the available tabs of the Plot Details dialog box, using the same methods as one would use to edit ungrouped data plots.


  1. With your 3D scatter or trajectory graph active, select Format:Plot from the Origin menu. This opens the Symbol tab of the Plot Details dialog box.

  2. Select the check box associated with the projection icon, in the left side of the Plot Details dialog box.

  3. Click Apply or OK to project the original plot onto the selected plane.

Working with Symbols in 3D Graphs

The Plot Details dialog box for 3D scatter and trajectory graphs also includes the option to display XY, ZX, and YZ projections of the (original) 3D data plot.

To project data onto the XY, ZX, or YZ plane:

You can control the symbol attributes of projected plots just as you can the symbol attributes of the original plot. This includes the option to select the Show Construction check box with all of the associated symbol construction options.

Whenever the data plot icon is selected on the left side of the dialog box, an Edit Control tab displays. The Edit Control tab is provided so that you can display projections in your 3D scatter or trajectory graph, and quickly control their display based on your original 3D data plot settings. Alternatively, you can use this dialog box for custom edit control.

  • Select All Together to display and edit the settings on the (Plot Details) Line, Symbol, and Drop Lines tabs for the 3D data plot (original) and the three projections.

  • Select Fully Independent to edit each of the 3D data plot elements (original, XY, ZX, and YZ) separately.

  • Select Original Independent of Projections to edit the 3D data plot (original) element separate from the projections.

Note: When you select a data plot element icon on the left side of the dialog box, be careful not to inadvertently clear the icon's check box. To activate the tabs of a data plot element icon with a selected check box, click on the text next to the icon, not in the check box.

To learn more about 3D scatter graphs, review the 3D SCATTER.OPJ project located in your Origin \SAMPLES\GRAPHING\3D PLOTS folder.


The (Plot Details) Symbol Tab

Click the down arrow next to the Preview box (not shown) to open the symbol gallery for symbol selection. Display characters in the symbol gallery by selecting the Symbol Gallery Displays Characters check box on the Graph tab of the Options dialog box. When this option is enabled, use the Font in Gallery drop-down list (in the Preview group) to control the character list.

Type or select the symbol size, in points, from the Size combination box. If you select a worksheet column from this combination box, a Scaling Factor combination box displays. Type or select a value to scale the associated column values. For example, select 0.25 to scale each cell value by 0.25.

Select the desired value from this drop-down list to determine the border width of hollow or open symbols. Enter n to specify the width of the symbol border as n% of the symbol's half diameter. Select Default to use the value specified from the Symbol Border Width combination box on the Graph tab of the Options dialog box.

Depending on your symbol selection, either a Symbol Color button displays, or a Symbol Edge Color button and a Symbol Fill Color button display. Select a color by clicking on the respective button.

If your data includes repeated (X,Y) pairs, you can display the repeated pairs with an X offset, and then display the actual (X,Y) value as a short vertical line by selecting this check box.

Select Show Construction to build symbols for your graph, based on your selections from the associated controls.

Select Geometric to use a symbol from the Shape drop-down list and an interior pattern from the Interior drop-down list. Select Hollow from the drop-down list to display overlapping data plot elements through the symbol. Select Open from the Interior drop-down list to prevent overlapping data plot elements from displaying through the symbol (except when None is selected from the Fill Color button, in which case the overlapping elements display).

Select Single Alphabetic to use the same alphanumeric character for all the points in the data plot. Select the desired font set and character from the associated controls.

Select Incremental Alphabetics to use alphanumeric characters incrementing by one for each consecutive data point in the data plot. Select the desired font set and start character from the associated controls.

Select Row Number Numerics to use the row number corresponding to the data point as the symbol in the data plot. Select the desired font set from the associated drop-down list.

Select User Defined Symbols to display a bitmap that you added to the User Defined Symbols grid on the Graph tab of the Options dialog box. Your available user-defined symbols display in the Symbol List drop-down list.

When either Single Alphabetic or Incremental Alphabetics is selected, the Outline check box is available. Select this check box to display an outline or box around each data point symbol.

The (Plot Details) Symbol Tab

The symbols in 2D scatter, line + symbol, and ternary graphs; box, histogram + probabilities, and QC statistical charts; as well as in 3D scatter and trajectory graphs are all controlled from the (Plot Details) Symbol tab.

Dialog Box Controls (see figure)

The Preview Group

The Size Combination Box

The Edge Thickness Drop-down List

The Color Buttons

The Overlapped Points Offset Plotting Check Box

The Show Construction Check Box and Associated Controls


The (Plot Details) Drop Lines Tab

You can add horizontal or vertical drop lines to...

  • ... any 2D data plot type that includes symbols.

  • ... the Z axis for 3D scatter and trajectory graphs.

The drop lines controls are on the (Plot Details) Drop Lines tab.

Drop Lines Tab Controls (see figure)

For 2D graphs: Select the Horizontal or Vertical check boxes to display horizontal or vertical lines from each data point symbol to the bottom X or left Y axis. Optionally, select the Skip Points check box in the Data Points Display Control group to display a specified frequency of data points. Type the frequency in the associated text box. For example, type 5 in the text box to display every 5th data point as a symbol. This setting also effects the display of the data plot drop lines, symbols, error bars, and data labels.

For 3D graphs: Select the Parallel to X/Y/Z Axis check boxes.) Select the desired line style, width, and color from the associated controls. When you select Automatic from the Color drop-down lists, Origin uses the color selected from the Symbol Color or the Edge Color buttons on the (Plot Details) Symbol tab.


The (Plot Details) Edit Control Tab

The Edit Control tab is provided so that you can quickly display projections in your 3D scatter or trajectory graph, and quickly control their display based on your original 3D data plot settings. Alternatively, you can use this dialog box for custom edit control.

To see this tab, highlight the XYZ data set in the left side of the Plot Details dialog box. The Edit Control tab will appear to the right side.

Edit Control Tab Controls (see figure)

  • Select the All Together radio button to display and edit and apply the settings on the (Plot Details) Line, Symbol, and Drop Lines tabs to the (Original) 3D data plot and to the three Projections.

  • Select the Fully Independent radio button to edit elements for each of the 3D data plots (Original + three Projections) separately.

  • Select the Original Independent of Projections radio button to edit the 3D data plot (Original) element separately from the projections.


Lines

Origin provides access to a broad range of line Connect and Style options for use in 2D line, line + symbol, polar, area, fill area, XYAM vector, XYXY vector, and high-low-close graphs; box and histogram statistical charts; as well as in 3D scatter, trajectory, ribbon, wall, and waterfall graphs.

Connect and Style options are set on The (Plot Details) Line Tab.


The (Plot Details) Line Tab

Select the Gap to Symbol check box to display a gap between each symbol and associated line for data plots that include both lines and symbols. To alter the size of this gap, edit the Line Symbol Gap (%) combination box on the Graph tab of the Options dialog box (Tools:Options).

When the Gap to Symbol check box is cleared, the Draw Line in Front and Draw Line Behind radio buttons are available, allowing you to control the display of the line through the symbol. To display the line through the symbol, select the Draw Line in Front radio button. Alternatively, select the Draw Line Behind radio button to hide the line.

Note: The Draw Line in Front and Draw Line Behind radio buttons have the same visual effect on a data plot with a symbol interior set to hollow. The lines always display through the symbol. To hide the lines, select a new symbol from the symbol gallery or from the Interior drop-down list (Show Construction selected) on the (Plot Details) Symbol tab.

Select the desired line connection from this drop-down list. Note that if you perform an interpolation on your data plot, the line connection type will affect the interpolation results.

The available line connection types are as follows:

  • No Line

  • Straight

  • Segment

  • Segment 3

  • B-Spline

  • Spline

  • Step Horz

  • Step Vert

  • Step H Center

  • Step V Center

  • Bezier

The data points are not connected.

A straight line is displayed between data points.

The connection display alternates between Straight and No Line.

The connection display alternates between Straight for three points, No Line, Straight for three points, etc.

For a pair of data sets with coordinates [image] , [image] , Origin makes a smooth curve using a cubic B-spline connection. The B-spline curve can be described by parametric equations. Around point [image] it takes the form:

Xi(t) =

and Yi(t) =

where [image] . The coordinates are calculated around each point letting t range from 0 to 1. This cubic B-spline curve is continuous up to a second order derivative. Unlike spline curves which pass through the original data points [image] , the B-spline curve winds around the original data points without passing through them. (Origin duplicates the first and last data points so the curve passes through them.)

Note: One advantage of the B-spline connection is that it does not have any requirements for the original data points, whereas the spline connection requires that the X coordinates by strictly increasing.

This option generates a cubic spline connection. To use the connection, the X values must be discrete and increasing. Furthermore, the number of data points cannot exceed 900 (if the data set exceeds this number, the operation will fail).

Since curvature information is held in memory, the spline resolution remains the same regardless of page magnification. The SplineStep variable in the ORIGIN.INI file controls the spline calculation increment. It is expressed in units of .1 point.

This option generates a right angle connection. The initial line is horizontal.

This option generates a right angle connection. The initial line is vertical.

This option generates a right angle connection. Each point is in the middle of the horizontal run.

This option generates a right angle connection. Each point is in the middle of the vertical run.

This option generates a Bezier curve. The Bezier curve is very similar to the B-spline curve. It can be described by parametric equations around four original data points:

Origin uses four consecutive data points, say [image] , i = 1, 2, 3, 4, to construct a section of Bezier curve letting t range from 0 to 1. The curve always passes through the first and the fourth points, but not the second and third. The next section of the curve is constructed by [image] , i = 4, 5, 6, 7. The process is repeated until all data points are included (if the total number of points is not a multiple of 4, the remaining points are not used in the connection). The derivatives of the curve are not continuous over the whole range, but within each section (where t ranges from 0 to 1) the curve is continuous up to the second order derivative.

Select the style for the connection line from this drop-down list. At low screen resolutions or in small windows, the dashed lines may appear solid. However, a printout should draw the line correctly.

Note: You can customize the dash patterns in the Origin Dash Lines group on the Graph tab of the Options dialog box (Tools:Options).

Type or select the desired line width from this combination box. The line width is measured in point size where 1 point=1/72 inch.

Select the desired line color from this drop-down list.

Note: You can display the lines and symbols in a line + symbol data plot using different colors. To do this, select the desired symbol color from the Symbol Color button or from the Edge Color and Fill Color buttons on the Symbol tab, and then select the desired line color from the Color drop-down list on the Line tab. Alternatively, if you edit the line Color drop-down list first and then click OK or Apply, both the lines and symbols in the data plot will reflect your change. This is because by default, Automatic is selected from the symbol color buttons, so that the symbol color follows the line color. To alter this behavior, make a different selection from the symbol color buttons.

  • To fill the area denoted by the data plot line and the bottom X axis (assuming the axis position is not offset) for a line and a line + symbol data plot:

  • To fill the area determined by the data plot and a baseline defined by the first and last data points in the data plot.

  • To fill the region outside of the area determined by the data plot and a baseline defined by the first and last data points in the data plot:

When you select the Fill Area Under Curve check box, Origin displays a Pattern tab in the Plot Details dialog box. Edit the Pattern tab to customize the fill region.

For information on the Pattern tab, see The (Plot Details) Pattern (or XY/YZ/XZ Faces) Tab.

  1. Select Fill Area Under Curve and then select Normal from the associated drop-down list.

For the polar data plot, Origin fills the area denoted by the data plot line and the bottom X axis major grid lines at 0 and 180 degrees.

  1. Select Fill Area Under Curve and then select Inclusive Broken by Missing Values from the associated drop-down list .

If the data plot includes missing values, Origin fills the first segment of the data plot (up to the first missing value), and then fills the second segment of the data plot up the next missing value, etc. This option is also ideal if you want to fill an enclosed area determined by a data plot.

  1. Select Fill Area Under Curve and then select Exclusive Broken by Missing Values from the associated drop-down list

If the data plot includes missing values, Origin fills the area outside of the first segment of the data plot (up to the first missing value), and then fills the area outside of the second segment of the data plot up the next missing value, etc. This option is also ideal if you want to fill the region outside of an enclosed area determined by a data plot.

The (Plot Details) Line Tab

The actual suite of controls available on the Line tab is plot-type dependent. This reference topic reviews all of the possible controls on this tab.

Line Tab Dialog Box Controls (see figure)

The Symbol/Line Interface Group

The Connect Drop-down List

The Style Drop-down List

The Width Combination Box

The Color Drop-down List

The Fill Area Under Curve Check Box and Drop-down List


Fill Patterns

Origin provides a broad range of fill patterns for use in 2D bar, column, stack bar, stack column, floating column, floating bar, pie, area, fill area, and polar graphs; box, histogram, stacked histograms, and histogram and probabilities statistical charts; as well as in (XYY...) 3D bars, ribbons, walls, and waterfall graphs.

Fill pattern control is available from the (Plot Details) Pattern tab.

For 3D bars, walls, and waterfall graphs, this control is available from the XY Faces, YZ Faces, and XZ Faces tabs.

The (Plot Details) Pattern (or XY/YZ/XZ Faces) Tab


The (Plot Details) Pattern (or XY/YZ/XZ Faces) Tab

  • Select a border color from the Color button.

  • Select a line style from the Style drop-down list.

  • Select or type a line width from the Width combination box. The line width is measured in point size where 1 point=1/72 inch.

Note: You can customize the dash patterns available from the Style drop-down list in the Origin Dash Lines group on the Graph tab of the Options dialog box (Tools:Options).

  • Select the desired fill color from the Fill Color button. Select None to display a transparent fill.

  • Select the desired fill pattern from the Pattern drop-down list.

  • When a pattern is selected from the Pattern drop-down list, the Pattern Color button is available. Select a color from this button. When Automatic is selected, Origin uses the Border Color button setting for the pattern color.

  • Type or select the desired fill pattern line width from the Width combination box. The line width is measured in point size where 1 point=1/72 inch.

Origin displays your current tab settings in this view box.

  • Select Same to use the Fill settings on the XY Faces tab for the YZ faces (or XZ faces) of your 3D data plot.

  • Select Independent to control the fill display of the YZ faces (or XZ faces) independent of the Fill settings on the XY Faces tab.

  • Select Lighter or Darker to display a lighter or darker shade of the fill color selected on the XY Faces tab for the YZ faces (or XZ faces).

The (Plot Details) Pattern (or XY/YZ/XZ Faces) Tab

These tabs provide controls to edit the fill region and border in your graph. If a control is not appropriate for a particular graph type, the control is unavailable on the tab.

Dialog Box Controls (see figure)

The Border Group

The Fill Group

The Preview Box

The Relation to XY Faces Drop-down List (YZ and XZ Faces tabs only)


Column, Bar, and Box Spacing

Origin provides controls to customize the spacing between bars, columns, and boxes in 2D bar, column, stack bar, stack column, floating column, and floating bar graphs; box, histogram, stacked histograms, and histogram and probabilities statistical charts; as well as in (XYY...) 3D bars, ribbons, walls, and waterfall graphs.

Spacing controls are on the (Plot Details) Spacing tab.

The (Plot Details) Spacing Tab

Stacking Columns or Bars


This combination box value controls the spacing between the columns, bars, or boxes for each X value, in units of % of the width of the columns, bars, or boxes at each X value.

This combination box is only available if the data plot is part of a data plot group.

Type or select a value from this combination box to overlap the columns or bars at each X value by this amount. The combination box is in units of % of the width of an individual column or bar.

This combination box is only available for (XYY...) 3D bar graphs.

Type or select a value from this combination box to set the thickness of the 3D bars. The combination box is in units of % of the X axis increment.

The (Plot Details) Spacing Tab

The controls on the Spacing tab are dependent on the current data plot type. The following reference section reviews all the possible controls on this tab.

Dialog Box Controls (see figure)


Stacking Columns or Bars

To stack grouped bars or columns in the active graph layer:

  1. Select Plot:Stack Grouped Data in Layer.

This menu command is checked when selected. Though any graph type can be stacked, this menu command is used mainly with column, bar, and area graphs.

To unstack the data plots:

  1. Re-select Plot:Stack Grouped Data in Layer (to remove the check mark next to the menu command).

A stacked data plot displays data against a cumulative Y axis scale, with the Y values in each X axis category combined and displayed as subgroups.


The (Plot Details) Error Bar Tab

Color. Select the desired error bar color from the Color drop-down list. Select Automatic to ensure that the error bar color follows the associated symbol color in a data plot with symbols, or the associated line color if no symbols exist.

Line Width. Type or select the error bar line width from the Line Width combination box. The width is in units of points.

Cap Width. Type or select the error bar cap width from the Cap Width combination box. The error bar cap width is in units of points.

Through Symbol. Select the Through Symbol check box to display error bars through points in the data plot.

Apply to Layer. Select the Apply to Layer check box to apply the Style group settings to all error bars plotted in the layer.

Plus. Select the Plus check box to draw error bars above the data plot, or pointing away from 0, when the Relative radio button is selected. This option is most useful when editing error bars in a column graph that includes negative column values.

Minus. Select the Minus check box to draw error bars below the data plot, or pointing toward 0, when the Relative radio button is selected.

X Error Bar. Select the X Error Bar check box to draw error bars in the X (horizontal) direction.

Absolute/Relative.

  • Select the Absolute radio button to draw plus Y error bars pointing up and minus Y error bars pointing down.

  • Select the Relative radio button to draw plus Y error bars pointing away from 0 and minus Y error bars pointing toward 0.

The (Plot Details) Error Bar Tab

The Error Bar tab provides controls to edit the color, line width, and other style properties of the error bars in the data plot, as well as the direction of the error bars.

Error Bar Tab Controls (see figure)

The Style Group

The Direction Group


The (Plot Details) Label Tab

The Label tab for scatter plot labels

Select a font from this drop-down list. The Default font is controlled from the Default drop-down list on the Text Fonts tab of the Options dialog box.

Select a text label color.

Type or select a size from this combination box. The size is in units of points.

You can center, left justify, or right justify the data labels relative to their associated data points. For example, select Left to align the left edge of the labels with the XY coordinates of the data point (Hint: You may want to use this setting in conjunction with the X and Y Offset).

Align the data labels by selecting Left Y, Right Y, Top X, or Bottom X from this drop-down list. The label maintains the orientation set in the Rotate text box, but shifts to the specified axis location. Select None to align the data labels at the XY coordinate.

The value in the Rotate text box determines the degree of rotation of the data labels:

  • Positive values rotate counterclockwise.

  • Negative values rotate clockwise.

The X Offset text box determines the horizontal offset of the data labels.

The Y Offset text box determines the vertical offset.

The offset is measured as a percentage of the font height.

Select this check box to display a white background for each data label value.

The (Plot Details) Label Tab

The Label tab provides controls to edit:

  • The format and location of the data labels in the data plot.

  • The display of contour labels in a contour graph.

The controls available on the Label tab are dependent on the type of data plot element you are editing.

The Label Tab Controls (see figure)

The Font Drop-down List

The Color Drop-down List

The Size Combination Box

The Justify Drop-down List

The Attach to Axis Drop-down List

The Rotate Text Box

The X Offset and Y Offset Text Boxes

The White Out Check Box


Pie Slices

Origin provides Plot Details dialog box controls to customize the pie slice fill, the pie and pie slice geometry, and the pie slice labels.

Note: To learn more about pie charts, review the 3D PIE CHART.OPJ project located in your Origin \SAMPLES\GRAPHING\3D PLOTS folder.

Retaining the Changes You Make to the Pie Slice Labels

Removing the Boundary Box Around the Pie Chart

The (Plot Details) Pie Geometry Tab

The (Plot Details) Labels Tab


Retaining the Changes You Make to the Pie Slice Labels

Default labels display next to each slice in a pie chart. The default label display is determined by the settings on the (Plot Details) Labels tab.

If you customize the display of the pie slice labels as, for instance, by clicking-and-dragging to reposition a label or by double-clicking on a label to edit the text, you will need to clear two check boxes before printing or refreshing the graph; otherwise your customizations will be lost.

  • Clear the Associate with Wedge check box in the Position group to prevent Origin from moving the labels back to their default position.

  • Clear the Automatic check box in the Format group to prevent Origin from changing the content back to the default setting.


Removing the Boundary Box Around the Pie Chart

To remove the boundary box around the pie chart:

  1. Select Format:Layer when the pie chart graph window is active.

  2. Select the Display tab and clear the X Axes and the Y Axes check boxes in the Show Elements group.

  3. Click OK to close the dialog box and remove the boundary box.


The View Angle text box determines the view angle of the pie chart. The units are in degrees. Type 90 to view the chart as 2D.

The Thickness text box determines the thickness of the pie slices. The units are in % of the pie chart radius.

The Starting Azimuth (deg) text box determines the location of the first pie slice in the chart.

Select the Counter Clockwise check box to display the pie slices in a counterclockwise orientation.

The Rescale Radius text box resizes the pie chart. The units are in % of the frame. The frame is the boundary box around the pie chart.

Use the Horizontal Offset text box text box to shift the chart to the right (n > 0) or left (n < 0). The units are in % of the frame (the boundary box around the pie chart).

To displace a pie slice from the pie chart, select the pie slice's check box in this group. Specify the displacement for any selected slices from the Displacement text box. The units are in % of the pie chart radius.

The (Plot Details) Pie Geometry Tab

The (Plot Details) Pie Geometry tab provides controls to edit the view and rotation of the pie chart, as well as the displacement of individual pie slices.

Dialog Box Controls (see figure)

The 3D View Group

The Rotation Group

The Radius/Center Group

The Pie Sections Group


When the Automatic check box is selected, the contents of the pie slice labels are determined by the selections from the associated check boxes (see note below).

  • Select the Values check box to display the worksheet cell values as labels.

  • Select the Percentages check box to display the percent of the total for each cell value.

  • Select the Categories check box to display associated X values for each pie slice. If there is no associated X column, then row numbers display.

When the Associate with Wedge check box is selected, the position of the pie slice labels are determined by the Dist. from Pie Edge text box. The units of this text box are in % of the pie chart radius.

The (Plot Details) Labels Tab

The (Plot Details) Labels tab provides controls for customizing the labels of the pie chart.

Dialog Box Controls (see figure)

The Contents Group

The Position Group

Note: If you edit the label content (either via in-place methods or using the Text Control dialog box) or you move the label from its default location, Clear the Automatic and Associate with Wedge check boxes before making your changes. This will ensure that your changes are retained when the graph is printed or refreshed.


Vectors

Origin offers two types of vector graphs, XYAM and XYXY.

The XYAM vector graph requires X, Y, angle, and magnitude data sets.

The XYXY vector graph requires X1, Y1, X2, and Y2 data sets.

Using Color to Represent the Vector Magnitude

The (Plot Details) Vector Tab


Using Color to Represent the Vector Magnitude

Vector length in XYAM vector graphs is controlled by the values in the magnitude worksheet column (in units of points). Another option for displaying each vector's magnitude is to use color. You can establish a mapping relationship between ranges of magnitude values and an associated scale of colors. You can then use the worksheet magnitude values to determine each vector color in the graph, based on your established color map. The basic steps you should follow to use color to represent the vector magnitude follow.

  1. On the (Plot Details) Vector tab, select Color Mapping:Col(MagnitudeColumn).

  2. Set the vector length to a constant value or keep the length mapped to the MagnitudeColumn from the Magnitude combination box.

  3. Select the Color Map tab and customize the magnitude ranges and associated colors.

  4. After you close the Plot Details dialog box, add a color scale legend to your graph by selecting Graph:New Color Scale. Alternatively, right-click in the layer and select New Color Scale.


The (Plot Details) Vector Tab

Select a vector color from the Color button.

Type or select the desired vector width from this combination box, in units of points.

The Length combination box determines the length of the arrowheads. The units are in points.

The Angle combination box determines the arrowhead angles in degrees.

Select the Closed radio button to display the arrowheads with fill. Select the Open radio button to display the arrowheads without fill (transparent).

The XY values can determine the head, midpoint, or tail of the vector. Select the desired radio button.

Select the column that contains the vector angle values from the Angle combination box. Alternatively, select a value from this combination box. The angle is measured counterclockwise from a line parallel to the X axis, bisecting the vector. The units are controlled by the Angular Unit setting on the Numeric Format tab of the Options dialog box (Tools:Options).

Select the column that contains the vector magnitude values from the Magnitude combination box. Alternatively, select a value from this combination box. The units are points.

Select or type a value to proportionally increase or decrease the length of the vectors from the Magnitude Multiplier combination box. For example, type .5 to draw the vectors at half their original length. The default value is 1, so that the Magnitude combination box value determines the vector lengths.

Select the column that contains the X end point values from the X End drop-down list. Select the column that contains the Y end point values from the Y End drop-down list.

The (Plot Details) Vector Tab

The vectors in both XYAM and XYXY graphs are customized on the (Plot Details) Vector tab.

Dialog Box Controls (see figure)

The Color Button

The Width Combination Box

The Arrowheads Group

The Position Group (XYAM only)

The Vector Data Group (XYAM only)

The End Point Group (XYXY only)


Contours

Contour graphs are surface graphs of matrix data, plotted in 2D space. Viewing a contour graph is the same as viewing a 3D surface graph from a point perpendicular to the XZ plane. In contour graphs, ranges of Z values are distinguished by different colors or gray scale, labeled contour lines, or both.

Origin provides three contour graph types: color fill, black and white lines and labels, and gray scale maps. The (Plot Details) Color Map/Contours, Label, and Numeric Formats tabs provide controls for editing your contour graphs.

To learn more about color mapping and contour graphs, review the 3D SURFACE & CONTOUR.OPJ and the CONTOUR.OPJ projects located in your Origin \SAMPLES\GRAPHING\3D PLOTS folder. Additionally, review the COLOR SCALE.OPJ project located in your Origin \SAMPLES\GRAPHING\2D PLOTS folder.

The (Plot Details) Color Map/Contours Tab

The (Plot Details) Label Tab

The (Plot Details) Numeric Formats Tab


The (Plot Details) Color Map/Contours Tab

To resize a column in the dialog box view box, point the mouse at the edge of a column button until the pointer displays as a left/right arrow. Drag to resize the column.

To customize the minimum or maximum Z or Y level, type the desired value in the associated text box. Click the Find Min/Max button to automatically set the Minimum and Maximum text box values, based on your Z or Y values.

Additionally, you can customize the range associated with each level or you can specify the number of levels by selecting the appropriate radio button.

If your data is plotted on a logarithmic scale, select the Log Scale check box to establish a logarithmic set of level ranges.

Once you have set up the ranges of Z or Y values (levels), you can customize the color and fill associated with each level. For contour graphs, this option is only available if the Enabled check box is selected in the Color Fill Control group. When this check box is selected, you can display the fills using the contour lines as a boundary, or using the axis grid lines.

You can customize the fill associated with any level by clicking on the respective fill in the viewing box. This action opens the Fill dialog box for that level. Select a fill color, pattern, pattern color, and pattern line width from this dialog box. The pattern line width is in units of points. Select None from the Fill Color drop-down list for a transparent fill. To create a custom color, select Custom from the drop-down list and then right-click on the "Custom" text.

You can also customize a range of fills, or all the fills, by establishing the minimum and maximum fill criteria for the associated range.

To customize the fills for a range, select the desired range from the Level column (so that your range is highlighted), and then click the Fill button.

To customize all the fills, click the Fill button when either no level is highlighted, only one level is highlighted, or when all the levels are highlighted. These actions open the (expanded) Fill dialog box.

To customize the colors in the selected range (or for all levels), edit the controls in the Color Generations by Interpolation group.

Select the Limited Mixing radio button to select a minimum level fill color (From) and a maximum level fill color (To) and to fill the levels between these extremes with a linear mix of the two colors.

Select the Introducing Other Colors in Mixing radio button to have Origin automatically introduce complementary colors into the mix. This option provides fill colors that are more distinct than the Limited Mixing option.

To customize the patterns in the selected range (or for all levels), edit the controls in the Pattern Generations group. Select the From and To patterns, pattern colors, and line widths.

If the pattern selections are of the same style (for example, Dense to Sparse), then the pattern is interpolated between the levels.

If the pattern selections are not of the same style, then the levels are split in half with the bottom half using the From style and the top half using the To style. If only one pattern is defined (for example, the From pattern), then that pattern is used for all levels.

The Range group displays the range of levels that are affected by the current dialog box settings. To alter the range, you must close the dialog box and select the desired range from the Level column of the Color Map/Contours tab and then click the Fill button again.

If you want to edit all the levels, make sure that no more than one level is selected from the Level column (or that all the levels are selected).

To edit the details of a contour line, click on the desired line in the viewing box. This action opens the Line dialog box.

Select or clear the Show check box to display or hide the respective line in the contour graph. When the check box is selected, you can customize the line color, style, and width from the associated controls.

To edit all the contour lines in your graph, click the Line button (on the Color Map/Contours tab). This action opens the Contour Lines dialog box.

The Show Lines group controls the show/hide display of the contour lines. Select the Keep Current radio button to maintain your selections from the Color Map/Contours tab. Alternatively, select the Show All or Hide All radio buttons to show or hide all the contour lines.

The Line Properties group allows you to control the display of all the contour lines in your graph. To do this, select the Apply to All check box. When the check box is selected, you can customize the color, style, and width - for all the lines - from the associated controls.

To control the display of Z level labels in your contour graph, click to select the desired level check boxes. To show or hide all the labels in your graph, click the Labels button. This action opens the Contour Labels dialog box.

Select the Keep Current radio button to maintain your selections from the Color Map/Contours tab.

Alternatively, select the Show All or Hide All radio buttons to show or hide all the contour labels.

Note: To add labels directly in your graph, right-click on the contour line location where you want to display a label and select Add Contour Label from the shortcut menu. To move a label on a contour line, drag the label to the desired location.

The Rescale Mode drop-down list allows you to control whether or not the Z or Y levels that are established on the Color Map/Contours tab will update if the currently plotted Z or Y values change, or if new data is plotted into the template.

If you select Normal, Origin will automatically find the minimum and maximum Z or Y values in your data set, and then create evenly sized Z or Y levels and associated colors.

If you select Manual, the current Z or Y levels and associated colors set on the Color Map/Contours tab will remain fixed, independent of the Z or Y range of your data set. To alter the levels and colors, you must edit the Level and Fill controls.

If you select Fixed From, the minimum level will remain unchanged, independent of the Z or Y range of your data set.

Alternatively, if you select Fixed To, the maximum level will remain unchanged, independent of the Z or Y range of your data set.

The (Plot Details) Color Map/Contours Tab

The (Plot Details) Color Map/Contours tab provides controls for customizing the contour levels, fill, contour lines, and contour labels for contour graphs.

In addition to contour graphs, this tab is also available when you select Color Mapping:Col(ColumnName) from a data plot element's Color button on the respective tab of the Plot Detail's dialog box (Hint).

Customizing the Contour or Color Map Levels

Origin displays a default set of Z or Y levels by finding the minimum and maximum Z or Y values plotted in the contour (or other) graph, and then finding a Z or Y increment that results in eight levels. Two additional levels are added to represent values less than, or in excess of, the minimum and maximum Z or Y values. Thus, by default there are a total of 10 levels. The fill color, lines, and labels associated with each level display to the right in the viewing box.

  • To insert a level, highlight the level that is directly below where you want the level added. Click the Insert button in the Level group to add a level. Origin divides the range for the level you clicked on in half, and assigns the first half of the range to the inserted level.

  • To delete a level, click on the level to select it and then click the Delete button in the Level group. When you delete a level, the surrounding levels are not altered.

  • You can edit an individual level value by double-clicking on the value and typing the desired value. You can also edit the full range of levels by clicking on the Level button. This action opens the Set Levels dialog box.

Customizing the Contour or Color Map Fill Colors and Patterns

Customizing the Contour Lines

Customizing the Contour Labels

Controlling the Color Map Rescale Mode When the Z or Y Values Change


The (Plot Details) Label Tab

When you select any Labels check boxes on the (Plot Details) Color Map/Contours tab, you can customize the font for the labels on the Label tab.

Select the desired font, color, and size from the associated controls. Optionally, specify bold, italic, or underline.

To enhance the display of the labels on the color contours, select the White Out check box.


Specify the display format for the color map and contour levels from the Format drop-down list. Select between decimal, engineering, and scientific display. If you select one of the decimal formats, Origin uses a threshold for conversion to scientific notation. This threshold is controlled on the Numeric Format tab of the Options dialog box (Tools:Options).

Type a value in the Divide by Factor text box to divide all the color map and contour levels by this amount.

Select the Decimal Places radio button to control the display of the number of digits after the decimal place. Select the desired value from the associated list box.

Select the Significant Digits radio button to control the number of digits displayed. Select the desired value from the associated list box.

Type a prefix or a suffix to append to the color map and contour level labels in the associated text boxes. The prefix and suffix display in the graph. They do not, however, display in the level list on the Color Map/Contours tab. When you type a prefix or suffix, you can use special formatting commands to control the font style (for example, superscript, subscript, and bold).

The Min. Area (%) combination box can be used to set a percent value such that only contours that have a fraction of the total area larger than the set value will have a label associated with them.

The (Plot Details) Numeric Formats Tab

The (Plot Details) Numeric Formats tab provides controls for customizing the display of the numeric values for the color map levels. This control includes the level values in the Level dialog box, the level list on the Color Map/Contours tab, the contour labels in the graph, and the color scale legend in the graph.

Dialog Box Controls (see figure)

The Numeric Formats Group

The Labeling Criteria Group


3D Surfaces

Origin provides the following surface graph types: color fill, X or Y constant with base, color map, bars, and wire frames. The (Plot Details) Side Walls, Wire Frame, Grids, Surface/Projections, and Bars tabs provide controls for editing your surface graphs.

Note: To customize the XY, YZ, and ZX planes, or the axis length and rotation, edit the Axis tab of the Plot Details dialog box when the layer icon is selected on the left side of the dialog box.

The (Plot Details) Wire Frame (or Grids) Tab

The (Plot Details) Side Walls Tab

The (Plot Details) Surface/Projections Tab

The (Plot Details) 3D Bars Tab


The (Plot Details) Wire Frame (or Grids) Tab

Select the grid lines for display in the graph from this drop-down list.

Type or select the desired grid line width from this combination box. The grid line width is in units of points.

For color fill and X or Y constant with base surfaces, select a grid color from the associated drop-down list.

  • For color map surfaces:

  • For wire frames and wire frame surfaces:

Select the Single radio button to display all the grids using the color from the associated drop-down list. Select the Use Color Map radio button to display the grids using the color map established on the Color Map tab.

For wire frames and wire frame surfaces, select the Single radio button to display the grids using the color from the associated drop-down list. Select the Dual Color radio button to display additional lines between the surface grid lines. Type the number of additional lines in the Number of Lines text box. Select the color for the additional lines from the Second Color drop-down list.

Select the Back Color check box to display a color on the back side of the surface. Select the desired color from the associated drop-down list.

Select the surface color from this drop-down list.

The (Plot Details) Wire Frame (or Grids) Tab

The (Plot Details) Wire Frame (or Grids) tab provides controls for customizing the wire frame or grids for all the surface graphs except the 3D bars. The controls on the tab are identical for each of these surface graphs, except for the grid and fill color controls. These controls are dependent on the type of surface graph you are editing.

Dialog Box Controls (see figure)

The Enable Grids Drop-down List

The Grid Line Width

The Grid Color Group

The Surface Group

The Front Color Drop-down List (Color Fill and X or Y Constant with Base only)


The (Plot Details) Side Walls Tab

Side walls are 2D walls that extend from the height of the surface graph down to the bottom of the Z axis range:

  • X side walls display in the XZ plane.

  • Y side walls display in the YZ plane.

The (Plot Details) Side Walls tab provides controls for displaying the side walls and customizing their color.

To open the Side Walls tab:

  1. From the menu, choose Format:Plot. This opens the Plot Details dialog box.

  2. Select the Side Walls tab.

  3. Select the Enable button to display X and Y side walls in the graph.

  4. Select the desired color from the associated drop-down lists.

  5. To hide either the X or Y side walls, select None from the associated drop-down list.


To display a fill color on the 3D surface, select the Fill Color check box in the Surface column. To display the fill color as top or bottom contours, select the Fill Color check box in the Top Contour or Bottom Contour column.

Similarly, to display contour lines with the fill color, select the check box associated with the surface or the desired contour. Select the contour line color and width from the associated drop-down lists. The contour line width is in units of points.

The Z clipping controls allow you to clip the color map surface at the lower or upper axis scale range. Both controls are in units of % of the Z axis scale.

When the Low (%) text box is set to 0, the surface is not clipped at the low end. If you type n in this text box, the surface that is associated with the lower n% of the Z axis scale is clipped from view.

When the High (%) text box is set to 100, the surface is not clipped at the high end. If you type n in this text box, the surface above n% of the Z axis scale is clipped from view. For example, type 75 to clip the surface associated with the top 25% of the Z axis scale range.

The (Plot Details) Surface/Projections Tab

The Surface/Projections tab provides controls to edit the surface display of a color map surface graph, as well as the top and bottom contour projections. This tab also provides controls to hide data above or below a specified Z value.

Dialog Box Controls (see figure)

The Surface, Top Contour, and Bottom Contour Controls

The Z Clipping Group


Select a border color from this drop-down list.

Type or select a border line width from this combination box. The border line width is in units of points.

Select the Same for All radio button to display all the bars using the same color. Select the bar color from the associated drop-down list.

Select the Increment radio button to increment the bar color along the Y axis. Select the start color from the associated drop-down list. Origin increments through the color palette.

Type or select a value from the X (Y) Direction combination box to set the thickness of the bars along the X or Y axis.

The combination box is in units of % of the X (Y) axis increment.

The (Plot Details) 3D Bars Tab

The Bars tab provides controls to customize the display of 3D bar graphs. These controls include the bar border and fill, as well as the bar widths.

Dialog Box Controls (see figure).

The Border Color Drop-down List

The Border Width Combination Box

The Fill Color Group

The Bar Widths (%) Group


Displaying Multiple 3D Surfaces or a 3D Surface and Multiple 3D Scatter Data Plots

Origin allows you to plot two surfaces or one surface and multiple 3D scatter data plots in the same graph layer using the Layer n dialog box. However, when you combine these data plots in a layer, Origin does not perform any calculations concerning the intersections of the data plots, and thus no information can be inferred by any visual indication of an intersection.

For example, while it is possible to display two surfaces in a surface plot, Origin simply draws one surface and then draws the second surface as if the first one didn't exist. Thus, you can create two hemispheres (from two matrices) and have them draw in the correct sequence so as to appear like a complete sphere, but rotation of this figure may produce a visually confusing image.

Additionally, you can include a 3D surface and 3D scatter points (with or without drop lines) in the same graph layer. However, close inspection of the drop lines may appear to indicate that some points are floating above the surface as if they were calculated incorrectly or displayed in the wrong location. However, this is an artifact of the drawing routine.

Because the scatter data points and the "corners" of the polygons that represent the 3D surface (Origin uses a polygon rendering method to draw 3D surfaces) occupy the same points in space, the "back to front" drawing method used by Origin does not include a process to further sort the drawing order. In some cases, the scatter point is drawn first (with its drop line) and subsequently drawn polygons will cover up parts of the scatter data point. However, in other cases the polygons that share this point in space are all drawn first and the scatter point and drop line are drawn on top. Another polygon may draw over parts of the drop line from a scatter point, giving the illusion that the drop line intersects the surface at some distance away from the scatter data point.

You can verify that all points lie on the surface by rotating the figure to view the surface edge-on. Removing perspective will reveal that all the scatter points lie exactly on the surface.


Customizing Grouped Data Plots

When you select and simultaneously plot multiple data sets in a single graph layer, Origin automatically creates a data plot group. This feature provides for automatic customization of grouped plots, saving you the trouble of assigning differentiating characteristics to each data set/data plot. Despite the convenience of this feature, you will probably want, at some point, to customize the appearance of your grouped data plots.

Grouped data plot customization is effected primarily via controls on the Group tab of the Plot Details dialog box. The appearance of dependent grouped data plots is controlled by:

  • The order in which data sets are listed in the plot group (in the Data List at the bottom of the Data menu, the plot list on the left side of the Plot Details dialog box, or in the Layer Contents list in the Layer n dialog box).

  • The members of the incremental list for each plot element (e.g. color = black, red, green...; symbol shape = square, circle, up-triangle...).

  • Whether the element is set to increment on the Group tab of the Plot Details dialog box,

and, if so,...

  • ...whether the element is set to increment in a Nested or Concerted manner.

Most will find that creating and applying custom incremental lists to be the best way to customize grouped data plots. To learn more about Group Incremental Lists and the customization of grouped data plots, see Group Incremental Lists.

Some may prefer to disable the plot group dependency altogether, and simply edit grouped plot elements independently. The primary disadvantage of this technique is that you cannot save your customizations as a Theme or Group Incremental List (which can then be applied to existing or future graphs). However, you can save independent customizations of grouped data to a graph template file.


Group Incremental Lists

To set a plot element to automatically increment:

  1. Select the check box in the Increment column next to the element -- Line Color, Symbol Type, etc. -- that you want to vary.

To modify an Increment List:

  1. Right-click once at the right edge of the Details column. A "browse" button will appear.

  2. Click once on the browse button to open the Incremental List dialog.

  3. Drag list members to rearrange the list.

  4. Right-click on the list to Add or Delete colors from the list or to Save a List as a Theme (.OTH) file or Load a previously saved .OTH file.

  5. To replace any member of the list, click once on the list member and make your selection from the drop-down list.

To choose between Nested or Concerted incrementing behaviors:

  1. Right-click anywhere in the Group Incremental List controls and choose Nested or Concerted from the shortcut menu.

To reorder the plot elements:

  1. Drag the list of elements.

To save a List:

  1. Right-click anywhere in the Incremental List controls and choose Save.... Note that if you Save from this location, you save all lists of elements plus incrementing behaviors.

If you save from inside one of the element lists, you save only the members of the list:

To load a List:

  1. Right-click anywhere in the Incremental List controls and choose Load.... Note that if you Load from this location, all .OTH files are listed.

If you load from inside one of the element lists, you can only choose from relevant .OTH files:

Group Incremental Lists

When multiple worksheet columns are selected and plotted through the Plot menu (or from one of the graph toolbars), data sets are -- by default -- grouped within a graph layer. Use Group Incremental Lists to automatically assign a visually distinct set of plot characteristics to each data set in the group. This feature works by incrementing through the members of a style list for each plot element -- Line Color, Symbol Type, Line Style, etc. -- that you have chosen to increment. In addition to choosing which elements to increment, you can customize the Group Incremental Lists themselves, adding, removing, and rearranging list members as needed and you can name and save Group Incremental Lists for future use.

Further, you can specify that plot elements - Line Color, Symbol Type, Line Style, etc. -- increment in either a Concerted or Nested fashion. When elements increment in a Concerted fashion, all elements that are set to increment will cycle through their member lists independently. When elements increment in a Nested fashion, you establish a hierarchy of elements in which all members of the first element list are exhausted before the members of the second element list are incremented:

In the above example, when Nested behavior is chosen, the first three grouped plots would use: Red, Green, Blue (for lines, symbols, etc.) but all three would use the upward pointing triangle for a symbol shape. Only when the fourth data set in the group was plotted would the rightward-pointing triangle symbol be used; the fifth and sixth data sets would use the same symbol shape, the seventh, eighth and ninth would use the downward-pointing triangle, etc. The three color/four symbol shape lists in this example could be used to assign a unique plot to each of 12 data sets without incrementing another plot element (such as line style, symbol interior, etc.).

Open the Group tab of the Plot Details dialog box (To open, activate the graph window and choose Format:Plot from the Origin menu) to control these Group Incremental List behaviors:

  • Whether or not a particular plot element is incremented according to the members of a list.

  • What the list contains.

  • Whether incrementing occurs in a Concerted or Nested fashion.

  • The order of (Nested) element lists.

  • Saving a Group Incremental List.

  • Loading a Group Incremental List.


Independent Editing of Grouped Data Plots

This is not the preferred method for customization of grouped data plots because settings cannot be saved to a Theme/Group Incremental List for use with other grouped data plots. You can, however, save settings to a graph template file.

To edit grouped data plots independently:

  1. From the menu, select Format: Plot.

  2. Select the Group tab.

  3. Select the Independent radio button.

You are now free to edit the grouped data plots independently. Note, however, that the data plots are still grouped; if you return to the Group tab and reselect the Dependent button, plot characteristics will change according to the settings and increment lists on the Group tab.


Reference: The (Plot Details) Group tab

Select the Independent radio button to format the display properties of the data plots in the group independently.

Select the Dependent radio button to enable the incrementing controls below these radio buttons.

Note: The preferred method for customizing grouped data plots is to develop your own Group Incremental Lists.

When the Dependent radio button is selected, the individual data plot icons in the left-hand pane of the Plot Details dialog box are not selectable -- the individual data plots cannot be edited in this state.

Selecting Independent allows you to edit the display properties -- symbol shape, line style, etc. -- of any data plot in the group.

Use these controls to customize the appearance of grouped data plots and, simultaneously, develop Group Incremental Lists.

This figure shows a typical incremental list for a 2D scatter plot:

The first column is a list of plot elements. The second column (Increment) lists those elements that are currently incremented by data set. The third column (Details) is actually a set of controls for constructing incremental lists.

Use the controls in this box to:

  • Specify whether or not a particular plot element is incremented according to the members of a list.

  • What the list contains.

  • Whether incrementing occurs in a Concerted or Nested fashion.

  • The order of (Nested) element lists.

  • Saving a Group Incremental List.

  • Loading a Group Incremental List.

To set a plot element to automatically increment:

  1. Select the check box in the Increment column next to the element -- Line Color, Symbol Type, etc. -- that you want to vary.

To modify an Increment List:

  1. Right-click once at the right edge of the Details column. A "browse" button will appear.

  2. Click once on the browse button to open the Incremental List dialog.

  3. Drag list members to rearrange the list.

  4. Right-click on the list to Add or Delete colors from the list or to Save a List as a Theme (.OTH) file or Load a previously saved .OTH file.

  5. To replace any member of the list, click once on the list member and make your selection from the drop-down list.

You can specify that plot elements - Line Color, Symbol Type, Line Style, etc. -- increment in either a Concerted or Nested fashion. When elements increment in a Concerted fashion, all elements that are set to increment will cycle through their member lists independently. When elements increment in a Nested fashion, you establish a hierarchy of elements in which all members of the first element list are exhausted before the members of the second element list are incremented.

To choose between Nested or Concerted incrementing behaviors:

  1. Right-click anywhere in the Group Incremental List controls and choose Nested or Concerted from the shortcut menu.

To reorder the plot elements:

  1. Drag the list of elements.

To save a List:

  1. Right-click anywhere in the Incremental List controls and choose Save.... Note that if you Save from this location, you save all lists of elements plus incrementing behaviors.

If you save from inside one of the element lists, you save only the members of the list:

To load a List:

  1. Right-click anywhere in the Incremental List controls and choose Load.... Note that if you Load from this location, all .OTH files are listed.

If you load from inside one of the element lists, you can only choose from relevant .OTH files:

This view box displays current plot attributes for all the data plots in the group. The view box updates as you change selections on the Group tab or on the associated Plot Details dialog box tabs.

The (Plot Details) Group tab

When you open the Plot Details dialog box and select a data plot icon on the left side of the dialog box that is part of a data plot group for which the plot attributes increment automatically, Origin displays the Group tab. The controls available on this tab vary depending on the graph type and the display selections that have been made on other Plot Details tabs.

If you are unfamiliar with the concept of Group Incremental lists and the customizing of grouped data plots, we suggest that you see Group Incremental Lists for a better explanation on the use of these page controls.

Dialog Box Controls (see figure)

The Edit Mode Group

The Increment Controls

The Group Members Preview Box


Exchanging Graphics Between Graph Windows

There are several ways in which you can copy information from an Origin graph and paste it into another graph window or into another application.

  • To copy a graph layer -- data sets, labels, axes, etc. -- and paste it into another graph window as an active, editable graph, see Copying Graphs Between Pages.

  • To copy an entire graph page and paste it as a (picture) object into another graph window, see Copying the Entire Page of the Active Graph Window (as an Object) to another Graph Window.

  • To copy text or drawing objects and paste them into another graph window, see Copying Labels via the Clipboard.

  • To combine multiple (editable) graphs onto a single graph page, see Merging and Extracting Graphs.

  • If you are constructing layout pages, be sure to see Adding a Graph or Worksheet Picture to the Layout Page Window.


Copying Graphs Between Pages

To copy a graph, including any labels or data, from one graph window to another, do the following:

  1. Select the graph layer you want to copy by clicking on the axis to generate a highlighted boundary.

  2. Select Edit:Copy.

  3. Click in the destination graph window. (Hint: The location in which you click becomes the upper-left corner of the layer.)

  4. Select Edit:Paste.


Copying the Entire Page of the Active Graph Window (as an Object) to another Graph Window

Origin provides the option of copying a graph, as an object, from one graph window to another graph window.

To add a graph, as an object, to a graph window:

  1. Select the graph window containing the graph you want to copy.

  2. From the menu, select Edit:Copy Page.

  3. Select the destination graph window, right-click and select Paste from the shortcut menu.


Merging and Extracting Graphs

Origin provides a quick method of merging several single layer graphs into one multiple layer graph. After merging, you can rearrange the layers as needed.

For more information, see Merging and How Merging Affects Linked Layers.

Conversely, you can extract each layer of a multi-layer graph to a separate graph window. For more information, see Converting a Multiple Layer Graph Window into Multiple Graph Windows.


Merging Graph Windows

Select Edit:Merge All Graph Windows to copy the contents of the pages in all the graph windows and place them into either:

  • A new merged window; in this case the old graph windows are retained.

  • The page of the currently active graph window; in this case, the old graph windows are not retained.

Note: Only graph windows in Project Explorer folders that are visible in the workspace are included in the merge operation. Of these, minimized or hidden graph windows are excluded from the merge operation.

Before merging, Origin asks if you want to keep the old graph windows. If you click No, Origin will prompt you one final time before continuing with the merge operation.

Origin merges the graph windows by following the graph window order in the Window menu window list. The first graph window in the list becomes layer 1 in the merged graph window. The second graph window in the list becomes layer 2 in the merged graph window, etc. If any graph window includes multiple layers, those layers are added to the merged graph following the layer order in the original graph.

After the merged graph is created, you can exchange the position of any two layers using the Layer tool.

You can also exchange the layer number (not position) of any two layers using the following object method:

page.reorder(Layer1, Layer2) (ENTER)

where Layer1 and Layer2 are the layer numbers that you want to swap. For more information, see the LabTalk Help file.

To “undo” a merge operation, click the Extract to Graphs button on the Graph toolbar.


How Merging Affects Linked Layers

Any links that existed between layers before merging are preserved by the Merge All Graph Windows menu command. Thus, if a graph window contains two layers, and layer 2 is linked to layer 1, then after the merge process this layer linking arrangement will still exist (although the layer numbers may change).

In addition to preserving links, Origin also preserves your custom axis link settings (on the Link Axes Scales tab of the Plot Details dialog box). If you linked layers spatially by selecting % of Linked Layer from the Units drop-down list on the Size/Speed tab of the Plot Details dialog box, then Origin also maintains the spatial relationship between the two layers. This can cause an unexpected layer arrangement in the merged graph window. To avoid this, remove the spatial link between layers before merging by selecting % of Page from the Units drop-down list.


Converting a Multiple Layer Graph Window into Multiple Graph Windows

To convert a multiple layer graph window into multiple graph windows with single layers:

  1. Click the Extract to Graphs button on the Graph toolbar.

All layers are extracted to individual graph windows, even if a layer is linked to another layer. The original graph window is not saved during the extraction process.


Hiding and Deleting Plot Elements

Hiding Data Plots

Deleting Layers

Hiding Labels, Data, and Layers


  1. Right-click on the desired data plot and select Hide Data Plot from the shortcut menu.

To view the hidden data plot, right-click in the respective layer and select Show All Data from the shortcut menu.

  1. Right-click on the data plot you want to view and select Hide Others from the shortcut menu.

To view the hidden data plots, right-click in the respective layer and select Show All Data from the shortcut menu.

  1. Select View:Show:Data. This action removes the check mark next to the command and hides the data plots in the graph window.

To view all the data plots in the active graph window, reselect View:Show:Data.

Hiding Data Plots

Origin provides an option to hide a single data plot, all data plots in the layer except for the selected data plot, or all data plots in the active graph window.

To hide a single data plot:

To hide all data plots in the layer except for the selected data plot:

To hide all data plots in the active graph window:

Note: Hiding data plots reduces the screen redraw time. Additionally, hiding data plots may make it easier for you to see the result of any axis, or axis label, manipulation. However, if you want the data plot included in a printout, remember to display the data plot before printing.


Deleting Layers

To delete a layer:

  1. Select the layer by clicking once inside the layer. A highlighted boundary with control handles displays around the layer.

  1. Press DELETE.

or

  2. Right-click on the active layer's layer icon and select Delete Layer from the shortcut menu.


Hiding Labels, Data, and Layers

  1. De-select the View:Show:Labels menu command. Labels display when this menu command is checked.

To view the labels, re-select View:Show:Labels.

Note: To print a graph with hidden labels (and other objects), re-select the View:Show:Labels menu command before printing.

  1. De-select the View:Show:Data menu command. Data plots display when this menu command is checked.

To view the data plots, re-select the menu command.

or

  1. Right-click on a data plot and select Hide Data Plot or Hide Others from the shortcut menu. The Hide Data Plot menu command hides the selected data plot. The Hide Others menu command hides all data plots in the layer except the selected data plot.

To display the data plots, right-click in the layer and select Show All Data from the shortcut menu.

  1. De-select the View:Show:All Layers menu command. The layers display when this menu command is checked.

  2. To re-display the layers, re-select the View:Show:All Layers menu command.

  1. Right-click on a layer icon and select Hide Layer from the shortcut menu. This menu command hides the layer associated with the layer icon.

  2. To re-display the layer, re-select the shortcut menu item (clearing the check mark).

Hiding Labels, Data, and Layers

In addition to controlling the redraw criteria of a graph window, you can hide labels (objects) and data plots in your graph window to reduce the graph window redraw time.

To hide labels on the page:

To hide all data plots on the page:

To hide the non-active layers on the page:

To hide a specific graph layer:


The Graph: Templates and Themes

As with Origin worksheets and matrixes, Origin graphs are based on a named template file. These template files store information relevant to the appearance of the window and the manner in which data are imported and displayed in the window. Graph templates commonly store information regarding page size, plot type, line/symbol/fill/outline colors, etc. Template files (worksheet and matrix as well as graph) can also store objects such as text or drawing objects or button objects that are capable of running some routine when the object is activated.

Templates are a powerful, time-saving feature. They are particularly useful for creating graphs because you can create a custom graph with a wide range of style settings, save the graph as a template, and recall your style settings (and attached objects) at any time from the user interface or via your Origin C programs or LabTalk Scripts, simply by calling the named template file. Learn more about creating custom graph templates.

While all Origin child windows use templates, Themes are applicable only to graph windows. As applied to graph windows, the Theme concept differs from that of the template in that user-defined styles and formats can be copied and saved independently of the template and can be applied to any plot you make, regardless of the formatting options saved with the graph template. Themes do not allow for copying of text, drawing, or button objects between graphs. Such objects can only be stored with a template file. Learn more about Themes.


Creating a Custom Graph Template

Choose as a starting point an existing graph in your Origin project, or create a new graph:

  • Create a worksheet, matrix or Excel workbook, highlight some data, and click one of the buttons on one of the graph (2D Graphs, 2D Graphs Extended, or 3D Graphs) toolbars.

  • Create a worksheet, matrix or Excel workbook, highlight some data, and select Plot:Graph Type from the Origin menu.

  • Create a worksheet, matrix or Excel workbook, highlight some data, and select Plot:Template Library (most applicable to 2D and a few 3D plot types).

  • Open a previously-saved graph window file.

  • Open an empty template file and add data to the template either by (a) drag-and-drop or (b) the Plot Setup dialog box or (c) through the Layer n dialog box (most applicable to 2D and a few 3D plot types).

Graph customization is discussed under these various topics.

To learn more about what customizations are saved with the template, see Attributes Saved with a Graph Template.

With the graph window active:

  1. Select File:Save Template As from the Origin menu. This menu command opens the Save As dialog box with the Save as Type drop-down list set to Graph Template (*.OTP).

    • To modify the existing template, save your customizations to the default file name.

    • To create a new template, type a new name in the File Name text box.

Note that you can also choose or create a Category Name for your graph template. Categories help you organize your templates so that they are easier to find when creating new graphs.

  2. Click Save to close the dialog box and save the custom template.

Creating a Custom Graph Template

The basic procedure for creating a custom graph template is the same, whether creating a new template or modifying an existing template:

  1. You open a child window based on a named template file.

  2. You customize the window.

  3. You save the template.

The instructions on rebuilding the graph window are saved with the template. Data plots are not saved with the template.


  1. With an Origin worksheet or Excel workbook active, select Plot:Template Library.

or

  1. Click the Template button [image] on the 2D Graphs Extended toolbar. The menu command and toolbar button open the Select Template tool.

  2. Select a template Category.

  3. Select your template from the Template group (you can scroll through all the templates in a category by clicking the [image] buttons).

  4. Click the Plot button to plot the data into the selected template.

Note: Plotting directly to a saved template (as is done using the Template Library) is not possible with all of Origin's built-in graph types (e.g. 3D surfaces and ternary graphs).

The Graph Template Library

Use the Template Library tool to plot your worksheet or Excel workbook data.

  • If you highlight data in the worksheet or workbook before opening the tool, and your data selection is appropriate for the template you select, then clicking the Plot button will plot the selected data into the template.

  • If you do not highlight data or if your data selection is not appropriate for the template you selected, then clicking the Plot button would open the intermediary Plot Setup dialog box for data selection.


Copying Formats and Creating Themes

The Theme concept differs from that of the template in that selected styles and formats are applied to any plot you make, regardless of the settings that have been saved with a particular graph template. Use Themes to copy visual elements of one object or graph and apply them to...

  • one or more selected objects.

  • a graph.

  • all graphs in a folder.

  • all graphs in a project.

At a basic level, the Theme concept is simple:

  1. You customize a graph or a graph object (text label, arrow, etc.).

  2. You select the customized graph or object and you copy the format.

  3. You select a target graph or object and you paste the copied format to the target.

A suite of format options (of your choosing) are applied to the target graph. To learn more, see Copying and Pasting Formats Between Graph Windows. If you wish to save this suite of format options for future use, you save them as a Theme (.OTH) file; a format saved becomes a Theme. To learn more, see Basic Theme Usage.

Themes are managed with the Theme Gallery. You can use or adapt one of Origin's built-in Themes or you can develop your own custom Themes from scratch. A Theme editor (the Theme Editing dialog box) gives you control over each Theme property with the option that you can apply filters which broadly exclude categories of stylistic elements or property types from the Theme.

Furthermore, you can opt to select one Theme to act as a System Theme, giving a consistent look to every graph that you create.

The Group Incremental List is a subset of Themes. Group Incremental Lists allow you to control the formatting of grouped datasets.


  1. Specify the target (Selection, Active Graph, All Graphs in this folder, All Graphs in this Project).

  2. Specify the source using the Apply All or Apply Selected buttons.

    • Apply All settings in the Property/Value list.

    • To apply only selected Properties/Values, use the SHIFT or CTRL keys, make your selection and click the Apply Selected button.

Copying and Pasting Formats Between Graph Windows

To copy a format and apply it to another graph or graph object:

  1. Create and customize your graph or graph object.

  2. Right-click on the customized graph or graph object (text object, arrow, etc.) and select Copy Format.

  3. Choose from All, or a subset of All such as All Style Formats, Colors, Fonts, etc.

  4. To apply the formatting of the customized graph or object to another graph or object, select a target graph or graph object, right-click, and select Paste Format.

... or, to edit or selectively apply formatting to the target:

  4. Select a target graph or graph object, press SHIFT, right-click and select Paste Format from the shortcut menu. This opens the Apply Formats dialog box. Use this dialog box to Delete Properties or edit list Values.

Click here to view a multi-media demonstration


The Simple mode introduces the 'filtering' concept. You can limit the saving of Theme properties by clearing All and selecting groups of properties in the Formats to Save group.

To learn more, see Saving a Format as a Theme.

  • The Advanced mode introduces the Theme Property/Value list controls, giving you a hierarchical or list view of properties and their current values. Right-clicking on a Property lets you choose to Delete the property (thus excluding it from the Theme).

The Value list are active controls, allowing you to edit Theme details.

To learn more, see Saving a Format as a Theme.

Creating Themes

At a basic level, use of the Themes feature is straightforward:

  1. Create and customize your graph or graph object.

  2. Right-click on the customized graph or graph object (text object, arrow, etc.) and select Save Format as Theme. This opens the Save Format as Theme dialog box. This dialog box has two modes:

  • The Simple mode.

  • The Advanced mode.

You can also use the Save Format as Theme dialog box to designate a System Theme.

In the Advanced mode, click the Filters button to open the Theme Properties Filtering dialog.

Click here to view a multi-media demonstration


Saving a Format as a Theme

Simple Mode:

Advanced Mode:

Specify a name for your theme file.

Use this text box to enter a one-line description of the Theme.

This description will be visible in other Themes dialog boxes (for instance, as a "tool tip" when you select the Theme file in the Theme Gallery dialog box).

This non-editable text box shows the name of the System Theme (optional).

Select this box to save the Theme file as your System Theme.

The collection of check boxes in this group can be used to determine what style formats to save to the new theme files. The default is All (all object property settings in your graph).

If you clear All, you can then select just certain format groups such as All Styles, or certain format types such as Color etc.

Click OK to save dialog box settings to a new Theme (.OTH) file.

Cancel out of the dialog box without saving the Theme file.

Click this button to expand the Save Format as Theme dialog box and make further edits and refinements to your Theme.

Once selected, the Edit Theme Details button becomes a Cancel Edit button. See Advanced Mode Controls (next section) for an explanation.

In the lower panel, the Theme parameters are displayed in an expandable tree structure. Specific object format properties are shown in lower level branches. These property values can be changed by:

  • Clicking on the Value and making a selection from the drop-down list (see figure).

  • By selecting or clearing check boxes (see figure).

  • By typing new values into text boxes (see figure).

You can remove a particular property value or property group/node from the tree by right-clicking on the value or property and selecting Delete.

Properties applicable to the group/node can be added to a Theme by right-clicking on group/node and selecting Add. The context menu then expands to show you what is available to add. Clicking OK then saves the modified theme settings to the new theme file.

The List View Check Box

The Filter Button

The Cancel Edit Button

This check box can be used to switch the lower panel display between tree format and list format.

This button opens the Theme Properties Filtering dialog box. To learn more, see Theme Properties Filtering.

When you click the Edit Theme Details button, it becomes a Cancel Edit button. Click this button to discard any changes that were made to the Theme.

Saving a Format as a Theme

Use the Save Format as Theme dialog box to save the object property settings of an existing graph to a theme file; theme file settings can then be applied to future graphs.

To open the Save Format as Theme dialog box:

  1. Right-click on a graph and choose Save Format as Theme from the shortcut menu.

Save Format as Theme Dialog Box Controls (see figure)

The Name of the New Theme Text Box

The Description Text Box

The Current System Theme View Box

The Set as System Theme Check Box

The Formats to Save Group

The OK Button

The Cancel Button

The Edit Theme Details Button

Advanced Mode Controls


System Themes

What is a System Theme?

A System Theme is handy for applying a uniform set of graph styles -- colors, line widths, fill patterns, tick mark configurations, etc. -- to every graph that you make, regardless of the styles that were saved with the template used to create the graph (see Important Note, below). You can designate any Theme as a System Theme. Use of a System Theme is optional and there can be only one System Theme at any given time. If you have designated a System Theme, you will see the name of the Theme displayed on the taskbar in the lower-right corner of the Origin workspace.

Since the property settings in the System Theme will apply to all newly created graphs, your System Theme should include only those properties that you really want to include in all of your graphs. Ideally, a System Theme will consist of only a few key elements.

For example, if you would like to apply an "all ticks in" Theme to a number of your graphs, then the System Theme should probably only contain this property and nothing else. This way, as new graphs are created from your various templates, no template settings other than the one that you are specifically concerned with -- tick direction -- are affected by your System Theme (Note that a System Theme for “ticks in” ships with Origin; you can view and/or edit shipped System Themes to learn how a compact System Theme should be built).

Note that you cannot designate Group Incremental Lists as System Themes.

How do you designate a System Theme?

  • You can designate a System Theme from the Save Format as Theme dialog box. Right-click on a graph window and choose Save Format as Theme from the shortcut menu. This opens the Save Format as Theme dialog box. Select the Set as System Theme check box.

  • You can designate a System Theme from the Theme Gallery. From the menu, choose Format:Theme Gallery. Any existing System Theme registers in the Current System Theme text box. To designate or swap System Themes, right-click on a Theme and choose Set as System Theme from the shortcut menu.

How do you remove the System Theme?

  • You can remove the System Theme via the Theme Gallery. From the menu, choose Format:Theme Gallery. The System Theme, if any exists, will register in the Current System Theme text box; the name will also appear in bold text in the Themes list. To remove the System Theme status from this Theme, highlight the Theme in the list control, right-click and choose Clear System Theme from the shortcut menu.

Important Note: Under various scenarios (e.g. you distribute a script application and a graph template file to co-workers to use on their computers, but unbeknownst to you, some of those co-workers are using a System Theme), having an active System Theme may produce unintended results. If you do not want the System Theme to override settings saved with your custom template(s), you should do the following:

1. Make a graph using your custom template.
2. Open the Script Window or the Code Builder IDE and issue one of the following commands:

PAGE.CNTRL=16; //LabTalk command issued in the Script Window
LabTalk.Page.Cntrl = 16; //Origin C command issued from Code Builder

3. Re-save the graph template.

This ensures that custom template settings will not be changed by an active System Theme. This procedure pertains to both user-interface and scripting/programming applications involving use of graph templates.


Theme Gallery

This non-editable text box displays the name of the Theme (file) that is designated as the System Theme. This box is blank if no System Theme has been chosen. Note that if a System Theme is chosen, this name also displays in the status bar to the lower right of the Origin workspace.

The list control in the center of the dialog box displays all theme files. These files are saved in two places:

  • Themes that ship with Origin are stored in the \Themes folder under the Origin program folder.

  • Themes that you create using the Save as Themes dialog box, are saved to a \Themes subfolder in the User Files folder.

List Control columns:

Name: (Disk File) name of the Theme file.

Size: Size of the Theme file.

Date: Date of creation.

Path: Disk location of the theme file; either Origin (themes shipped with Origin) or User (user-created theme files).

Shortcut Menu Commands Available by Right-Clicking on List Controls:

Add new: This creates a new, blank Theme file. You then build up this empty Theme file by going into Edit mode (see next).

Edit: This brings up the Theme Editing dialog, allowing you to edit the highlighted Theme. To learn more, see Theme Properties Editor.

Delete: Delete the selected (highlighted) Theme. Note that this does not actually delete the theme file, but, instead moves it to a subfolder under \Themes, called \Deleted. This allows you to resurrect Themes by manually moving the Theme file from the \Deleted subfolder back into the \Themes folder.

Duplicate: This duplicates the selected (highlighted) Theme file and renames it Copy of Theme. To rename the Theme, double-click on the Theme Name.

Combine: You can SHIFT + Select multiple Theme files, then select this shortcut menu command to create a Theme file that combines the selected files. If there are duplicate items, the property value of the first encountered occurrence is taken and the later ones are ignored.

Set as System Theme: Set the selected (highlighted) Theme as the System Theme.

Clear System Theme: Clear the current System Theme (set as "none").

Show Tooltips: Show ToolTip when mouse is placed over a theme file name – the ToolTip is the Theme file Description, assigned when the Theme was saved.

This check box is selected by default. If this checkbox is cleared, then Group Incremental Lists are also listed in the Themes List Control (see above).

Incremental Lists apply only to plot groups. Such Incremental Lists can be created from the Plot Details dialog box. To learn more, see Group Incremental Lists.

Note that Incremental Lists cannot be designated as System Themes.

The drop-down list setting determines which graphs the selected Theme will be applied to. The options are:

  • Current Graph: Apply Theme to active graph. If active page is not a graph page, the Apply Now button (see below) is grayed out.

  • Graphs in Folder: Apply Theme to all graphs in current Project Explorer folder.

  • Graphs in Project: Apply Theme to all graphs in the project.

The Apply Now Button: Once you set the drop-down list above, click this button to apply the selected Theme.

The Undo Apply Button: Undo the application of the selected Theme.

The Close Button: Close the dialog box.

Theme Gallery

Use the Theme Gallery to add, duplicate, delete or apply your Themes, as well as to designate or clear a System Theme. To open the Theme Gallery:

  1. From the menu, select Format:Theme Gallery.

or

  1. Press F7.

Dialog Box Controls (see figure)

The Current System Theme View Box

The Themes List Control

The Exclude Increment Lists Check Box

The Apply Theme To Group

Click here to view a multi-media demonstration


Theme Editing

This non-editable box displays the full path and name of the Theme file being edited.

This is an editable, one-line description of the Theme. This description is shown as a ToolTip when you mouse-over a Theme file Name in the Theme Gallery list control.

This non-editable text shows the total number of object properties that are currently contained in the Theme. This number will decrease or increase as object properties are removed from or added to the Theme during the editing process.

This non-editable text shows the date of last Theme file modification.

This control lists the Theme contents. The default style for this list is the tree structure. You can toggle on List View by checking the List View check box to the right.

You can edit any object property in this tree/list by clicking on the entry in the Value column and:

  • selecting a new value.

  • entering a new value.

  • selecting or clearing a check box.

You can also right-click on a property line or a branch of the tree and choose Delete from shortcut menu. Similarly, you can right-click on applicable properties or branches of the tree and choose Add, to add more properties/branches to the tree. When you Delete or Add, the Total Number... control above this list control updates.

Write changes to the Theme to file, and close the dialog box.

Cancel all changes and close the dialog box.

Bring up the Theme Properties Filtering dialog box to edit/modify the Theme using filters. To learn more, see Theme Properties Filtering.

Toggle the list control view of Theme properties between tree mode and list mode.

Selecting this checkbox shows empty branches in a tree. By default, empty branches are hidden.

Once shown, you can right-click on the empty branch to add elements and expand the Theme.

Selecting this box displays branches of three that can only have collection members (for example a Layer collection which could contain Layer1, Layer2 etc).

Theme Editing

Use the Theme Editing dialog box to edit an existing theme.

To open the Theme Editing dialog box:

  1. From the menu, choose Format:Theme Gallery.

  2. Right-click on a theme in the Theme Gallery and select Edit from the shortcut menu.

Theme Editing Dialog Box Controls (see figure)

The File View Box

The Description Text Box

The Total Number of Properties (Size) View Box

The Date Modified View Box

The Property/Value List Control

The OK Button

The Cancel Button

The Filter Button

The List View Check Box

The Show Empty Check Box

The Show Collections Check Box


Theme Properties Filtering

Use these controls to exclude certain categories from the Theme file.

To remove all property entries in the theme which correspond to a category:

  1. Clear the corresponding check box.

  2. Click on the Apply Filter button to the right side of the dialog box.

Example: If you clear Axes Scale and click Apply Filter, all object properties related to axes scales (if they exist) will be excluded from the Theme. The Total Number of Properties (Size) view box will update.

Click Restore to restore Theme settings (those which existed when the dialog box was opened).

Use these controls to selectively turn off specific properties in the Theme. Properties may apply to multiple elements; color, for instance, can apply to background color, color of text objects etc. To filter out all Theme elements corresponding to a property:

  1. Uncheck a property in this group.

  2. Click the Apply Filter. The Theme is filtered and the Property/Value display of member elements is updated in the display below this group. You can restore Theme settings to those that existed when the Filtering dialog box was opened by clicking the Restore button.

Close the dialog box and apply selected changes to the Theme.

Discard changes to the Theme and close the dialog box.

Filter the existing theme properties using the conditions set in the Category and Property Type groups.

Restore Theme settings to those that existed when the Filtering dialog box was opened.

Toggle the Theme display between the tree mode and the list view mode.

This non-editable text box displays the current number of properties in the Theme. As filters are applied to the theme, this number is decremented.

Clicking Restore will restore Theme settings (to those existing at the time that the Filtering dialog box was opened), and restore the original count to this box.

This control lists the Theme contents -- in tree mode or in list view, depending on the List View check box setting. In this Filtering dialog box, the Theme particulars are not directly editable; you can only filter them using the Category and Property Type Filters controls.

Theme Properties Filtering

This dialog provides an alternate way of editing Themes, by subtractive filtering of the object property collection in the Theme using category and property type filters. By de-selecting various Category or Property Filters and clicking Apply Filter, you reduce the number of properties in the Theme. This dialog is accessible while editing a Theme.

To open the Theme Properties Filtering dialog box:

  1. Right-click on a Theme in the Theme Gallery and choose Edit. This opens the Theme Editing dialog box.

  2. Click the Filter button.

or

  1. Right-click on your graph and choose Save Format as Theme. This opens the Save Format as Theme dialog box.

  2. Click the Edit Theme Details button [image]. This expands the Save Format as Theme dialog box.

  3. Click the Filters button.

Theme Properties Filtering Dialog Box Controls (see figure)

The Category Filters Group

The Property Type Filter Group

The OK Button

The Cancel Button

The Apply Filter Button

The Restore Button

The List View Check Box

The Total Number of Properties (Size) View Box

The Property/Value List Control


Text and Drawing Objects

Origin provides tools to annotate your Origin child windows. Most commonly, you will be concerned with annotating graphs and layout pages but you can add text and drawing objects to worksheets and matrix windows, too. These text and drawing objects may be as simple as a text label, or an arrow pointing to a data point that you wish to emphasize. At the other end of the spectrum, you could create a button object (a special text object) that runs some custom routine when the button is pushed.

If you plan to add text or drawing objects to a graph window, particularly a multi-layered graph window, see Layer Association, Attachment Method and Scaling Considerations.

For information on adding annotation to your Origin windows, see Text Objects and Drawing Objects.

For information arranging, grouping, and aligning text and drawing objects, see Arranging and Aligning Objects.

For information on creating and editing graph legends, see the topic Legends and Color Scales.

For more advanced information on resolving math expressions in text labels on linking text and drawing objects to variables and scripts, see Advanced Concepts: Constants, Variables and Scripts.

Click here to view a multi-media demonstration on Text Editing

Click here to view a multi-media demonstration on Drawing


Layer Association, Attachment Method and Scaling Considerations

In a multi-layered graph, an object will be associated with the layer that is active at the point of object creation. Not infrequently, users create a multi-layered graph and put all annotations – regardless of the layer to which they pertain -- into a single layer. While this is not necessarily going to be problematic, it could later hinder your ability to extract your data plots by layer, or to hide or delete an unwanted layer in your graph.

Usually, the best course of action is to put any object that refers to something in layer 1 (data, another object, etc.) in layer 1; put any object that refers to something in layer 2 into layer 2, etc.

All Origin graph objects -- text, arrows, rectangles, buttons, etc.-- are attached to the either the Page, Layer Frame, or the Layer and Scales.

Objects that are attached to the Page do not move when the layer is moved or resized. This method of attachment is appropriate for non-layer specific objects such as page titles (note that while the object is not size or position-dependent upon the layer, it is necessarily part of a layer).

Objects that pertain to a particular graph layer should be attached to "Layer Frame” or “Layer and Scales.” If an object is attached to the layer frame, rescaling the layer axis scale will not cause the object to shift in relation to the layer frame itself. Thus, if you want to add a general annotation that is layer specific, but you do not want it to move if you alter the axis scale values, attach the object to the Layer Frame.

If the object is attached to “Layer and Scales,” its position within the layer frame is tied to the axis scale values. It is possible to create a text object, attach it to layer and scales, and have it disappear from the graph by narrowing the axis scale values sufficiently to exclude that portion of the scale to which the text object is attached. This attachment method is logical for objects that relate to the axis scales -- an arrow object that points to a particular scale value, for instance.

It is important to recognize that each attachment method has its place. Which method you choose will depend upon the purpose of your annotation. It is best to experiment with the three attachment methods and understand the behavior of each.

The size of text and drawing objects that are attached to Page is not affected by moving or resizing of the layer frame. Objects that are attached to Layer or Layer and Scales will, by default, resize in proportion to changes in the size of the Layer Frame.

Controls for default scaling behaviors for objects attached to Layer or Layer and Scales are found on the Scale Elements group of the Display tab (layer level) in the Plot Details dialog box.

To learn more, see Scaling of Objects in Relation to the Size of the Layer Frame and the Display tab of the Plot Details dialog box.

Layer Association, Attachment Method and Scaling Considerations

When you add text and drawing objects to your graph windows, you should give some thought to the following:

  • If you are creating a multi-layered graph, in which layer should the object be included?

  • Should the location of the object be defined by its position on the Origin graph page, or by its position relative to the layer frame or the layer’s axis scales?

  • If you plan to resize the graph or merge the graph with other graph windows onto a single graph page, would you prefer that your annotations scale proportionally to changes in size of the layer frame or would you prefer that they remain a fixed size, independent of the size of the layer frame?


Object Attachment Methods

Controls for object attachment are in the Attach To group of the Label Control dialog box.

To open the Layer Control dialog box:

  1. Select an object.

  2. Right-click and choose Label Control from the shortcut menu.

When you create a text or drawing object (line, arrow, circle, etc.) in an Origin graph, worksheet, layout or matrix window, the object is attached to the window by one of three methods:

  • Page. When attached to the page, the object is both position and scale independent of its layer. Object position and size are not affected by moving or resizing the layer, or by changing the axis scale. However, the object remains a part of the layer that was active at the moment of object creation and is deleted if the layer is deleted.

  • Layer Frame. When attached to the layer frame, the object is position dependent on its layer. When you move the layer, the object moves with the layer. If you resize the layer, the object is resized proportionally and moves with the layer. However, if you rescale the axes (change the axis scale From and To values), the object's size and position remain unchanged.

  • Layer and Scales. When attached to layer and scales, the object is positioned in the layer by axis scale values. If you move the layer, the object moves with the layer. If you resize the layer, the object is scaled proportionally and moves with the layer. If you rescale the axes (change the axis scale From and To values), the object is not resized, but moves in relation to XY coordinate values.


Default Attachment Methods

All Origin child windows to which objects can be attached -- worksheets, graphs, matrixes, and layout windows -- have at least one layer but the layer to which the object is attached, and the attachment method, are most relevant to the customization of graph windows. Whether an object is attached to Page, Layer Frame, or Layer and Scales is determined by:

  • Object type

  • Whether the object is created inside the (graph's) layer frame or outside the layer frame.

Default attachment methods:

Object Type | When Created Inside Layer Frame, Attached to... | When Created Outside Layer Frame, Attached to...
Text, Rectangle, Circle, Polygon, Region, Polyline, Freehand | Layer Frame | Page
Arrow, Line, Curved Arrow | Layer and Scales | Page

Once an object has been created, you can change the attachment method by editing the Attach To group in the Label Control dialog box.

The object attachment method becomes important when resizing and moving graph layers. If an object is attached to the Layer Frame or Layer and Scales, the default behavior is for the object to move or be resized in response to changes in the size or position of the layer frame (Layer Frame and Layer and Scales) or changes in axis scale values (Layer and Scales). To find out how to control the scaling of objects that are attached to the Layer Frame or Layer and Scales, see Scaling of Objects in Relation to the Size of the Layer Frame.


Scaling of Objects in Relation to the Size of the Layer Frame

Objects that are attached to the Layer Frame or Layer and Scales will, by default, scale proportionally to changes in the size of the layer. This graph layer was resized by dragging a control handle on the layer frame. Note that all objects on the graph page -- the added text labels, the arrow, the axis titles, and the legend -- were reduced in size proportionally when the layer was made smaller.

To specify that objects not be resized when changes are made to the size of the layer frame:

  1. With the graph active, select Format:Layer from the menu. This opens the Plot Details dialog box with the layer icon selected on the left side of the dialog box.

  2. Select the Display tab.

  3. Select Fixed Factor and enter a scaling factor (A factor of 1 will fix object size at 100% of created size).

Any changes made to the size of the layer will not produce a proportional scaling of objects that are part of that layer.

Note: Drawing objects (lines, arrows, rectangles, etc.) attached to Layer and Scales will continue to rescale because the size of the object is tied to axis scale values.


Text Objects

Prior to Origin 7, text objects were created, formatted and edited using the Text Control dialog box. Origin 7 introduced "in-place" methods for creating text labels. The in-place methods are more intuitive and natural; you (1) select the Text tool, (2) click at the point in your Origin child window where you want to create your label, and (3) begin typing. Several new tools -- a Format toolbar, a Style toolbar, and a Symbol Map -- were introduced to assist in formatting text labels using the new in-place methods.

While the in-place methods are the preferred way to create text objects, the older Text Control dialog box remains a part of the Origin software. Since these two parallel methods exist for creating text objects, we document both. However, the in-place methods are emphasized. Text Control dialog box methods are only emphasized where they gain the user some specific advantage.

Creating and Editing Text Labels

Click here to view a multi-media demonstration


Creating and Editing Text Labels

  1. Click the Text Tool [image] button.

  2. Click at the desired text entry point on your Origin window.

or

  1. Right-click at the desired location in your Origin window.

  2. Select Add Text from the shortcut menu.

then

  3. Select your text format options from the Format and Style toolbars and begin typing.

To exit the text editing mode, click outside the label or press ESC.

Note: When creating text labels, if you click within a layer and create your text label, the label becomes part of the layer. The text is attached to the layer frame. If you move or resize the layer, the default behavior is for the text label to move and resize in proportion to the layer frame's size and position.

If you click outside of any layer and create your text label, the label will not move or resize when the layer is moved or resized, unless you click and drag the label explicitly. Use independent labels (attached to the page) to create text -- like page titles -- that won’t be moved.

To learn more about how the method of attachment affects text objects, see Object Attachment Considerations.

The Format and Style Toolbars

If text is not selected, the toolbar formatting and color options are invoked at the current cursor location. Otherwise, formatting/color selections only apply to highlighted text.

You can also add special characters from a selected font set by right-clicking while in in-place editing mode (or press CTRL+M) and selecting Symbol Map from the shortcut menu .

  1. Double-click to enter the in-place editing mode.

To temporarily turn off the rotation when you in-place edit rotated labels:

  1. Select Tools:Options to open the Options dialog box.

  2. Select the Text Fonts tab.

  3. Select the Disable In-Place Editing check box.

  4. Click OK. When asked to save as a startup Option, say No (Say Yes to disable this option).

Background and border characteristics, label rotation angle (also controllable graphically as described below), label transparency/opacity, font characteristics (also controllable via the Format and Style toolbar buttons), tab spacing, and multi-line centering are controllable via the Text Control dialog box.

  1. Right-click on the text label and select Properties from the shortcut menu.

or

  1. Press CTRL while double-clicking on the label.

To learn more, see Reference: The Text Control Dialog Box.

  1. Click once on the label.

  2. Select the desired font size from the combo box on the Format toolbar.

or

  2. Click the Increase Font or Decrease Font buttons [image] on the Format toolbar.

Note: You can also drag a control handle to resize a label. Select the label and drag and handle to resize.

  1. Click twice (pause long enough between clicks to avoid a double-click). A locus of rotation symbol [image] displays in the middle of the label and round rotation handles display at the corners of the label.

  2. Grab a rotation handle and rotate the label to the desired angle.

Note: You can specify a precise rotation angle in the Text Control dialog box.

  1. Select Tools:Options to open the Options dialog box.

  2. Select the Text Fonts tab and then select the Simple Selection Mode check box.

To add special characters to your text labels:

  1. Right-click and select Symbol Map.

  2. Choose the Font that contains the special character from the drop-down list.

If you frequently use certain characters in your text labels, you can create shortcut keys for those characters. To do this:

  1. Enter in-place editing mode and select the text that you intend to create when you invoke your shortcut key combination.

  2. Right-click on the selected text and select Assign Shortcut. This opens the Assign Shortcut dialog box. The text you selected is entered into the String text box.

  3. Select a shortcut from the Key drop-down list.

  4. Click the Add button.

Note: You can enter text into the String text box manually. However, if you do, any formatting syntax (i.e. \b(text) etc.) must also be entered manually (see example).

To Remove a Shortcut

  1. Re-open the Assign Shortcut dialog box.

  2. Select the shortcut you want to remove from the Current list box.

  3. Press DELETE.

To create a shortcut for the Greek character p:

  1. Click the Text tool and then click in your graph window. This starts the in-place editing mode.

  2. Right-click and select Symbol Map.

  3. Select p and click Insert.

  4. Click Close.

  5. Now highlight and right-click on the character.

  6. Select Assign Shortcut.

  7. Select a shortcut from the Key drop-down list.

  8. Click Add.

  9. Click OK to close the dialog box.

You can now use CTRL+0 (in this example) as a shortcut for p when in-place editing.

Control | Key Combination
Bold | CNTRL + B, CNTRL + SHIFT + B
Italic | CNTRL + I, CNTRL + SHIFT + I
Underline | CNTRL + U, CNTRL + SHIFT + U
Greek | CNTRL + G, CNTRL + SHIFT + G
Strikeout | CNTRL + S, CNTRL + SHIFT + S
Supercript | CNTRL + SHIFT + =
Subscript | CNTRL + =
Supersubscript | CNTRL + -
Increase Font Size | CNTRL + SHIFT + >
Decrease Font Size | CNTRL + SHIFT + <
Select All | CNTRL + A, CNTRL + 5 (numpad)

  1. Select Tools:Options to open the Options dialog box.

  2. Select the Text Fonts tab and then select the Disable In-place Editing check box.

When the in-place editing mode is disabled, double-clicking the label opens the Text Control dialog box.

Creating and Editing Text Labels

To create a new text label:

To edit an existing text label

To add a background, a border or to center multi-line labels

To resize a text label

To rotate a text label

To disable second-click access to label rotation

To add special characters to your text labels

To create a special characters shortcut key combination

Shortcut keyboard combinations for editing text labels

To turn off in-place text editing

Click here to view a multi-media demonstration


Copying Labels via the Clipboard

To copy an object:

  1. Click on the object to select it.

or

  1. Drag a box around the object with the Pointer tool [image].

Selection handles will appear.

  1. From the menu, select Edit:Copy.

or

  2. Right-click on the object and select Copy from the shortcut menu.

or

  2. Press CTRL + C.

To paste the object into another window:

  1. In the destination page, click once where you want the object to be pasted, then...

  2. From the menu, select Edit:Paste.

or

  2. Right-click and select Paste from the shortcut menu.

or

  2. Press CTRL + V.


Supported Escape Sequences

Syntax | Description | Entering... | Results in...
\v(text) | Override any escape sequences that are included in text. This is particularly useful when displaying a path that includes a backslash '\' . | \v(C:\Samples\Programming) |
\+(text) | Format text as superscript. | super\+(script) |
\-(text) | Format text as subscript. | sub\-(script) |
\=(text1,text2) | Format text1 as subscript, text2 as superscript. | script\=(sub,super) |
\p%pointsize(text) | Change the point size of text. 200 doubles the size, 100 results in no change, etc. | change\p200(point)size |
\i(text) | Format text as italics. | \i(italics) |
\b(text) | Format text as bold. | \b(bold) |
\g(text) | Format text in Greek symbols. | \g(Greek) |
\ab(text) | Display a bar above text. | \ab(X) |
\ad(text) | Display a short line - a dot - above text. | \ad(A) |
\(ASCII character code) | Displays the specified ASCII symbol. | \(169) |
\f:fontname(text) | Displays text using the fontname font. You can abbreviate fontname, as long as you use enough letters for the name to be unique. | \f:Wide Latin(font) |
\cnumber(text) | Displays text in the color located at position number in the Color drop-down lists. | \c2(red) |

Supported Escape Sequences

If you are entering text in...

  • the Text Control dialog box.

  • a worksheet Label column.

  • in a prefix or suffix text box.

... you'll must enter an escape sequence to add special characters or special formatting to your text object.

Escape sequences consist of a backslash "\", followed directly by a control character. The control character determines the action of the command. The text to be modified follows the control character, and must be enclosed in parentheses.

\ControlCharacter(text)

If you format text in the Text Control dialog box using the formatting buttons, Origin automatically adds the associated formatting commands around your selected text. For example, if you type Control, and then highlight the text and click the Bold button, Origin displays \b(Control) in the text box. However, you can also explicitly use special formatting commands in:

The following escape sequences are supported:

Note 1: The \g( ) text formatting command uses the symbol font by default. This setting is controlled from the Greek drop-down list in the Text Tool group on the Text Fonts tab of the Options dialog box (Tools:Options).

Note 2: To use Greek symbols you must have the TrueType “Symbol” font in your printer, or have font generation software (for example, Adobe Type Manager).

Note 3: To learn more about text formatting, review the TEXT FORMATTING.OPJ project located in your Origin \SAMPLES\MISCELLANEOUS folder.


A Note about Displaying the Backslash Character in Text Labels

When you creating/editing a text label using in-place methods, you can type the backslash character. It will not be interpreted as an escape sequence; in-place editing does not support escape sequences.

However, when you are entering text in the Text Control dialog box, using the backslash character can be problematic, as the Text Control dialog box interprets this as an escape sequence.

For example, if you type the following in a Text Control dialog box:

This file is located at C:\MY FILES

Origin displays:

This file is located at C:MY FILES

Note that the backslash doesn't display. If an unsupported option or no parenthesis follows the backslash character, then the backslash character is ignored and does not display.

One way to display a backslash character in your text labels is to type \\ in place of \. Origin will then display the second backslash. However, another way to display the backslash character is to use the \v( ) special formatting command.

For example, if you type the following in a Text Control dialog box:

This file is located at \v(C:\MY FILES)

Origin displays:

This file is located at C:\MY FILES


  1. Click at the location in which you want to add the special character in the text box or worksheet cell.

  2. Enable Num Lock (the light is on) on your keyboard.

  3. Press and hold down the ALT key.

  4. While holding down the ALT key, type 0, followed by the decimal code for the ANSI character using the number keypad.

  5. When you release the ALT key, the ANSI character displays (in the Text Control dialog box, it displays in the lower view box).

Accessing the Extended Character Set

When you are editing a text label using Origin's "in-place" methods, you can add characters from a selected font set by right-clicking and selecting Symbol Map from the shortcut menu (or by pressing CTRL+M). This is the preferred method for entering special characters in a text label.

If you are entering text in the Text Control dialog box, in worksheet column cells that are designated as Label (columns), or you are typing prefixes or suffixes in text boxes (such as you see on the Tick Labels tab of the Axis dialog box), you can access the entire ANSI character set using this procedure:

For the Text Control dialog box and prefix and suffix text boxes, Origin uses the font selected from the associated Font drop-down list to determine the character display in the label. If Arial is selected from the Font drop-down list, Origin uses the Arial character that corresponds to the code that you entered in the label.

If you want use a special character from a font set other than that selected from the Font drop-down list, you must add the appropriate embedded text formatting command around the special character. You will most have need for this when adding a special character from the Symbol set. In most cases, Symbol will not be selected from the Font drop-down list; instead your defalt label font will be selected. To instruct Origin to display the character associated with the code from the Symbol set, you must do one of the following:

  • Add the \g(SpecialCharacter) embedded text formatting command.

  • Highlight the special character and click the Greek button [image].

For text that you type in a worksheet column cell set to Label, Origin uses the font selected from the Worksheet Display Control dialog box.

Note: Each font has a unique ANSI character set. To find codes for characters from any font sets, consult the Windows Character Map (in the Accessories folder).


Reference: The Text Control Dialog Box

  1. Right-click on the text label and select Properties from the shortcut menu.

or

  1. Press CTRL while double-clicking on the label.

Note: You can use the scroll bars or resize this dialog box to enhance the text box view.

Select the desired text label background from this drop-down list. Select None to display the label without a background.

To rotate the label, type or select the desired value from this combination box. Positive values rotate the label counterclockwise. Negative values rotate it clockwise.

Type or select the desired font size (in points) from this combination box. The default point size is determined by the Size combination box value in the Text Tool group on the Text Fonts tab of the Options dialog box (Tools:Options).

Note: You can also quickly increase or decrease the font size of any selected text labels (CTRL select multiple labels) by clicking the Increase Font [image] or Decrease Font [image] buttons on the Format toolbar (View:Toolbars).

Select the desired font from this drop-down list. The default font selection is determined by the Font drop-down list in the Text Tool group on the Text Fonts tab of the Options dialog box.

Select Default:FontName to use the font determined by the Default drop-down list on the Text Fonts tab of the Options dialog box.

Select the Use System Font check box to ignore the settings from the Font drop-down list and the Size combination box. Instead, use the system font. The system font provides faster redraw speed and enhanced screen legibility. However, when this check box is selected, text formatting (for example, italic, bold, and symbol) will not display.

Select this check box to center the label text. This option is only useful for multi-line labels.

To draw a separate white background for each line of text in the label, select the White Out check box.

Select this check box to apply the selection from the Size combination box and the Font and Color drop-down lists to all text labels in the layer.

Select the desired color from this drop-down list.

Type the desired text in the text box in the middle of the dialog box. Press ENTER to start a new line. Press CTRL+TAB to insert a tab.

To format the text, use the text formatting buttons (Normal, Bold, Italic, Underline, Superscript, Subscript, and Greek Symbols) above the text box. Click-and-drag to highlight the desired text. Click on the desired formatting button to apply the format to the highlighted text. The formatting option displays in the text box as an embedded text formatting command. However, the lower view box provides a WYSIWYG display of the text.

If you click one of the formatting buttons without highlighting text first, Origin inserts the appropriate formatting commands at the current cursor location. Begin typing to add the text with the selected formatting.

Note: The Normal button [image] removes the formatting of the highlighted text.

The lower view box provides a WYSIWYG display of the text in the text box. If the layer that the text label is located in displays with a background color, the layer color displays in the view box.

To set the current text settings as the default settings for future text labels in all graph windows in the project, click this button.

Reference: The Text Control Dialog Box

While in-place text editing methods have largely supplanted the need for the Text Control dialog box, it can still be used to edit and format text labels.

To open the Text Control dialog box:

Dialog Box Controls (see figure)

The Background Drop-down List

The Rotate (deg) Combination Box

The Size (pts) Combination Box

The Font Drop-down List

The Use System Font Check Box

The Center Multi Line Check Box

The White Out Check Box

The Apply Formatting to All Labels in Layer Check Box

The Color Drop-down List

The Formatting Buttons and the (Upper) Text Box

The (Lower) View Box

The Set Default Button


Adding a Date/Time Stamp to Your Graph

  1. Double-click on the stamp to enter text edit mode.

  2. Edit or format the text label.

You must modify a line of LabTalk script. The Date & Time button runs a script in the [DateTime] section of the STANDARD.OGS file located in your Origin folder. That script consists of:

label -s -sa -d (.6*page.width) (.05*page.height) -n timestamp $(@D,D10);

The $(@D,D10) portion of this line of script specifies date/time format. In the default case, Origin displays the 10th (D10) date format (numbered from zero) from the Origin date format list (this format represented as M/D/YYYY HH:MM:SS).

To view the Origin date format list:

  1. Double-click on any worksheet column to open the Worksheet Column Format dialog box.

  2. Select Date from the Display drop-down list. Origin's date formats display in the Format drop-down list (numbered from zero).

When you know the index number of the date format that you want:

  1. Open the file STANDARD.OGS in a text editor.

  2. Locate the [DateTime] section.

  3. Locate the line...

label -s -sa -d (.6*page.width) (.05*page.height) -n timestamp $(@D,D10);

  4. Change D10 to Dn.

  5. Save the modified OGS file.

  6. Click the Date & Time button to display your modified format.

Adding a Date/Time Stamp to Your Graph

To add the current date and time to the top of your graph window, click the Date & Time button [image] on the Graph toolbar (View:Toolbars).

To delete the stamp, click on the stamp to select it and press DELETE.

To modify the Date/Time stamp:

To modify the default format of the Date/Time stamp:


Reference: The Label Control Dialog Box

The label may be named, enabling Origin to identify the label during execution of built-in or user-defined programming scripts. Unnamed labels are not affected by any script other than entered in the object's Label Control dialog box.

Enter the desired name in the text box provided.

Warning: Some labels, such as the legend and the axis titles, are already named by Origin. In most cases, you will not want to rename legends and axis titles; doing so will cause menu commands that update the labels to no longer work, create a duplicate label, or over-write the modified label. See one situation in which you might want to rename the legend.

To control the effect of layer manipulation and axis rescaling on the label’s size and position, select one of the following radio buttons:

Page. When attached to the page, the label is both position and scale independent of its layer. The label position and size are not affected by moving or resizing the layer, or by changing the axis scale. The label is still a part of the layer, however, and is deleted if the layer is deleted.

Layer Frame. When attached to the layer frame, the label is position dependent on its layer. When you move the layer, the label moves with the layer. If you resize the layer, the label changes dimensions proportionally and moves with the layer. If you rescale the axes, however, the label does not change size or position.

Layer and Scales. When attached to the layer and scales, the label is connected to the layer in terms of size and position. If you move the layer, the label moves with the layer. If you resize the layer, the label changes dimensions proportionally and moves with the layer. If you rescale the axes, the label size does not change, but the label moves so that it maintains the same XY coordinate value.

This check box is only useful in the Label Control dialog box of a text label. Select this check box if data or variables will display in the message displayed by the text label. Each time Origin redraws the label, the label is updated to reflect any changes made to the data or variables signified within.

When this check box is selected, proper notation conventions must be followed in the associated text label. Basic notation conventions are listed in Linking Text Labels to Data and Variables.

Select the No Vertical Movement check box to prevent movement of the label in the vertical direction.

When the No Horizontal Movement check box is selected, the label cannot be moved in the horizontal direction.

Select the Not Selectable check box to restrict selection or movement of the label entirely. This option is useful when using a label as a backdrop to a page or layer. When Not Selectable is selected, you cannot use the ALT+double-click shortcut to edit the dialog box. Instead, enter Button Edit Mode (Edit:Button Edit Mode), click on the label, and select Format:Label Control.

When the Visible check box is selected, the label’s associated Text Control dialog box, as well as the Label Control dialog box, are accessible by double-clicking on the label (Text Control), or ALT+double-clicking on the label (Label Control). The label can also be moved and resized.

When this check box is cleared, the label is not visible and its associated dialog boxes cannot be accessed by double-clicking (or ALT+double-clicking) on the label.

To display and edit the label, enter Button Edit Mode by selecting Edit:Button Edit Mode. Exit Button Edit Mode after editing the label by re-selecting Edit:Button Edit Mode (When in Button Edit Mode, the Button Edit Mode menu command has a check mark next to it).

Select the Real-Time check box to update the label in real-time whenever there is a real-time plotting event.

The option selected from this drop-down list defines the circumstances required for script execution. Enter the script to be executed in the associated text box beneath this drop-down list.

Option | Script Execution Method
None | Do not execute script.
Button Up | Execute script when button is clicked.
Moved | Execute script when button is moved.
Sized | Execute script when button is resized.
Moved or Sized | Execute script when button is moved or resized.
Redrawn | Execute script when button is redrawn.
Real-Time | Execute script when a real-time event occurs. These events are typically generated through DDE data transfer or from a Data Acquisition module.
Window Create | Execute script when the button’s window first opens.
Window Close | Execute script when the button’s window closes.
Window Activate | Execute script when the button’s window becomes active.
Window Deactivate | Execute script when the button’s window becomes inactive.
New Selection | Execute script when unselected button is clicked.
Before Save | Execute script immediately before saving the project.
Axes Rescale | Execute script when graph axes rescale.
All Events | Execute script when any one of the previous events occur.

To associate a script with an object, type the script directly in this text box or copy and paste it from any text editor.

Each LabTalk statement in the script must end with a semicolon.

ENTER is a simple carriage return.

To add a tab within the text box, use CTRL + TAB.

Reference: The Label Control Dialog Box

To open the Label Control dialog box:

  1. Select an object (text label, line/arrow, etc.).

  2. Right-click and select Label Control from the shortcut menu.

Dialog Box Controls (see figure)

The Object Name Text Box

The Attach To Group

The Link to Variables (%,$) Check Box

The Mouse Click Group

The Visible Check Box

The Real-Time Check Box

The Script, Run After Drop-down List

The (Script) Text Box


Drawing Objects

Drawing Lines and Arrows

Drawing Boxes, Circles, Polygons, and Regions

Editing Objects

Adding a Scale Object to Your Graph


Drawing Lines and Arrows

  1. Click on the Line tool [image] or Arrow tool [image] (on the Tools toolbar).

  2. Click-and-drag at the desired location in the graph window. Release the mouse button and the line (or arrow) is displayed.

You can add or remove arrow heads from lines and arrows by double-clicking on the line or arrow. This opens the Object Properties dialog box. Select the Arrow tab to access controls for the Begin and End arrow head(s).

  1. Press the SHIFT key as you drag with the Line tool [image] or Arrow tool [image].

  1. Click on the Curved Arrow tool [image] (on the Tools toolbar).

  2. Click in four places along the intended arc to locate the curved line's anchor points; place the first click at the beginning of the curve, the second two clicks along the curve, and the final click at the point where you want the arrow head. After the fourth click, Origin displays the curved arrow. The points are connected with a Bezier curve.

To remove the arrow head from the Bezier curve:

    1. Double-click on the arrow. This opens the Object Properties dialog box.

    2. Select the Arrow tab to access controls for the arrow head display.

  1. Click on the Polyline tool (on the Tools toolbar), then click once at each intended anchor point.

To end the line:

  1. Either double-click at the last point location or click once and then press ESC.

  1. Click on the Freehand Draw tool [image].

  2. Click once and hold while dragging out your line.

  3. Release the mouse button to complete the operation.

To copy and object:

  1. Click on the object to select it.

or

  1. Drag a box around the object with the Pointer tool [image].

Selection handles will appear.

  1. From the menu, select Edit:Copy.

or

  2. Right-click on the object and select Copy from the shortcut menu.

or

  2. Press CTRL + C.

To paste the object into another window:

  1. In the destination page, click once where you want the object to be pasted, then...

  2. From the menu, select Edit:Paste.

or

  2. Right-click and select Paste from the shortcut menu.

or

  2. Press CTRL + V.

Drawing Lines and Arrows

  • To add a straight line or arrow to the graph:

  • To draw a vertical or horizontal line or arrow:

  • To add a curved arrow to the graph:

  • To draw a polyline:

  • To draw a freehand line:

  • To copy an object from one window to another:

Aligning Existing Lines and Arrows Vertically or Horizontally

Creating Vertical or Horizontal Lines at Specific X or Y Values


Drawing Boxes, Circles, Polygons, and Regions

To add a rectangle, circle, ellipse, polygon, or region to the graph, click the respective button on the Tools toolbar:

  • For all objects but the polygon, click-and-drag at the desired location in the graph window. Release the mouse button to display the object.

  • For polygons, click in the window at each of the corner locations for the polygon. Either double-click at the last location or click once and then press ESC.


To resize, click once. Square handles will appear at the corners and sides of the object.

To rotate an object, click twice in a slow deliberate fashion. A moveable locus of rotation [image] appears in the middle of the object. Round rotation handles display at the corners of the object.

Drag a corner handle to rotate the object. Reposition the locus to change the point about which the object rotates.

To skew an object, click three times in a slow deliberate fashion. Triangular skew handles display at the corners of the object. Click on a skew handle and drag the object to the desired shape.

To move points in an object, click four times in a slow, deliberate manner. Handles appear at moveable, shape-defining points. To alter object shape, drag points to new locations .

Editing Objects

An Origin drawing object has multiple editing modes. These modes are sequentially activated by clicking on the object in a slow, deliberate manner (pause about 1 second between mouse clicks).

Objects created with the Polygon [image], Region [image], Polyline [image], Freehand Draw [image], or Curved Arrow [image] tools have four edit modes:

  • resize (square selection handles at corners and sides).

  • rotate (round handles).

  • skew (arrowhead-shaped handles).

  • edit or point-by-point reshaping (square-shaped handles).

Objects created with the Rectangle [image], Circle [image], Arrow, or Line [image] tools only have resize, rotate and skew edit modes; they do not have a point-by-point reshaping mode.

Additional object controls are available from the Object Properties dialog box.

Click here to view a multi-media demonstration on Drawing


The Object Properties Dialog Box

Applies tab settings (for example, the Line tab) to the currently selected object and to all future objects of the same type.

To apply your tab settings to all objects of the same type (line, arrow, polyline, etc.) that are currently in the layer or window, (1) make a selection from the Apply To drop-down list and (2) click Apply To.

Edit this tab to control the color, line thickness, and line type. You can also set the alignment to vertical or horizontal.

Edit this tab to control the display of the begin and end arrow heads. If both a begin and end arrow head is selected, you can select the Same Head Size check box to ensure that changes you make to the width or length of the arrow head in either the Begin or End group apply to both.

Specify the begin and end coordinates for the line or arrow using the units selected from the Units drop-down list.

The Object Group

This group displays the object's current name. Origin names objects by starting with a default base name (for example, Line), and incrementing the name. You can edit this name.

Label names can be used in LabTalk script to programmatically control the object.

The Attach To Group

To control the effect of layer manipulation and axis rescaling on the object's size and position, select one of the following radio buttons:

  • Page. When attached to the page, the object is both position and scale independent of its layer. The object position and size are not affected by moving or resizing the layer, or by changing the axis scale. The object is still a part of the layer, however, and is deleted if the layer is deleted.

  • Layer Frame. When attached to the layer frame, the object is position dependent on its layer. When you move the layer, the object moves with the layer. If you resize the layer, the object changes dimensions proportionally and moves with the layer. If you rescale the axes, however, the object does not change size or position.

  • Layer and Scale. When attached to the layer and scales, the object is connected to the layer in terms of size and position. If you move the layer, the object moves with the layer. If you resize the layer, the object changes dimensions proportionally and moves with the layer. If you rescale the axes, the object size does not change, but the object moves so that it maintains the same XY coordinate value.

The Properties Group

  • Visible. When this box is selected, the object is visible and selectable. When this check box is cleared, the object is not visible and not selectable. To display and edit the label, enter Button Edit Mode by selecting Edit:Button Edit Mode. Exit Button Edit Mode by re-selecting Edit:Button Edit Mode.

  • Selectable. When this box is selected, the object can be selected (and edited). When the check box is cleared, the object is non-editable. To edit the label, enter Button Edit Mode by selecting Edit:Button Edit Mode. Exit Button Edit Mode by re-selecting Edit:Button Edit Mode.

The Disable Group

This group's options control the shape and position of an object.

  • Horizontal Movement. Select this box to prevent horizontal movement.

  • Vertical Movement. Select this box to prevent vertical movement.

  • Resizing. Select this box to prevent resizing.

  • Rotating. Select this box to prevent rotation.

  • Skewing. Select this box to prevent skewing.

  • Edit. Select this box to prevent point-by-point reshaping.

Specify the border display properties from this tab.

Specify the fill color and pattern from this tab.

Specify the top and left object position in units selected from the Units drop-down list.

Select the Keep Aspect Ratio check box to only allow proportional sizing.

The Object Properties Dialog Box

To open the Object Properties dialog box:

  1. Select an object, right-click and choose Properties from the shortcut menu.

or

  1. Double-click on the object.

The Object Properties Dialog Box (see individual tab controls for figures)

Note that tab (and control) availability is object type (text object, arrow object, etc.) dependent.

The Set Default Button

The Apply To Button

The Line Tab

The Arrow Tab

The Coordinates Tab

The Control Tab

The Border Tab

The Fill Pattern Tab

The Dimensions Tab


Arranging and Aligning Objects

Creating Vertical or Horizontal Lines at Specific X or Y Values

Aligning Existing Lines and Arrows Vertically or Horizontally

Aligning Objects

Grouping Objects

Aligning Objects with the Page Grid

Moving Objects to the Front or the Back


Creating Vertical or Horizontal Lines at Specific X or Y Values

For example, if you create a line, align it vertically, and then name the line MyLine in the line's Object Properties dialog box, you can type the following text in the Script window (Window:Script Window) to move the line to X=5.

myline.x=5 (ENTER)

One disadvantage of using this technique to draw a line at a specific X or Y location is the rough control you have over the length of the line. Alternatively, you can use the LabTalk Draw command to create a vertical (or horizontal) line that is the length of the layer and is located at a specific X (or Y) axis value:

draw -l -v XAxisValue

draw -l -h YAxisValue

For example, to create a vertical line the length of the layer at X=5, type the following text in the Script window:

draw -l -v 5 (ENTER)

You can edit or format this line as you would any other line object.

If you require multiple vertical or horizontal lines in your graph, you can perform the previous steps multiple times. Alternatively, you can display multiple lines by creating a new data set which contains XY pairs at the locations that you require vertical or horizontal lines. You can then add this data to your graph layer as a scatter graph, and then use the LabTalk Set command to display vertical lines for each XY pair. The syntax for this script is:

set Worksheet_ColumnName -k 58

For example, if columns A(X) and B(Y) of the Data2 worksheet contain the XY pairs for your vertical lines and are plotted in your graph as a scatter graph, type the following text in the Script window:

set data2_b -k 58 (ENTER)

Creating Vertical or Horizontal Lines at Specific X or Y Values

There are a couple of ways to draw vertical or horizontal lines at specific X or Y values. The simplest method is to press the SHIFT key while you draw a line with the Line tool [image] (the SHIFT key causes the line to snap to vertical or horizontal), then drag the line to the desired location.

For more accurate placement, you can:

  • Double click on the line, select the Coordinates tab and use the Units drop down and Begin and End text boxes to position the line.

  • Name the line in the line's Object Properties dialog box (double-click on the object) and then assign an X or Y position using LabTalk script.

To create multiple vertical or horizontal lines:

Note1: If an object is attached to Layer and Scales and you Zoom In on a portion of the graph, the object may extend beyond the graph's layer frame. To prevent this, make sure that the object is attached to the Layer Frame. For more information on object attachment options, see the discussion of the Attach To group in the topic "Associating LabTalk Script with an Object," and Controlling the Display and Scaling of the Objects in a Layer.

Note2: In addition to displaying vertical or horizontal lines in your graph, you can enable the display of vertical or horizontal drop lines for any data point in a data plot that includes symbols. Press CTRL while double-clicking on a data point, then edit the (Plot Details) Drop Lines tab.


Vertical or Horizontal Alignment of Existing Lines

To align lines or arrows vertically or horizontally, do one of the following operations:

  • Double-click on the object to open the Object Properties dialog box. Select the Line tab and select the Horizontal or Vertical check boxes.

  • Click once on the existing line or arrow to select it. Press the SHIFT key and at the same time, drag the control handle of the end that you want to move.

The line or arrow will snap horizontally or vertically (to which ever alignment requires the least angular movement).

  • Select the desired objects (press SHIFT to select multiple objects) and click either the Vertical Alignment button [image] or the Horizontal Alignment button [image] on the Arrow toolbar (View:Toolbars).


Aligning Objects

The Object Edit toolbar contains buttons that provide for easy arrangement of preselected objects.

  • Click on the desired object to select it.

  • To select multiple objects, SHIFT + click on the desired objects or drag a box around the target objects using the Pointer tool [image].

When you select multiple objects and click one of the alignment buttons, Origin aligns the objects with respect to the first selected object.

Origin provides an object grid that facilitates object alignment in the window. To view the object grid, select View:Show:Object Grid. A check mark appears next to the menu command when the grid is active.

Objects on the page of the window are automatically aligned with the grid by selecting Format:Snap Object to Grid. A check mark appears next to the menu command when Snap Object to Grid is enabled.

Objects which are added to the page after selection of this menu command automatically align with the nearest grid upon placement.

Objects which are already located on the page align with the nearest grid when the object is moved.

Aligning Objects

Origin provides two tools for aligning objects on the page:


Grouping Objects

To group multiple objects in a window:

  1. To select multiple objects, SHIFT + click on the target objects or drag a box around the objects using the Pointer tool [image].

  2. Click the Group button [image] on the Object Edit toolbar to group the objects.

You can now drag the group of objects to a new location, or align the group of objects with other objects on the page.

To ungroup the objects, select the grouped object and click the Ungroup button [image] on the Object Edit toolbar.


Moving Objects to the Front or the Back

If your graph includes text labels or other annotations that overlap, you can move selected objects to the front or the back of the display. To move objects to the foreground or background:

  1. Select the object(s) that you want to move to the front or back.

  2. Click the Front button [image] or the Back button [image] on the Object Edit toolbar (View:Toolbars).


Legends and Color Scales

The legend is a special text label that identifies each data plot in the associated graph layer. The data plot is identified by name and by graph type. The data plot name is determined by the name of the worksheet column in which the data set resides. If the worksheet column includes a label, the label is used to create the legend.

Note: When instructed to double-click or ALT + double-click on the legend, DO NOT position the mouse on the data plot type representation when double-clicking. Instead, double-click on the legend text.

Creating and Updating a Legend

Changing the Legend Text

Displaying Data Plots from Different Layers in One Legend

Adding an Individual Data Point to the Legend

How to Have Complete Control Over the Legend Display

Customizing the Legend for Categorical Data Plots

Setting the Active Data Plot using the Legend

Controlling the Width of the Data Plot Type Icons in the Legend

Controlling the Proportions of the Legend Background

Displaying and Editing Color Scales


Creating and Updating a Legend

The legend is automatically created when you plot worksheet data. When additional data sets are added to the layer, the legend is not automatically updated to include the new data sets unless the Auto Update check box is selected on the Legends tab of the page's Plot Details dialog box (Format:Page).

A new legend can be created at any time by selecting Graph:New Legend or by right-clicking in the layer and selecting New Legend from the shortcut menu. This menu command adds a legend to the active layer. If a legend already exists in the layer, the menu command updates the legend to reflect the current data displayed in the layer.


Changing the Legend Text

You could, for example display the value of a specific data point in a data plot using the following substitution notation:

%(WorksheetName, ColumnNumber, RowNumber)

For example, if a worksheet is named Data1, and you have plotted columns A(X) and B(Y), you could opt to display the value of the data point in column 2, row 3 using this expression:

%(data1, 2, 3)

To learn more, see Linking Text Labels to Data and Variables.

Use this @letter argument... | ...to display this text in the legend
@d | Primary data set name.
@c | Column name.
@w | Worksheet name.
@wl | Worksheet label.
@l | All lines of column label on separate lines.
@u | First two lines of column label on same line, second label is enclosed in parentheses.

Note that to use substitution notation, you must select the Link to Variables (%,$) check box in the Label Control dialog box (this is done by default, when the legend is created).

Since escape sequences are not supported by Origin's normal, in-place text editing mode, you must use the Text Control dialog box for this. To open the legend's Text Control dialog box:

  1. Click on the legend to select it.

  2. Right-click and select Properties from the shortcut menu.

With the Text Control dialog box, the general syntax for the legend display is:

\L(DataListPosition) %(DataListPosition)

Where DataListPosition is the data plot's position in the data list, the list of plotted data at the bottom of the Data menu. The \L( ) switch creates the data plot type representation. The "\" indicates to Origin that this is to be treated as an embedded text formatting command. The "L" tells Origin to form the data plot type icon. The number in parentheses is the data set's position in the data list (at the bottom of the Data menu, when the graph is active).

Origin determines the current graph type (line, scatter, etc.) for the data plot at the specified position, and displays the appropriate data plot type icon.

Use of the %(DataListPosition) notation in the Text Control dialog box is as described above.

Origin creates graph legends based on the legend variable setting in the [Text] section of the ORIGIN.INI file (located in your Origin folder). In the ORIGIN.INI file, legend=\L(%d) %%(%d)\r\n, where the string is in C printf format. This notation can be summarized as follows:

\L(%d) creates a data plot type icon for each data plot in the data list.

%%(%d) creates the text entry for each data plot type icon.

\r\n creates a new line between legend entries.

In the second part of this expression, the @letter notation has been omitted: %%(%d,@letter) When @letter is omitted, Origin assumes @u. @u tells Origin to take the first two lines from the column label field and display them in a single line in the graph legend:

first line (second line)

If no labels exist, Origin displays the column name in the legend by default.

You can customize your legends by modifying the legend assignment statement in the ORIGIN.INI file. You can use any of the @letter arguments reviewed above. One advantage for customizing the legend by editing the legend variable is that Origin will not overwrite your custom legend. However, if the Full Dataset Name check box on the Legend tab of the Plot Details dialog box (graph page icon selected on left side of dialog box) is selected, Origin will always display the data set name in the legend, independent of the @letter specification in the ORIGIN.INI file.

Changing the Legend Text

A legend is a specialized Origin text label. Origin names the text label "Legend" to uniquely identify it. This name is stored in the legend's Label Control dialog box. You can open this dialog box by selecting the legend and then selecting Format:Label Control. If you rename the legend, it becomes a static object; it will maintain its current contents but it will no longer update when you click New Legend or when you add data to the layer. If you customize the legend text according to procedures outlined below, you will need to rename the legend in the Label Control dialog box.

A legend text label uses special formatting to display the data set names and the data plot type icon (such as a line). If you double-click on the legend text and enter text editing mode, the legend text will look something like this (in this example, one data plot is in the layer):

The %(1) is an example of substitution notation. This notation instructs Origin to display the data set name for the first data set in this layer (If there were two data plots in the layer, the in-place editing mode would look like this):

When you are in this text-edit mode, you can simply overwrite this %(DataListPosition) notation with whatever text you prefer to display. However, you can also manipulate the substitution notation system that Origin uses -- whether editing the legend or any other text label -- to alter the text in the legend (for example).

Possibilities:

  • To alter the text that displays in the legend, you can add these special @letter arguments using a %(DataListPosition,@letter) notation.

  • To control the display of the data plot icon in the legend, use a special escape sequence.

Another option for customizing the legend is to edit the Origin initialization file that defines what the legend will display.


Displaying Data Plots from Different Layers in One Legend

  1. From the menu, choose Format:Page. This opens the Plot Details dialog box at the page level.

  2. Select the Legends tab.

  3. Select the Include Data Plots from All Layers check box and click OK or Apply.

Data sets from all plots in the graph are combined into a single legend. Note that re-saving the graph template at this point will save the Include Data Plots from All Layers setting as the default setting for the template.

Note: To add a background or border to the legend, select the entire legend, right-click and choose Properties from the shortcut menu.

This method predates the Automatic method and is included primarily for informational purposes or for those who wish to have further control over the legend display.

To use this method you must open the legend's Text Control dialog box, as Origin does not support using the necessary escape sequences in the in-place editing mode.

To open a legend's Text Control dialog box:

  1. Select the legend object, right-click and choose Properties from the shortcut menu.

This opens the Text Control dialog box. Use the following syntax to manually create a legend that includes data sets from other layers:

\L(LayerNumber.DataPlotNumber,DataPointNumber) DataPlotName

LayerNumber is the layer number displaying the data plot. If LayerNumber is not specified, the legend layer is the default (the layer which includes the legend).

DataPlotNumber is the position of the data plot in the data list (when the respective layer is active).

DataPointNumber is the row or index number of the data point in the data set (mostly of interest when you have modified the plot characteristics of a single data point).

When using the \L(LayerNumber.DataPlotNumber,DataPointNumber) notation to create a legend from multiple layers, you cannot use the %( ) notation to create the data plot names for the legend. Enter the appropriate name after the \L( ) command in the text box of the Text Control dialog box.

Displaying Data Plots from Different Layers in One Legend

The default legend displays the data plot type icons and column names of the data plots displayed in the associated layer. When you are creating a graph with multiple layers, you may observe that a separate legend is created for each layer. If you so desire, you can display the data plot type icons and column names of data sets from any, or all, of the layers in the graph window together in a single legend. There are two methods for doing this:

Automatic Method of Including Data Plots from All Layers in a Single Legend:

Manual Method of Including Data Plots from All Layers in a Singe Legend:


Adding an Individual Data Point to the Legend

Individual data points can be added to the legend. This is useful when you have modified the display properties of a single data point in your plot.

To add an individual data point to the legend, you must edit the legend's Text Control dialog box as Origin's normal, in-place text editing methods do not support the necessary escape sequences.

To open a legend's Text Control dialog box:

  1. Right-click on the label and select Properties from the shortcut menu.

  2. Use the following syntax to add the layer, data plot and data point number to the text box.

\L(LayerNumber.DataPlotNumber,DataPointNumber)

where

  • LayerNumber is the layer number displaying the data plot. If a LayerNumber is not specified, the legend layer is the default.

  • DataPlotNumber is the position of the data plot in the data list (when the respective layer is active).

  • DataPointNumber is the row or index number of the data point in the data plot.

For example:


How to Have Complete Control Over the Legend Display

A graph legend can be created displaying data plot icons that are completely independent of the displayed plot details. Origin allows for complete control over the data plot icons in the legend by using the following syntax in the text box of the legend’s Text Control dialog box (to open this dialog box, right-click on the label and select Properties from the shortcut menu).

\L(O(SymEdgeColor,Sym,Fill,Size,ColorLn,LineStyle,Gap,LnWidth,SymFillColor))

where:

SymEdgeColor determines the color of the symbol edge in the legend. Type a value corresponding to the color sequence in the color palette (1=Black, 2=Red, etc.). To view the complete color sequence, select Format:Color Palette.

Sym determines the symbol shape in the legend. Type a value corresponding to the symbol shape, where 0 = no symbol, 1 = square, 2 = circle, 3 = up triangle, 4 = down triangle, 5 = diamond, 6 = cross (+), 7 = cross (x), 8 = star (*), 9 = bar (-), 10 = bar (|), 11 = number, 12 = LETTER, 13 = letter, 14 = right arrow, 15 = left triangle, 16 = right triangle, 17 = hexagon, 18 = star, 19 = pentagon, and 20 = sphere.

Fill determines the symbol interior for the symbols in the legend. Type a value corresponding to the symbol interior, where 0 = solid, 1 = open, 2 = dot center, 3 = hollow, 4 = + center, 5 = x center, 6 = - center, 7 = | center, 8 = half up, 9 = half right, 10 = half down, and 11 = half left.

Size determines the symbol size in the legend. Type a value for the symbol size in points.

ColorLn determines the line color in the legend. Type a value corresponding to the color sequence in the color palette (1=Black, 2=Red, etc.). To view the complete color sequence, select Format:Color Palette.

LineStyle determines the line style for the legend. Type a value corresponding to the line style sequence in the Style drop-down list on the Line tab of the Plot Details dialog box (0=Solid, 1=Dash, etc.).

Gap determines the line and symbol gap in the legend. Type a gap value that corresponds to a % of the symbol diameter. For example, type 50 to display a gap between the symbol and the line (in the legend) which is 50% of the symbol diameter.

LnWidth determines the line width for the legend. Type a value for the line width in points. A value of 0 results in no line display.

SymFillColor determines the color of the symbol fill in the legend. Type a value corresponding to the color sequence in the color palette (1=Black, 2=Red, etc.). To view the complete color sequence, select Format:Color Palette.

See also, Customizing the Legend for Categorical Data Plots


Customizing the Legend for Categorical Data Plots

arg2 (symbol shape) =

0 = no symbol, 1 = square, 2 = circle, 3 = up triangle, 4 = down triangle, 5 = diamond, 6 = cross (+), 7 = cross (x), 8 = star (*), 9 = bar (-), 10 = bar (|), 11 = number, 12 = LETTER, 13 = letter, 14 = right arrow, 15 = left triangle, 16 = right triangle, 17 = hexagon, 18 = star, 19 = pentagon, 20 = sphere.

arg3 (fill type) =

0 = solid, 1 = open, 2 = dot center, 3 = hollow, 4 = + center, 5 = x center, 6 = - center, 7 = | center, 8 = half up, 9 = half right, 10 = half down, and 11 = half left.

arg4 (symbol edge color) =

1=black, 2=red, etc. Values correspond to the sequence in your Origin color palette. To determine this sequence, select Format:Color Palette from the Origin menu.

arg5 (symbol fill color) =

1=black, 2=red, etc. Values correspond to the sequence in your Origin color palette. To determine this sequence, select Format:Color Palette from the Origin menu.

arg6 (symbol point size) =

Enter a point size value for the symbol.

LineStyle =

0 = no line, 1 = solid, 2 = dash, 3 = dot, 4 = dash dot, 5 = dash dot dot, 6 = short dash, 7 = short dot, 8 = short dash dot

LineColor =

1=black, 2=red, etc. Values correspond to the sequence in your Origin color palette. To determine this sequence, select Format:Color Palette from the Origin menu.

LineWidth =

Enter a point value for the line width. 0 = no line.

Gap =

Determines the legend's line to symbol gap (line & symbol plots). Value is a % of the symbol diameter. (e.g. 50 will insert a gap that is 50% of symbol point size).

arg2 (symbol/char index) =

  • For user-defined symbols, enter arg2 = 1 - 31. Value corresponds to the order in the User Defined Symbols grid on the Graph tab of the Options dialog box (Tools:Options) (i.e., to use the first symbol in the grid enter arg2 = 1; order in symbols grid is left to right, top to bottom).

  • For ASCII characters, enter arg2 = 32 - 255. Value is the ASCII code for the character.

arg3 (symbol/char color) =

1=black, 2=red, etc. Values correspond to the sequence in your Origin color palette. To determine this sequence, select Format:Color Palette from the Origin menu.

arg4 (symbol point size) =

Enter a point size value for the symbol.

arg5 (font) =

Used only for characters. This is the index number of a particular font in your font list.

To obtain this value, do the following:

  1. Click the Script Window [image] button.

  2. Type the following into the script window and press ENTER:

font(fontname)=

Origin responds with the font list index number for fontname.

arg6 (font style) =

Used only for characters. To apply bold, italics or underline assign values as per the following table:

Value | Underline | Italic | Bold
0 | no | no | no
1 | yes | no | no
2 | no | yes | no
3 | yes | yes | no
4 | no | no | yes
5 | yes | no | yes
6 | no | yes | yes
7 | yes | yes | yes

Customizing the Legend for Categorical Data Plots

Customize the legend via the text box of the legend’s Text Control dialog box. To open this dialog box:

  1. Right-click on the legend text.

  2. Select Properties from the shortcut menu.

Use the following syntax:

\L(S(Category, arg2, arg3, arg4, arg5, arg6, LineStyle, LineColor, LineWidth, Gap))

  • To use a geometric symbol from the Origin symbol gallery, enter Category = 0, then enter these values:

  • To use an ASCII character or a user-defined symbol, enter Category = 1, then enter these values:


Setting the Active Data Plot using the Legend

To enable the selection of the active data plot by clicking on the respective data plot type icon in the legend:

  1. Select Format:Page to open the Plot Details dialog box.

  2. Select the Legends tab, and then select the Indicate Active Dataset check box.


Controlling the Width of the Data Plot Type Icons in the Legend

To control the width of the data plot type icons in the legend:

  1. Select Format:Page to open the Plot Details dialog box.

  2. Select the Legends tab, and then type the desired value in the Symbol Width text box.

Units are % of font point size.


Controlling the Proportions of the Legend Background

To resize the background (the box around the legend):

  1. Click on the edge of the legend background. Sizing handles (the " = " marks) will appear.

  2. Drag a handle to resize the background.


Displaying and Editing Color Scales

Select the desired font, color, and size from the associated controls. The Size combination box is in units of points.

Select the desired background from this drop-down list.

Select this check box to reverse the color map and associated level text order.

Set the width of the color scale from the Color Bar Thickness combination box.

Set the gap between the color scale and the associated labels from the Label Gap combination box.

To shift the labels up and down in relation to the color scale, edit the Label Side Offset combination box. Negative values move the labels up in relation to the color scale, while positive values move the labels down.

Units for all controls in this group are in % of font point size.

If your color scale has a large number of levels, the level labels may overlap and be difficult to read. In this case, select or type the desired label increment from this combination box.

For example, to display every third label, select 3 from this combination box.

Click this button to set the current text settings as the default settings for future color scales in all graph windows in the project.

Displaying and Editing Color Scales

The color scale is a specialized object that displays a color map and associated Y or Z levels for color mapped or contour data plots. The color scale displays by default when creating color filled or gray scale contour graphs.

To add a color scale to a graph layer containing a color mapped data plot:

  1. Select Graph:New Color Scale or right-click in the layer and select New Color Scale.

This menu command is only available if the active data plot is color mapped and a color scale is not already displayed.

The numeric format of the color scale is controlled by the Numeric Formats tab on the Plot Details dialog box (when the data plot icon is active on the left side of the dialog box). However, to customize the format of the color scale text, double-click on the color scale or right-click and select Properties from the shortcut menu. Both actions open the Color Scale Control dialog box.

Note: By default, the color scale displays vertically. To display the color scale horizontally, click on the color scale and then drag a control handle in the horizontal direction.

The Color Scale Control Dialog Box (see figure)

The Text Group

The Background Drop-down List

The Reverse Order Check Box

The Size and Gaps Group

The Label Increment Combination Box

The Set Default Button

To learn more about color scales, review the COLOR SCALE.OPJ project located in your Origin \SAMPLES\GRAPHING\2D PLOTS folder.


Advanced Concepts: Constants, Variables and Scripts

Resolving Math Expressions in Text Labels

Linking Text Labels to Data and Variables

Inserting Variables Extracted from Imported ASCII Files into Text Labels

Associating LabTalk Script with an Object


Resolving Math Expressions in Text Labels

Origin supports substitution notation when creating text using in-place editing methods or when editing text in the Text Control dialog box. You can use this notation to resolve a mathematical expression to a value in the text label.

The syntax is as follows:

$(expression)

In this substitution notation, expression is resolved to a value each time the text label is redrawn. The text label is redrawn whenever you move the label or redraw the graph window.

For example:

  1. Type the following text in in-place edit mode or enter the expression in the Text Control dialog box and click OK.

The value of X is $(pi^2)

  2. Right-click on the text label that you created and select Label Control...

or

  2. Press the ALT key while double-clicking on the text label.

  3. Select the Link to Variables (%,$) check box and click OK. The label now reads:

The value of X is 9.8696

You may need to click the Refresh button [image] on the Standard toolbar to see the change.


Linking Text Labels to Data and Variables

Origin uses a number of string variables for storing data. For example:

  • The %X string variable contains the drive and path of the current saved project.

  • The %G string variable contains the current project name.

Thus if your current project MYPROJECT.OPJ is saved to C:\MYFILES\, then typing the following in the Text Control dialog box...

This project is saved to \v(%X%G).

... displays the following label (you may need to refresh the window):

This project is saved to C:\MYFILES\MYPROJECT.

Note: In this example, a special \v command had to be placed in front of the string variable in order to display the backslash character in the file path. See this note about displaying backslash characters in text labels.

Linking Text Labels to Data and Variables

Text labels can employ substitution notation to display information about your data set. This is supported by both in-place and Text Control dialog box text creation and editing methods.

For example, the text label could display “The value of x is number.” in which number represents a data set value that is accessed via substitution notation.

The worksheet syntax follows:

%(WorksheetName,ColNumber,RowNumber)

To continue with the example, if the cell at row 2, column C, of the Data1 worksheet contains the value 15, then typing the following into a text label...

The value is %(Data1,3,2).

...would produce the following once you left text edit mode (you might need to refresh the window):

The value is 15.

When using the %(expression) notation in a text label, you must select the Link to Variables (%,$) check box in the associated Label Control dialog box.

Besides displaying worksheet values, you can include string variables in text labels, too. As long as the Link to Variables (%,$) check box in the Label Control dialog box is selected, Origin will substitute the contents of the string variable in the text label.

More on String Variables:


If you do not select either the Insert as Link or the Insert as "Property = Value" check boxes, the value of the variable will be inserted as literal text.

Select this box to insert a string that is dynamically linked to the value of a variable. Any change in a string's value will produce a change in the label value when the file is next imported.

To learn more, see Linking Text Labels to Data and Variables.

Select this box to insert "variable name = value" into the text label .

Inserting Variables Extracted from Imported ASCII Files into Text Labels

Variables extracted from ASCII file header lines can be inserted into a text label in the following way:

  1. Create a new text label using standard "in-place" text label creation methods.

  2. While in text entry mode, press CTRL + H, or right-click and select Insert Info Variable. This opens the Insert Info Variables dialog box.

This dialog box will list variables extracted during ASCII file import. You can choose and insert variables as:

  • Literal text

  • Insert as link

  • Insert as "Property = Value"

Variables can be viewed from the Script window by typing the command:

Page.info.user.=

Click here to view a multi-media demonstration


Associating LabTalk Script with an Object

  1. Click the New Graph button [image] on the Standard toolbar to open a new graph window.

  2. Select the Text tool [image] from the Tools toolbar and click in a blank area of the graph. This starts the in-place text editing mode.

  3. Type Hello World.

  4. Press ESC to de-select the label. The Hello World text label displays on the screen.

  1. Click on the label and then select Format:Label Control.

  2. Click in the text box at the bottom of the dialog box and type in the following text (this is the script for the control):

type -b "Hello World!";

  3. Select Button Up from the Script, Run After drop-down list.

The Button Up option informs Origin that the script is executed when the button is clicked. Each of the options from the Script, Run After drop-down list establish a different method for script execution. For example, select Moved to execute the associated script when the text label is moved.

  4. Click OK to close the dialog box.

The Hello World text label now displays on your screen as a button. When you click the button, an Attention dialog box opens and displays:

Tip: This button object will not print. If you wish to print a graph with a button, do this:

To learn more about programming in Origin, including using Origin C, choose Help:Programming.

  1. From the Origin menu, choose Edit:Button Edit Mode.

  2. Right-click on your button object and select Label Control.

  3. Set the Script, Run After drop-down list to None and click OK.

  4. Right-click on your text object and select Properties.

  5. Set Background to Dark Marble and click OK.

  6. Choose Edit:Button Edit Mode to exit button edit mode.

You will now be able to print your graph, complete with a reasonable representation of your button.

Once the button is activated, you must invoke Button Edit Mode to edit the button details -- the button label, the script behind the button, etc.

To invoke Button Edit Mode:

  1. From the menu, choose Edit:Button Edit Mode.

The Button Edit Mode menu command will have a check mark next to it when Button Edit Mode is active. The button object's appearance will be changed; note the word "Text" appearing in the upper left corner of the label.

Button functionality is now disabled and the object can be edited as if it were any other text object.

  • To edit the button label, right-click on the object and select Properties.

  • To edit the button's script, page attachment method, script triggering event, etc., right-click on the object and select Label Control.

  • To delete the button object, right-click on the object and select Delete (or press DELETE).

  2. When you have finished editing the button details, reselect the Edit:Button Edit Mode menu item (removing the check mark from beside the menu item).

This turns off button edit mode and restores the functionality of any script-associated objects in the project.

Associating LabTalk Script with an Object

All objects such as text labels, rectangles, lines, arrows, and other annotations have associated Label Control dialog boxes. The Label Control dialog box is used to name the object (for programmatic control) and to define the object's LabTalk script and script execution trigger. An example of a script execution trigger is to display the object as a button that can be clicked to run the associated script.

In the following example, you create a button from a text label and define the button to open a dialog box containing the message “Hello World!”.

Creating the Text Label

Changing the Label into a Button

Editing the Button (Text or Script)

To learn more about programming Origin, see the Programming Help file (Help:Programming).


Introduction to Creating Presentations

Origin provides a number of tools and supports a number of methods useful in creating presentations. In some cases, you may wish to assemble your presentation using tools available in Origin; for others, you may wish to pass your Origin graphics to another applications to complete your presentation. This section is primarily concerned with assembling and presenting your results using Origin. We focus on three key areas:

  • Using Origin's Layout Page window to present your data and graphs.

  • Printing.

  • Graphic Export.

If you choose to assemble your presentation in another application, be sure to read over the material in the section, Exchanging Data with Other Applications. That section discusses such things as inserting, editing, and dynamically linking Origin graphs that are passed to other applications.


Creating a Master Page Layout for all of Your Graph Windows

Origin provides a master page feature to simplify the global annotation of graphs. Use the master page to display a consistent background, a company logo, or other labels and images on all or selected graph windows in your project.

Before using this feature, you must create your master page. The master page graph should contain the objects and background that you want to display on other graph windows. You can take a couple of approaches to this:

  • You can customize the display of any graph window and then rename the graph window "master" using the window renaming method. Origin recognizes that a window named "master" is to serve as a master page.

  • Origin provides a graph template, MASTER.OTP, in which the axes and labels are hidden. To open this template:

Note: To learn more about the master page option, review the MASTER PAGE.OPJ project located in your Origin \SAMPLES\MISCELLANEOUS folder.


Including a Master Page Layout in Your Presentation

  1. Select Format:Page to open the Plot Details dialog box.

  2. Select the Display tab.

  3. Select the Use Master Items check box.

This will include master items when you export, copy, or print this graph window.

  1. Activate any graph window.

  2. Select View:Show:Master Items on Screen.

Note: This menu command is not available if the Plot Details Use Master Items check box is cleared.

  • To open a graph based on the MASTER.OTP template from a LabTalk script, use:

win -t plot master Master;

In addition to opening a graph window from the template, this script renames the window "Master."

  • To display master items exclusively in portrait or landscape page orientation, you could instead rename your master graph window "portrait" or "landscape." These window names are also reserved for use by this feature.

If you have renamed your graph window "portrait" and you open a second graph window that is also in the portrait page orientation, then you select View:Show:Master Items on Screen, the objects in the portrait graph window display in the second graph window (assuming the Plot Details Use Master Items check box is selected).

  • You can also include master items in layout page windows. However, by default, the Use Master Items check box on the layout page's Plot Details dialog box is cleared. Therefore, you must select this check box to include master items when exporting, copying, or printing. Furthermore, you must select the View:Show:Master Items on Screen menu command to display the master items when viewing the layout page in Origin.

Including a Master Page Layout in Your Presentation

Once you create a master page (and name the graph window "master"), you then control the display of the master items in other graph windows in the project. There are two aspects to this control:

  • You can control whether or not the master items are included when you export, copy, or print the graph window. This is a graph page-specific control, set on each graph page's Plot Details dialog box. To use this control:

  • You can control whether or not the master items display as you view the graph in Origin. To use this control:

Additional Master Page Notes:

Note: To learn more about the master page option, review the MASTER PAGE.OPJ project located in your Origin \SAMPLES\MISCELLANEOUS folder.


Using the Layout Page Window

The layout page window acts as a “display panel” for worksheets and graphs which are created and edited in separate child windows. Arrange the pictures in the layout page window to create a custom presentation to print from Origin or to export to the Clipboard or a graphic file.

To Open a Layout Page Window

Click here to view a multi-media demonstration

Note: See Tutorial 8 (from the Origin menu, select Help:Tutorials), "Creating Presentations with the Layout Page."


, the worksheet grid and cell values display as a picture in the layout page window. Text labels in the worksheet window will not display in the layout page window.

, all graphics within the graph page display in the layout page window. Text labels and other objects display in the layout page window if at least part of the object is inside the graph window page (The gray area in the graph window is outside of the page).

Adding a Graph or Worksheet Picture to the Layout Page Window

To add a graph or worksheet to the layout page window:

  1. From the menu, select Layout:Add Graph or Layout:Add Worksheet when the layout page window is active (or click the Add Graph [image] or the Add Worksheet [image] buttons on the Layout toolbar). These actions open the Select Graph (or Worksheet) Object dialog box.

  2. Select the graph or worksheet in the list box provided.

  3. Click OK.

  4. Click once in the layout page window to create a picture of the default size.

or

  4. Drag out a box in the layout page window to create a picture of the specified size (the size of the rectangle that you drag out with your mouse). Release the mouse button and a picture (object) of the associated graph or worksheet is displayed.

If the source window is a worksheet window

If the source window is a graph window


Working with Pictures in the Layout Page Window

Pictures in the layout page are graphic objects and like other graphic objects, can be selected, resized, grouped, etc. The graphs and worksheets are unlike other graphic objects in that they are dynamically linked to source windows in your project file.

Making Changes to the Contents of a Picture

Selecting Pictures

Sizing a Picture

Positioning a Picture

Adding a Background to a Picture

Aligning Pictures


Making Changes to the Contents of a Picture

To alter the display of the picture in the layout page window, edit the source graph or worksheet child window. To make the graph or worksheet child window active:

  1. Right-click on the picture in the layout page.

  2. Select Go to Window from the shortcut menu.

After changing the display of the graph or worksheet, click on the layout page window to see your changes. If the layout page window does not update, select Window:Refresh, or click the Refresh [image] button on the Standard toolbar.


Selecting Pictures

Selecting One Picture

To select a picture in the layout page window, click on the picture. Alternatively, drag a box around the picture with your mouse (Pointer tool [image] selected). Release the left mouse button and a highlighted boundary with control handles displays around the picture. To de-select the picture, click anywhere in the layout page window (off of the picture).

Selecting More than One Picture

To select more than one picture in the layout page window:

  1. SHIFT+click on the pictures.

or

  1. Drag a box around the multiple pictures using the Pointer tool.


  • If you changed the proportions of the picture when resizing, return the picture to its original proportions by pressing ALT while clicking and dragging on a control handle. (You can release the ALT key once you grab the control handle.) The picture returns to its original proportions and then sizes proportionally as you drag the control handle. Release the mouse button to display the resized picture with the original proportions.

  • To ensure that the picture's proportions are not changed during future sizing, make sure that Keep Aspect Ratio is checked on the shortcut menu or select the Keep Aspect Ratio check box on the Dimensions tab in the picture's Object Properties dialog box (double-click on the layout page picture to open this dialog box).

  • Alternatively, to preserve the aspect ratio during resizing, press the CTRL key while dragging on a control handle. Drag the control handle to the desired location. Release the CTRL key and the mouse button to display the resized picture.

  • To resize the picture maintaining the current proportions, press CTRL while dragging on a control handle. (You can release the CTRL key once you grab the control handle.) Drag the control handle to the desired location. Release the mouse button to display the resized picture.

Sizing a Picture

To change the size of the picture in the layout page window:

  1. Click on the picture to display its bounding box with control handles.

  2. Drag on the control handles to resize the picture.

Use the control handles on the horizontal or vertical sides to change the respective dimensions. Use the control handles at the corners to resize proportionally (keep aspect ratio).

  3. Click off the picture (but inside the layout page window) to de-select the picture. Note that access to resizing and positioning of the object can be blocked by settings in the object's Object Properties dialog box.

Note: Reducing or expanding the size of a worksheet picture in the layout page window controls the display of the number of rows or columns in the picture. The size of the worksheet picture grid --that is the size of the cells and the text -- remains unchanged.

Notes on Proportional Sizing of Pictures


Positioning a Picture

To move the picture in the layout page window:

  1. Click on the picture and drag it to a new location.

  2. Click off of the picture (but in the layout page window) to de-select it.

You can also position and resize the picture using controls on the Dimensions tab of the Object Properties dialog box:

  1. Double-click on the picture to open the Object Properties dialog box.

  2. Select the Dimensions tab.

  3. Edit the settings in the Units drop-down list and the Size text boxes.


Adding a Background to a Picture

As with other objects, you can add a background display to the picture in the layout page window. To add a background display to the picture:

  1. Double-click on the picture to open the Object Properties dialog box.

  2. Select the Image tab.

  3. Select the Background check box and choose a background from the drop-down list.

Note: You can apply this background to individual or to every object in the window. However, once applied to every object in the window, the background display can only be removed from objects individually.


To enable the display of the object grid:

  1. Select View:Show Grid when the layout page window is active.

A check mark appears next to this menu command when the object grid is displayed. Use the grid lines to position pictures in the window. To ensure that the pictures position on a grid line, select Format:Snap to Grid when the layout page window is active.

Use the Object Edit toolbar (View:Toolbars) to align pictures (or any other objects) in the layout page window. The buttons on the Object Edit toolbar control the movement of any active object(s) in the window.

To make an object active, click once on the picture. To make more than one picture active, SHIFT+click on the desired pictures, or drag a box around multiple pictures to select them all.

  1. Double-click on the picture to open the Object Properties dialog box.

  2. Select the Dimensions tab and edit the Left or Top values in the Position Group. Manually edit these boxes for multiple objects to precisely align them vertically or horizontally.

Aligning Pictures

There are several methods of aligning pictures in the layout page window:

  • Using the object grid to align pictures.

  • Using the Object Edit toolbar to align pictures.

  • Using the Object Properties dialog to align pictures.


Enhancing the Redraw Speed in a Layout Page Window

To display a picture placeholder:

  1. Click to select the picture.

  2. Select Layout:Set Picture Holder.

A check mark appears next to the this menu command when a placeholder displays for the selected picture.

To disable the placeholder display:

  1. Click to select the placeholder.

  2. Select Layout:Clear Picture Holder.

or

  2. Clear the Use Picture Holder check box on the Image tab of the picture's Object Properties dialog box or right-click on the object and Clear Picture Holder.

Picture placeholders can be moved and sized like pictures. You can double-click on the placeholder to open the objects Object Properties dialog box. Changes made to the Background drop-down list are visible when you disable the picture placeholder display.

Note: Pictures print out regardless of the display of picture placeholders.

You can choose to display all pictures (and additional objects - text, drawing, etc.) in the layout page window in the Page View mode, regardless of the view mode of the picture’s child window. The Page View mode provides faster screen updating than the Print View mode. To display pictures (and objects) in the layout page window in the Page View mode:

  1. Select Layout:Global Speed Control.

or

  1. Right-click in the layout page window (but off the page) and select Global Speed Control from the shortcut menu. This menu command is checked when displaying pictures in Page View mode. To disable this command, reselect Global Speed Control.

Because the Page View uses the screen driver to generate the display (Print View uses the printer driver), text placement may not be accurate in the layout page window when the Global Speed Control menu command is selected. This should not be too problematic as editing is actually done in the associated child window. Check text placement in the child window by selecting View:Print View when the child window is active. Pictures in the layout page window should print just as they appear in the child window Print View mode.

Enhancing the Redraw Speed in a Layout Page Window

There are two ways to increase the redraw speed of the layout page window:

  • Show picture placeholders in place of the pictures themselves.

  • Display the pictures in Page View mode independent of the view mode of the associated child window.


Printing, Introduction

There are a couple of ways in which you can print and Origin child window:

  • Create a hard-copy printout.

  • Create a PostScript file for printing to a PostScript-capable printer.


Checking Your Display Options Before Printing

There are several ways to hide elements of the graph window (see Hiding Labels, Data, and Layers and Hiding Objects):

  • By de-selecting the element from the View menu (View:Show:Element).

  • Via shortcut menus associated with many graph elements.

If an element is not displayed in the graph window, it will not appear in the printout. If you want an element to appear in the printout, be sure to display it before selecting File:Print.


Print Preview mode provides Zoom In and Zoom Out buttons to examine the page before printing. The Zoom In button is already selected when entering the previewing mode. Click in the target region of the page to zoom in. To return to the full page view, click the Zoom Out button.

To print from the previewing mode, click the Print button. This opens the Print dialog box. Confirm print settings and click OK.

To exit the previewing mode without printing, click the Close button.

Previewing Before Printing

Before printing a graph or layout page, you will want to check the positioning of labels and other objects on the page. Both Print View (View:Print View) and Print Preview (File:Print Preview) modes use the printer driver for the page layout information, and so they are both useful for confirming object positioning. However, note the following differences:

  • Print View mode provides an editable view; it allows use of Origin tools, including the menu commands and dialog boxes. Print Preview mode is strictly a viewing mode - no Origin tools are available. Thus, if you want to move objects on the graph page or customize the graph before printing, you must switch to Print View mode.

  • Print Preview mode provides a display of the entire graph page, including the margins. Print Preview provides the most accurate representation of the printed page. Page zooming tools are provided to enhance viewing.


A Note About Displaying and Printing Fonts

Scalable fonts are usually rotatable, and resize proportionally when you change the size of an Origin graph. For best results, we recommend that you use scalable fonts in your graphs.

Windows contains two types of scalable fonts: Vector fonts and True Type fonts.

  • Windows includes three Vector fonts: Roman, Modern, and Script. Vector fonts are created as needed by an application, based on a set of software instructions that define the characteristics of the font.

  • Windows also includes a number of True Type fonts, such as Arial, Times New Roman, and Symbol. These provide a true “What You See Is What You Get” (WYSIWYG) display. The screen display will always match the printed page.

For a list of the True Type fonts in your system, open the Windows Control Panel and double-click on the Fonts icon. True Type fonts are designated by a True Type [image] icon.

Printer fonts are fonts that are built into your printer. Printer fonts may be scalable fonts, or they may be bitmapped fonts, which are not scalable. Check your printer documentation to determine what type of fonts come with your printer. If you have a PostScript printer, all of your PostScript fonts are scalable.


Printing to the Printer

To print the active window:

  1. Select File:Print.

or

  1. Right-click on the title bar of the window and select Print from the shortcut menu.

Both actions open the Print dialog box. Edit this dialog box to select and configure the active printer, and set the printing options.

Note 1: To print the active window using the current settings in the Print dialog box, click the Print [image] button on the Standard toolbar.

Note 2: To print a window or selected windows from a Project Explorer folder, select the window icons on the right side of Project Explorer and then right-click within the selection and select Print Window or Print Windows from the shortcut menu. Like the Print button on the Standard toolbar, these shortcut menu commands use the settings in the Print dialog box.


The Print Dialog Box

Select the printer from the Name drop-down list. If the printer is not in the list of available printers, add the printer through the Windows Control Panel.

Click the Properties button to set options specific to the printer driver selected from the Name drop-down list.

Select the Print to File check box to print the selected window(s) to a file. This must be selected when creating a PostScript file.

Current/All Open/All

Print the current, all open, or all graph, function graph, or layout page windows in the project.

Options

The Options button opens the Geometry tab of the More Print Options dialog box.

The Graph Page Size group displays the current graph page size, as specified on the Print/Dimensions tab of the graph page's Plot Details dialog box.

The Printer Page Size group displays the current printer page dimensions.

You can print a graph page that is smaller or larger in dimensions than the current printer page dimensions, and maintain the specified graph page dimensions in the printout.

A graph page with dimensions that are smaller than those of the printer page will print on one page. The upper-left corner of the graph will be positioned in the upper-left corner of the printer page (maintaining the printer margin).

A graph page with dimensions that are larger than those of the printer page will print on multiple pages.

The controls for the printed graph size are provided in the Use Printer Default Dimensions For group. To ensure that the Width and/or Height values listed in the Graph Page Size group control the size of the printed graph, clear the Width and/or Height check boxes in the Use Printer Default Dimensions For group. When the Width and Height check boxes are selected (default), Origin will adjust the graph page to fit the printer page, independent of the Graph Page Size group settings.

For example, if the width of a graph page is set to 20 inches and the height is set to 8 inches, while the printer page width is 10 inches and the height is 8.5 inches, and the Width check box is cleared but the Height check box is selected (in the Use Printer Default Dimensions For group), then Origin will print the graph on two pages (because 20 inches /10 inches = 2).

Note that when you edit the controls in the More Print Options dialog box, the Plot Details dialog box updates to reflect your changes. Similarly, when you edit the controls in the Plot Details dialog box, the More Print Options dialog box updates.

To display crop marks that denote the unprintable area on the printer page, select the Print Crop Marks check box.

Skip Points

Worksheet Data, Skip Points controls the number of worksheet data points displayed in the printed graph(s). When this check box is selected, the Maximum Points Per Curve text box displays. Specify the maximum number of points to print for each data plot in this text box. Skipping points increases the printing speed of data plots containing large data sets. If the data set is larger than the specified limit, Origin excludes the necessary number of data points, distributed evenly through the data set. This option does not effect the worksheet or screen display of the data set. When this check box is selected, Origin also disables its high-quality dash lines and hatch patterns, converting them into printer supported forms.

Similar to the Worksheet Data, Skip Points check box and text box, the Matrix Data, Maximum Points check box and text boxes control the number of matrix data points displayed in the printed graph.

Enable Color as Gray Scale/Use Simplified Colors

Origin provides two controls for printing a color graph as a black-on-white output: the Enable Color as Gray Scale check box and the Use Simplified Colors check box. Only one of these check boxes is available when you select File:Print. Origin activates one of the check boxes after querying the default printer driver to determine how many colors the printer supports.

For printers that support only two colors, the Enable Color as Gray Scale check box is made available.

If you clear this check box, Origin prints black-on-white. In this case, axes and labels will output as black-on-white, irrespective of their color. (In Origin 6.0, if the graph background was black and the axes were white, the axes were not visible in the output because both the background and the axes were printed as white.)

If you select this check box, Origin sends to the printer the same colors as those for the screen and lets the printer handle them the best it can.

For printers that support more than two colors (this does not imply that the printer is a color printer, because it could support multiple non-dithered shades of gray), the Use Simplified Colors check box is made available.

If you clear this check box, Origin sends to the printer the same colors as those for the screen and lets the printer handle them the best it can.

If you select this check box, Origin prints black-on-white as described for the Enable Color as Gray Scale check box.

Selection

Select the Selection check box to print a range of data. Type the desired column and row range in the associated text boxes.

Alternatively, highlight the desired worksheet or matrix data before opening this dialog box. Select the Selection check box to display (and print) the selected range in the associated text boxes.

All | If the text in a notes window extends beyond a page, select the All radio button to print all pages in the window.
Pages | To print specific pages of a notes window, select the Pages radio button and type the desired page values in the associated text boxes.
Print Range | To print a range of pages, select the Pages radio button and then specify the page range in the From and To list boxes.
Print What | Select the desired radio button to print a sheet, a selected range, or an entire workbook.

Type or select the number of copies you want to print from the Number of Copies spin box.

Select the Collate check box when printing multiple copies of multiple windows. When this check box is selected, multiple copies are collated.

Click this button to print using the current Print dialog box settings.

The Print Dialog Box

The controls in the Print dialog box are dependent upon the active window type (graph, worksheet, Excel workbook, etc.)

Print Dialog Box Controls

The Printer Group

The Print Graph, Print, or Print Range Group

When the Graph, Function Graph, or Layout Page Window is Active

When the Worksheet or Matrix Window is Active

When the Notes Window is Active

When the Excel Workbook is Active

The Copies Group

The OK Button


Printing to a PostScript File

PostScript is a document-generation language developed by Adobe®. A PostScript printer includes a driver which interprets PostScript code and provides the printer direction in printing the document. If you send PostScript code to a non-PostScript printer, you will generate pages of literal PostScript code.

To print to a PostScript file:

  1. With the window active, select File:Print. This opens the Print dialog box.

  2. Select a PostScript printer from the Name drop-down list. (You must have a PostScript printer driver installed.)

  3. Select Print to File.

  4. Click OK. This opens the Print to File dialog box.

  5. To modify the default extension, select All Files (*.*) from the Save As Type drop-down list.

  6. Type the file name and extension in the File Name text box.

  7. Click Save.

Printing Your PostScript File

How PostScript Files Differ from Encapsulated PostScript Files


Printing Your PostScript File

To print a PostScript file to the printer, perform the following:

  1. Go to the DOS prompt. Change from the current directory to the directory that contains the PostScript file (or include a path in the next step).

  2. At the DOS prompt, type:

COPY FileName PrinterPort

where FileName is the PostScript file name and extension, and PrinterPort is an available printer port with a PostScript output device. This command prints a hard copy of your PostScript file.

For example, to print the GRAPH1.PS file to a PostScript printer connected to LPT1, type the following at the DOS prompt:

COPY GRAPH1.PS LPT1


How PostScript Files Differ from Encapsulated PostScript Files

PostScript files (PS) contrast with Encapsulated PostScript files (EPS) in that EPS files are intended to be included in other documents (such as Microsoft PowerPoint®). EPS files lack some of the “overhead” commands needed to produce hard-copy output on PostScript printers because it is assumed that the document in which the file is embedded will handle this. Consequently, EPS files cannot be printed by themselves.


Troubleshooting Printing Problems

If you are printing a graph window and the layers in the printed page do not match the dimensions specified on the Size/Speed tab of the layer's Plot Details dialog box, then modify the X Scale Factor and the Y Scale Factor combination box values on the Miscellaneous tab of the Options dialog box (Tools:Options).

Origin’s default viewing mode is Page View (View:Page View). Page View provides fast screen updating, but does not guarantee exact text placement on the screen unless you are using a typeface scaling software (such as Adobe Type Manager).

To make sure your labels are correctly positioned before printing, switch to either Print Preview mode (File:Print Preview) or Print View mode (View:Print View). Both view modes provide a true WYSIWYG display (Note that Print Preview mode is most reliable).

If a label in the printed graph is truncated, re-check the label position in the graph window. Labels (or sections of labels) that extend beyond the page are not displayed in the printout. The left and top border of the page are determined by the left and top edge of the graph window. The right and bottom border of the page are determined by the gray region in the graph window.

When Origin draws a graph on your computer screen it queries your printer driver for object sizing and positioning information. If you create a graph using one printer driver, then change your default printer driver (or open the project on a second computer that has a different default printer driver), Origin may re-size and re-position objects in the graph window.

This is not a bug in Origin but rather a problem related to the fact that different printer drivers have different sizing and positioning characteristics. The only solution to this problem is to create and display/print graphs using the same printer driver, or to re-size and re-position the objects as desired after switching printer drivers.

If you open an Origin project file that was created on a different computer and the project file uses a font that was on the original computer but is not installed on your computer, then Origin will choose a substitute font. If you do not like the substituted font, the only solution is to manually pick a new font from the list of fonts loaded on your computer. For example, to change the font of a text object in an Origin graph window, double-click on the text object and then select a new font from the Font drop-down list. Most application programs, including Origin, cannot display or print fonts that are not installed on your computer.

If you open an Origin project file that was created with a different printer driver, you may need to manually update the graph to reflect your current printer driver settings. To do this:

  1. Select File:Page Setup.

  2. Select Portrait or Landscape orientation.

  3. Click OK. Origin updates your graph window based on your current printer driver settings.

Troubleshooting Printing Problems

  • The Layer Dimensions in the Printed Page are Incorrect

  • The Graph Labels are Shifting Location when Printing

  • A Graph Label Prints Partly off the Page

  • Changing Printer Drivers Alters Objects in Graph Windows

  • Opening a Project on a Different Computer Changes the Selected Font

  • Origin Doesn't Update the Graph Page Orientation when Opening a Project with a Different Printer Driver Active


Exporting Your Graph or Layout Page

Graphs and layout pages can be exported to other applications by creating a graphics file or by using the Clipboard. When you import your Origin graph or layout page into another application, the application displays a picture of your graph or layout page. The picture displayed in the application cannot be edited using Origin tools. Rather, use the importing application’s tools to edit the picture.


Exporting Your Graph or Layout Page Using the Clipboard

To paste the page content of the active graph or layout page window as a picture in another application:

  1. In Origin, select Edit:Copy Page.

  2. In the importing application (such as Word), select Edit:Paste Special. In Word, this menu command opens the Paste Special dialog box.

  3. Select Picture from the As list box.

  4. Select the Paste radio button.

  5. Click OK. Your graph or layout page displays as a picture in the destination application.

To control the default size of the picture in the destination application, edit the Copy Page group on the Page tab of the Options dialog box (Tools:Options).


Exporting Your Graph or Layout Page to an Image File

Raster Formats define a fixed size array of (rows and columns) of colors. These formats take proportionately larger file space for increased detail and do not scale well. Raster file size is a function of resolution and color density. Raster formats are best used when you must reproduce graphs and layout pages with much detail and many colors, and where scalability is not a concern.

Vector formats contain instructions on how to draw an image and may contain additional information about size and resolution. These formats scale well (within limits), but must be interpreted by a target application, and this is subject to error. File size is proportional to the complexity of the image. Vector formats are best used for graphs and layout pages with little detail and few colors, or for applications where scalability is needed.

File | Extension | Format
Adobe Illustrator | (*.AI) | vector
Bitmap | (*.BMP) | raster
Computer Graphics Metafile | (*.CGM) | vector
AutoCAD Drawing Interchange | (*.DXF) | vector
Encapsulated PostScript | (*.EPS) | vector
Enhanced Metafile | (*.EMF) | vector
Graphics Image Format (OriginPro Only) | (*.GIF) | raster
JPEG, Joint Photographic Experts Group | (*.JPG) | raster
Zsoft PC Paintbrush Bitmap | (*.PCX) | raster
Portable Network Graphics | (*.PNG) | raster
Truevision Targa | (*.TGA) | raster
Portable Document Format | (*.PDF) | vector
Adobe PhotoShop | (*.PSD) | raster
TIFF, Tag Image File | (*.TIF) | raster
Windows Metafile | (*.WMF) | vector
X-Windows Pix Map | (*.XPM) | raster
X-Windows Dump | (*.XWD) | raster

Exporting Your Graph or Layout Page to an Image File

Origin supports 17 file formats for Graphic Export (GIF is only available on OriginPro). These files fall into two categories:

  • Raster formats

  • Vector formats

Origin graphs and layout pages can be exported using the following image formats:

To export your graph or layout page:

  1. Activate the graph or layout window.

  2. Select File:Export Page.

Select Show Export Options to specify your export settings. Origin remembers the settings last used for each export file type. Unless you need to change settings for the selected file type, leave Show Export Options unchecked and Origin will use your current export settings.

Click here to view a multi-media demonstration


Which Export Format Should I Choose?

The format that you choose will depend on the target application. Publishers often have strict requirements for image file formats, so be sure to get details before creating your images.

Formats Common to Print Publishing

Formats Common to Web Publishing

Formats for Use by Other Applications


Formats Common to Print Publishing

Extension | Format Name | Features
TIF | Tag Image File | Raster format, ColorSpace options, Monochrome to True Color, File compression.
TGA | Truevision Targa | Raster format, 256 color to True Color.
EPS | Encapsulated Postscript | Vector format, ColorSpace options, True Color
PDF | Portable Document Format | Vector format, ColorSpace options, True Color

As mentioned, vector formats are generally preferred for their scalability. It might seem reasonable to expect that vector images should be infinitely scaleable, but the information necessary to describe these images can be considerable if data sets are very large. Origin provides the option to limit resolution for vector formats (Tools:Options, Page tab). For formats that have ColorSpace options, publishers typically prefer CYMK over RGB.


Formats Common to Web Publishing

There are two important considerations when creating images to be used on the web; you want to:

  • Minimize file size to increase download speed.

  • Choose a format that is supported by commonly used browsers.

The two most widely supported web image formats are JPG and GIF (GIF requires licensing and so is available with OriginPro only). PNG is growing in popularity as a replacement for GIF because it does not require licensing.

Formats Common to Web Publishing

Extension | Format Name | Features
JPG | Joint Photographic Experts Group | Raster, Grayscale or True Color, Adjustable compression (lossy).
GIF | Graphics Image Format | Raster, 256 color, Lossless compression.
PNG | Portable Network Graphics | Raster, Monochrome, 16 or 256 colors, or True Color (24 bit RGB), Lossless compression.

Note that you must balance color and detail with download speed; the lower the color density and resolution, the faster the download speed. However, there may be times when you decide to sacrifice some download speed for more color or sharpness.

Origin provides a default color palette of 24 colors chosen from colors found on the Windows palette. So, unless you need custom or True Color, GIF and 256 Color PNG images are a logical choice for web publishing.

If custom colors are needed, (you can add a limited number of colors to your Origin palette up to a maximum of 40), or you are setting color by RGB value, then you will do better with True Color. In such cases, PNG or JPG would be the better choices.

Since web pages are viewed on a computer screen, export at a resolution that approximates that of a computer monitor – 72 to 96 dots per inch (dpi).


Controlling the Size of the Exported Image

The physical page size of exported Clipboard (Edit:Copy Page) and vector images (File:Export Page…) is controlled by settings on the Page tab of the Options dialog box (Tools:Options). For further information on this dialog box, see Setting Your Preferences, the Page tab. The settings on the Page tab do not affect the size of raster images.

To illustrate the effect of the various Page tab options on the dimensions of Clipboard and vector images, we created a simple Origin graph, with a page size of 10.5 in. by 8.13 in., and exported it to MS Word 97. Monitor resolution was 96 dpi.

Ratio was set to 100 (%).

Margin Control was set to Page.

The following image sizes were reported by Word:

Setting | Clipboard (in.) | Vector Image File (EMF) (in.)
Simple | 8.13 x 10.5 | 8.13 x 10.5
Avanced, Resolution=96 | 8.13 x 10.5 | 8.13 x 10.5
Advanced, Resolution=300 | 8.13 x 10.5 | 25.4 x 32.8
Advanced, Resolution=600 | 8.13 x 10.5 | 50.8 x 65.6
Advanced, Keep Size | 8.13 x 10.5 | 8.13 x 10.5

Note that only the Copy Ratio affects the dimensions of the Clipboard image. The other settings -- Simple, Advanced (various resolutions), etc. have no effect on the size of the Clipboard image.

Conversely, testing showed that the dimensions of the inserted vector file were affected only by the Advanced settings (Resolution) and were not affected by the Copy Ratio. Note that reported image dimensions may vary by container application.

When producing raster images, keep in mind that the image has no fixed size; the “size” of the image is a function of the page size (normally determined by your printer), the resolution of the output device (monitor, printer, etc.) and the resolution of the image. If, for example, your printer’s page dimensions (Format:Page) are 10.5 in. by 8.13 in., and you export your graph as a 600 dpi TIF file, then display it on your computer’s monitor at 96 dpi, the rendered image will be quite large – much larger than can be viewed on a computer monitor at a resolution of 96 dpi. However, when you print your graph with a 600 x 600 dpi printer, it is rendered at the dimensions of the printer’s page size – 10.5 in. by 8.13 in.

It is important to note that while high resolution, True Color raster images do a good job of faithfully reproducing complex graphs, file sizes can be very large and in some cases, the export may fail. For instance, a 600 x 600 dpi TIF file rendered in 24-bit color using a page size of 10.5 in. x 8.13 in. will be over 90 MB in size. Experience has shown that the ability to produce such high resolution, high color files is system dependent.


Formats for Use by Other Applications

If you intend to edit your graphic file in another application, then you should choose that application's native file format or one of its supported formats.

Formats for Use by Other Applications

Extension | Format Name (type) | Owner Application
AI | Adobe Illustrator (vector) | Abobe Illustrator
BMP | Bitmap (raster) | Windows Paint
CGM | Computer Graphics Metafile (vector) | Wordperfect
DXF | AutoCAD Drawing Interchange (vector) | AutoCAD
EMF | Enhanced Metafile (vector) | MS Office Applications
PCX | Zsoft PC Paintbrush Bitmap (raster) | PC Paintbrush
PDF | Portable Document Format (vector) | Adobe Acrobat
PSD | Adobe Photoshop (raster) | Adobe Photoshop
WMF | Windows Metafile (vector) | MS Office Applications

These formats may be raster or vector. There are fewer vector format editors available and some of those programs will 'rasterize' a vector format when it is loaded in the editor. Consult your owner application’s documentation for details.


A Note on Making 35 mm Slides

  1. Install (locally) a PostScript compatible printer driver and configure it to Print to File.

This PostScript compatible print driver must allow one of the following:

  • A “paper size” defined as 35 mm slide.

  • A custom paper size of 7.33 in. by 11 in.

  1. Right-click on the PostScript compatible printer driver icon in the Printers folder and select Properties.

  2. Select the Paper tab.

  3. Select 35 mm from the Paper Size list box (if it is available) and click OK.

  4. If 35 mm is not available in the Paper Size list box, select Custom.

  5. Select the Landscape radio button in the Orientation group.

  6. Click Custom to set the size of 7.33" length and 11" width (note that some drivers will allow you to change the "Custom" name to "35 mm").

  7. Click OK (twice).

Select your PostScript-compatible printer driver (configured to print to file). If you have created your graph using another printer driver, you should update your graph to use your PostScript compatible print driver with its custom paper size:

  1. Select File:Page Setup.

  2. Select the Printer button.

  3. Choose your PostScript compatible printer from the Printer Name drop-down list. Even if it is already selected, click the OK button.

  4. Click OK.

  5. If you get an attention prompt asking whether you want to resize the page to match the printer, say Yes. Before you print to file in Origin, select View:Print View. Reposition text and drawing objects, as needed.

  6. Select File:Print to print the graph.

You will be prompted for a file name. Most service bureaus that make slides will accept a file name extension of .PS. Other acceptable files types may include: PRN, EPS, TIF, GIF (OriginPro only), BMP, PNG, and PDF. As mentioned, you are advised to check with your service bureau for recommendations on submitting compatible files.

A Note on Making 35 mm Slides

A survey of service bureau websites showed that most were able to process files created by one of two methods:

  • Export to common image formats such as EPS, BMP, JPG, etc.

  • Print to file using a PostScript compatible print driver.

Note that the submission requirements of service bureaus varies and it is best to check with the service that you plan to use for suggested file formats, print drivers, image sizes, etc. Some sites even make available a downloadable driver for generating 35 mm slide-convertible files.

Try to keep your file sizes small, as you will probably be submitting your files electronically. Large files will increase data transfer times, and may increase slide production costs. Some service bureaus provide an FTP option for submitting large files.

To prepare an Origin graphic file for slide production:

To configure the printer for a custom (slide) size:

To create an Origin graph file for slide production:


Working with Excel in Origin

You can open your Excel workbooks directly in Origin, either as Excel workbooks or as Origin worksheets. When you open your Excel workbook as a workbook, you have access to Excel's menus and features, plus you have direct access to many of Origin's powerful scientific graphing capabilities. When you open your Excel workbook as an Origin worksheet, you gain even broader access to Origin's powerful graphing and analysis features. In either case, you may opt to save your Excel data as part of your Origin project, making easy for you to share your Origin and Excel data with your colleagues.

If you share a networked Excel file with other users, you may want to save your Excel worksheets separately and link your Origin project to the Excel file, thus ensuring that graphs in your Origin project are updated dynamically whenever your Origin project file is opened.

Things to be aware when working with Excel in Origin:

  • You must have Excel version 7 (Microsoft Office 95) or later installed on your computer either as a local or network copy.

  • You may not be able to open an Origin project file if the file contains Excel workbook links or internally saved Excel data that were created on a computer running a newer version of Excel. This is a standard, backward compatibility issue.

  • Origin does not support dynamically linking a formula in a workbook to source data in another workbook.

Starting New Projects with an Excel Workbook Window Open

Opening a Workbook in Your Project

The Open Excel dialog box

Saving a Workbook Separately from the Project

Click here to view a multi-media demonstration


Starting New Projects with an Excel Workbook Window Open

You can opt to make the Excel workbook window the default child window in your new Origin project files. This will also have the effect of launching an instance of Excel in the Origin workspace.

To specify an Excel workbook as the default new project window:

  1. Select Window:Origin Options when an Excel workbook is active, or Tools:Options when any other child window is active. Both menu commands open the Options dialog box.

  2. Select the Open/Close tab.

  3. From the Start New Project With drop-down list, select Excel Workbook.

  4. Click OK.

You are prompted to Save as Origin’s startup options?

  • Yes saves the dialog box settings for future Origin sessions.

  • No applies your changes to the current Origin session only (Note that you can open and close Origin projects without closing the Origin session).


Opening a Workbook in Your Project

  1. Select File:Open Excel or click the Open Excel [image] button on the Standard toolbar. Both open the Open dialog box with ‘Excel (*.XLS)’ selected from the Files of Type drop-down list.

  2. Choose your folder from the Look In drop-down list.

  3. Choose your workbook file from the list box and click Open. This action opens the Open Excel dialog box.

  4. Select Open as Excel Workbook to open the file as an Excel workbook.

or

  4. Select Open as Origin Worksheet(s) to open the file as one or more Origin worksheets.

  5. Click OK to close the dialog box and open the workbook or worksheet(s).

If you select the Open as Excel Workbook radio button, Origin creates and names the workbook Bookn, where n is the lowest available number (that does not duplicate an existing window name). Additionally, Origin displays the full path and file name of the linked Excel file.

Additionally...

  • You can use Excel’s spreadsheet tools to process your data, within the Origin workspace.

  • You have direct access to Origin's 2D graphs. Once you have plotted your data in Origin, you can use Origin's analysis tools to analyze your plot.

  • You can save the workbook externally, allowing you to link your Origin project to a source Excel workbook file. This allows you to dynamically link a shared Excel project file to your Origin project.

Alternatively, you can save the workbook internally and it becomes part of your Origin project file. This makes it easy to bundle supporting Excel data files with your Origin project file.

If you select the Open as Origin Worksheet(s) radio button, Origin creates a worksheet window for each sheet selected from the Worksheets list box (in the Open Excel dialog box) and names the worksheet(s) SheetName. For example, if Sheet1 and Sheet2 are selected from the Worksheets list box, Origin names the resultant worksheets Sheet1 and Sheet2. Origin sets the column type for each of the worksheet columns to Text & Numeric.

If a workbook sheet includes formulas to calculate values, Origin displays the calculated values in the resultant worksheet.

Additionally...

  • You have no access to Excel’s spreadsheet tools in Origin, but -- unlike the workbook option -- you gain full access to Origin's graphing and analysis features.

  • Your data will no longer be connected to the source workbook. Changes you make to the data will not be reflected in the original workbook.

  1. Select File:New to open the New dialog box.

  2. Select Excel from the Window Type list box and click OK.

or

  1. Click the New Excel [image] button on the Standard toolbar.

Origin creates and names the new workbook Bookn, where n is the lowest available number (that does not duplicate an existing window name). The Bookn workbook contains four sheets, Sheet1 through Sheet4.

Opening a Workbook in Your Project

You can open existing Excel workbook files, or you can create new workbook files, in your Origin project.

To open an existing workbook in Origin:

To create a new workbook in Origin:

Click here to view a multi-media demonstration


Select this radio button to open the existing Excel workbook as an Excel workbook. This option allows you to use Excel tools when the workbook is active in the Origin workspace.

Select this radio button to open the selected sheet(s) of the Excel workbook as an Origin worksheet(s). The data displays in the worksheet(s) and loses its association with the Excel workbook file.

If the existing Excel workbook contains multiple sheets and the Open as Origin Worksheet(s) radio button is selected, the available workbook sheets are listed in this box.

Select the sheets to open as worksheets from this list box. Click to select a single sheet, SHIFT+click to select a range of sheets, or CTRL+click to select nonconsecutive sheets.

Prevent this dialog box from opening when you select an Excel file from the Open dialog box (File:Open Excel or the Open Excel button on the Standard toolbar), or when you select an Excel file from the “Recently Used Files” list in the File menu. When this check box is selected and you click OK, Origin automatically opens future Excel files using the last selection in the dialog box. For example, if the Open as Excel Workbook radio button is selected and the Do Not Show this Dialog Box check box is selected, then after clicking OK, Origin opens future Excel workbooks as workbooks. If the Open as Origin Worksheet(s) radio button is selected and the Do Not Show this Dialog Box check box is selected, then after clicking OK, Origin opens all sheets in future Excel workbooks as worksheets.

To re-enable the display of this dialog box, select the Opening Excel Files check box on the Excel tab of the Options dialog box (Window:Origin Options when a workbook is active, or Tools:Options when any other child window is active).

The Open Excel dialog box

When you open an existing Excel workbook (*.XLS) file, Origin's Open Excel dialog box opens.

Open Excel Dialog Box Controls

  • The Open as Excel Workbook Radio Button

  • The Open as Origin Worksheet(s) Radio Button

  • The Worksheets List Box

  • The Do Not Show this Dialog Box Check Box


Saving a Workbook Separately from the Project

Like other child windows, workbook windows can be saved separately from the project.

To save the active workbook to a *.XLS file:

  1. Right-click on the workbook window title bar and select Save Workbook As from the shortcut menu.

or

  1. From the main menu, select File:Save Window....

Both menu commands open the Save As dialog box with Excel (*.XLS) selected from the Save as Type drop-down list.

  2. Enter the File Name and click Save.


Toolbars and Excel

When a workbook is active, both the Origin and Excel Standard toolbars display. All buttons on Origin’s Standard toolbar are active except the Refresh and Duplicate buttons.

Origin’s 2D Graphs, 2D Graphs Extended, and 3D Graphs toolbars are available if open.

To open Origin toolbars when an Excel workbook is active:

  1. Select Window:Origin Toolbars. This menu command opens the Toolbars dialog box. Select the desired toolbar check boxes and click Close.

All buttons on Excel’s Standard toolbar are active except the New Workbook, Open, Save, Print, and Print Preview buttons. All other Excel toolbars that are open are available.

Note: Origin includes a toolbar spacer that stabilizes the toolbar region when child window activity is changed in Origin. The toolbar spacer is the reserved space for toolbars located below the menu bar. The height of the toolbar spacer is determined by the maximum height required to display all the selected docked toolbars for any of the child windows in the project. Because the Excel toolbars display when a workbook is active, the workbook window (if open in the project) generally “determines” the height of the toolbar spacer. If you have switched child window activity from the workbook to any other child window, and you want to manually reset the toolbar region for the currently active child window, right-click on the toolbar spacer and select Hide Toolbar Spacer from the shortcut menu.


Saves the active workbook to a file. Opens the Save As dialog box.

If you rename a workbook sheet that contains data that is plotted in a graph window, this shortcut menu command updates the connection between the data plot and its source sheet. After selecting the command, Origin opens the Associate Excel Worksheet dialog box. Edit this dialog box to re-establish the connection between the data plot and the sheet.

Occasionally, the workbook window, or other windows containing workbook data, may become inactive. This condition is apparent when the window containing workbook data has a blank display. To reactivate the window and restore its display, select this shortcut menu command.

Opens Origin’s online Help file.

Opens the Workbook Properties dialog box. Edit this dialog box to rename the workbook window and control how the workbook is saved when you save your project.

This dialog box also lists the workbook sheets that contain plotted data, and the associated Origin index numbers. Index numbers are included in the names of data plots that contain workbook data.

Excel Workbook Shortcut Menus

When a workbook is active, Origin provides a combination of Origin and Excel shortcut menus:

  • Excel shortcut menus are available by right-clicking inside the workbook.

  • The Origin shortcut menu is available when you click on the workbook window title bar.

Origin Shortcut Menu Commands Available from the Workbook Title Bar

Save Workbook As

Update Origin

Help Contents

Properties


Working with Workbook Windows

The workbook window is a special type of Origin child window. As is the case with other child windows, you can rename, arrange, save, or delete the workbook window. You can also open multiple workbook windows within an Origin project. Like the worksheet child window, you can view data in a workbook window and view the graphic representation of the data in a graph window. However, the workbook window also has features that distinguish it from other child windows. The following sections discuss procedures that are unique to the workbook window.

  • Renaming the Workbook

  • Renaming Sheets in the Workbook

  • Deleting Sheets from the Workbook

  • Creating a Matrix from the Workbook


Renaming the Workbook

To rename a workbook window:

  1. Right-click on the workbook window title bar and select Properties from the shortcut menu. This menu command opens the Workbook Properties dialog box.

  2. Type a new name in the Window Title text box and click OK.

If the workbook is saved externally to the project, the full path and file name also display in the title bar.


Renaming Sheets in the Workbook

If you create a data plot from your Excel workbook data and, subsequently, you rename the workbook sheet, you lose the association between the data plot and the source data. To re-establish the connection between the data plot and the workbook sheet:

  1. Right-click on the workbook window title bar and select Update Origin from the shortcut menu. This opens the Associate Excel Worksheet dialog box.

  2. Highlight the renamed workbook sheet and click OK.

Note1: If you have renamed multiple workbook sheets of plotted data, Origin reopens this dialog box automatically when you click OK. Repeat step 2 above, as needed.

Note 2: If you do not update Origin manually during the current session, Origin will prompt you to do so when you try to save your project file.


When you rename a workbook sheet that contains plotted data, Origin must be informed of the new sheet name. Select the new sheet name from the Excel Worksheets list box.

If you delete or rename a workbook sheet from which data is plotted, click this button to delete the associated data plots from all graph windows.

Click this button to re-associate the selected workbook sheet (in the Excel Worksheets list box) with the data plot.

The Associate Excel Worksheet Dialog Box

The Excel Worksheets List Box

The Remove Button

The OK Button

Note: If you have renamed multiple workbook sheets that contain plotted data, Origin re-opens this dialog box automatically after clicking OK. Edit the dialog box for the workbook sheet specified in the text at the top of the dialog box.


Deleting Sheets from the Workbook

If you create a data plot from your Excel workbook data and, subsequently, you delete the workbook sheet, you must update Origin:

  1. Right-click on the workbook window title bar and select Update Origin from the shortcut menu.

This opens the Associate Excel Worksheet dialog box. Click the Remove button to update Origin and remove all data plotted from the (deleted) sheet.


Creating a Matrix from the Workbook

You can select a contiguous range of Excel workbook data and create an Origin matrix directly. To create the matrix:

  1. Highlight the workbook data.

  2. From the menu bar, select Window:Create Matrix.

This menu command opens a new matrix window and fills the matrix with the highlighted data. This is particularly useful for creating an array of Z values that can be used to generate a 3D surface plot.


Origin Program Access to Excel Workbook Data

Excel macros can be run from Origin using LabTalk. Origin uses an excel object method to run Excel macros from Origin. For the Excel macro to run properly, you must supply the correct arguments using the excel object method. LabTalk will accept no more than five arguments. Additionally, the workbook containing the Excel macro must be the active window.

To run the macro, type the following in the Script window and press ENTER:

Excel.RunRange(SheetName,RangeName,Arg1,Arg2,…,Arg5)

Where SheetName is the name of the sheet containing the macro, RangeName is the name of the cell on the sheet where the macro starts (for example, C6), and Argn are the correct arguments for the macro (not exceeding five arguments).

The return value after executing the excel object method comes from the macro.

In addition to Excel macros, you can invoke Visual Basic application functions in Origin. As with macros, these functions are invoked using LabTalk’s excel object. For the Visual Basic application function to run properly, you must supply the correct arguments with the excel object method. LabTalk will accept no more than five arguments. Additionally, the workbook containing the Visual Basic application function must be the active window.

To run the Visual Basic application function, type the following in the Script window and press ENTER:

Excel.Run(FunctionName,Arg1,Arg2,…,Arg5)

Where FunctionName is the Visual Basic application function, and Argn are the correct arguments for the function (not exceeding five arguments).

The return value after executing the excel object method comes from the function.

Origin Program Access to Excel Workbook Data

When a workbook is the active child window, the user-interface is -- with the exception of a small subset of Origin window and plotting options -- provided by Excel. Thus, when a workbook is active, the Format, Tools, and Data menus are Excel menus. However, Origin does provide access to the workbook data using LabTalk, Origin’s built-in scripting language:

  • Running Excel Macros in Origin

  • Invoking Visual Basic Application Functions in Origin

  • Read or Set Cell Values


Plotting Workbook Data

When a workbook is active, Origin offers two (visual interface) methods for creating a new graph window from your data:

To do this... | Consult this section...
Use an interactive dialog to select workbook data and assign its designation (X,Y, Z, etc.) in the data plot. | Interactively Selecting Cells and Assigning their Plotting Designation (Default Plotting Method)
Plot Data into different layers of a graph window. | Interactively Selecting Cells and Assigning their Plotting Designation (Default Plotting Method)
Plot data into separate graph windows. | Interactively Selecting Cells and Assigning their Plotting Designation (Default Plotting Method)
Highlight your data in the workbook, select the graph type, and directly plot the data without an intermediary dialog box. | Highlighting Data and Using the Default Plot Assignments

When a graph window is active, Origin offers four (user-interface) methods for adding workbook data to the window:

To do this... | Consult this section...
Drag and drop your workbook data into a graph window. | Highlighting and Dragging Data into the Graph Window
Use an interactive dialog box to select workbook data and assign its Plot Designation (X,Y,Z, etc.) in the data plot. | Adding Data Using the Select Data for Plotting Dialog Box
Add data to an existing graph window. | Adding Data Using the Layer n Dialog Box or Adding Data Using the Select Data for Plotting Dialog Box
Use an interactive dialog box to select workbook data and assign its Plot Designation (X,Y,Z, etc.) in the data plot. | Adding Data Using the Plot Setup Dialog Box

Plotting Workbook Data

There are various methods for creating Origin graphs from Excel workbook data, depending on whether you want to create a new graph window or add workbook data to an existing graph window:

  • To create a new graph from your workbook data:

  • To add workbook data to an existing graph window:

Once the graph is created from the workbook data, you have full access to Origin’s graphic customization features.

Note: Occasionally, the workbook or graph window containing workbook data becomes inactive. This condition is apparent when the window containing workbook data has a blank display. To restore the display in the window, right-click on the workbook window title bar and select Update Origin from the shortcut menu.

How Origin Denotes Plotted Workbook Data


How Origin Denotes Plotted Workbook Data

Open a new Excel workbook and enter data on Sheet1 through Sheet4. Then plot the data from the four sheets in the following order: Sheet1, Sheet4, Sheet2, and Sheet3. The numeric values of @SheetNumber will be:

Sheet1* no number

Sheet2 @3

Sheet3 @4

Sheet4 @2

*When referencing the first plotted sheet, Origin does not use @1.

  1. Right-click on the workbook window title bar.

  2. Select Properties from the shortcut menu.

The workbook sheets and their associated @SheetNumber values display in the Sheet Name - Origin Index list box.

As with Origin worksheets, the data list at the bottom of the Data menu lists each of the data plots included in the active layer of the graph window. If the Y data is plotted versus X data, both datasets are listed. If the Y data is plotted versus workbook row number, then Origin lists the starting row number and the increment (in most cases, this value will be one).

The graph legend displays either the workbook sheet’s column titles, the sheet’s column names, or the full dataset name for the data plots. If column titles are present in the workbook sheet, they are displayed in the legend by default. If no column titles are present, the column name is displayed by default.

To display the full workbook dataset name instead of the workbook column name:

  1. Select Format:Page when the graph window is active. This menu command opens the Plot Details dialog box with the graph icon selected on the left side of the dialog box.

  2. Select the Legends tab.

  3. Select the Full Dataset Name check box and click OK.

Recall that the @SheetNumber does not display for data from the first workbook sheet to be plotted (see above example).

As with Origin worksheets, plotted workbook datasets are also displayed in the Layer Contents list box of the Layer n dialog box (To open this dialog box, double-click on the layer icon in the upper-left corner of the graph window). In the Layer Contents list box, Origin displays the workbook dataset that supplies the Y values in the data plot.

How Origin Denotes Plotted Workbook Data

The Excel workbook dataset naming convention is similar to the Origin worksheet dataset naming convention, but includes information on the sheet number in the workbook. Excel workbook datasets are named using the following syntax:

WorkbookName_ColumnName@SheetNumber

Where WorkbookName is the workbook name, ColumnName is the workbook sheet column name, and SheetNumber is a numeric value reflecting the order in which data was plotted from the sheets in the workbook. It is not the Sheetn number that displays at the bottom of the Excel workbook tab (for example).

To verify the @SheetNumber value for each sheet that contains plotted data:

References to plotted Excel workbook data are found in the same locations as are references to plotted Origin worksheet data. These locations include:

  • the data list at the bottom of the Data menu

  • the graph legend


Interactively Selecting Cells and Assigning their Plotting Designation (Default Plotting Method)

This plotting method is the Excel default option after installing and starting Origin. If the default options have been altered, re-activate this plotting method by doing one of the following:

If an Excel workbook is active,

  1. Select the Excel tab on the Options dialog box (Window:Origin Options).

  2. Clear the Default Plot Assignments check box.

or, if any other child window is active,

  1. Select Tools:Options, then click the Excel tab.

  2. Clear the Default Plot Assignments check box.

The Select Data for Plotting dialog box opens when you select Plot:Graph Type or click a button on the 2D Graphs, 2D Graphs Extended, or 3D Graphs toolbars (assuming the default plotting method is activated as discussed in the previous section “How to Activate this Method").

When plotting using this method, each graph type has particular data requirements. For example, a ternary diagram requires X, Y, and Z data. For a list of the data requirements for each graph type, see The Graph: Types.

To create a single data plot in a new graph window using Origin’s interactive plotting dialog box, do the following:

  1. With the workbook active, select Plot:Graph Type or click the Graph Type button on one of the graph toolbars. Selecting the menu command or the toolbar button opens the Select Data for Plotting dialog box.

  2. To specify the X values for the data plot, highlight the desired column of data, or a range of the desired column, and click the X button in the Select Data for Plotting dialog box. To plot the Y values versus row number, skip this step.

  3. To specify the Y values for the data plot, highlight the desired column of data, or a range of the desired column, and click the Y button in the Select Data for Plotting dialog box. If your graph doesn't require a selection of Z, error bar, label, or legend title values, go to step 6.

  4. If the selected graph type requires Z values, highlight the desired column of data, or a range of the desired column, and click the Z button in the Select Data for Plotting dialog box.

  5. If the selected graph type requires error bar, label, or legend title values, highlight the desired column of data, or a range of the desired column, and click the respective button in the Select Data for Plotting dialog box.

  6. Click Plot to create a data plot in a new graph window based on the selections in this dialog box.

To add additional data to an existing graph window using this dialog box, do not click Close after plotting your data. Leave the dialog box open for future access. Resize the dialog box to minimize its display.

To create multiple data plots in a new graph window using Origin’s interactive plotting dialog box, do the following:

  1. With the workbook active, select Plot:Graph Type or click the Graph Type button on one of the graph toolbars. Both the menu command and the toolbar button open the Select Data for Plotting dialog box.

  2. To specify the X values for the data plots, highlight the desired column of data, or a range of the desired column, and click the X button in the Select Data for Plotting dialog box. To plot the Y values for the data plots versus row number, skip this step.

  3. To specify the Y values for the data plots, do one of the following, or a combination of the following operations:

    • Highlight multiple Y columns by clicking and dragging through the desired column headings, SHIFT+clicking on a range of columns, or CTRL+clicking on nonadjacent columns.

    • Highlight a range of data in a column by clicking and dragging through the desired cells. CTRL+click to select additional cells.

    • Click the Y button in the Select Data for Plotting dialog box after selecting the data. If your graph doesn't require a selection of error bar, label, or legend title values, go to step 5.

  4. If the selected graph type requires error bar, label, or legend title values, highlight the desired column of data, or a range of the desired column, and click the respective button in the Select Data for Plotting dialog box.

  5. After making your data selections, select the data plot display method from the Plot Into drop-down list:

    • Select Single Layer to plot all data sets into a single layer graph.

    • Select Multiple Layers to plot each data plot into its own layer in the same graph window.

    • Select Multiple Pages to plot each data plot into its own single layer graph window.

  6. Click Plot to create the graph(s) specified in the Plot Into drop-down list.

To add additional data to an existing graph window using this dialog box, do not click Close after plotting your data. Leave the dialog box open for future access. Resize the dialog box to minimize its display.

Interactively Selecting Cells and Assigning their Plotting Designation (Default Plotting Method)

This plotting method uses the interactive Select Data for Plotting dialog box. This dialog box allows you to select data from the Excel workbook and assign the desired plotting designation (X, Y, etc.) by clicking a button within the dialog box. This bypasses the need to assign plot designations through the Worksheet Column Format dialog box, as you would normally do if the data were stored in an Origin worksheet.

This interactive plotting method also allows you to create multiple data plots that can be displayed in one graph layer, multiple graph layers, or multiple graph windows. If desired, the interactive dialog box can remain open after plotting, allowing you to add additional data plots to an existing graph window. You can resize the dialog box (by dragging on its edge) to minimize the amount of screen space it occupies.

How to Activate this Method

What Data Must be Selected for Each Graph Type?

Creating One Data Plot

Creating Multiple Data Plots


Highlighting Data and Using the Default Plot Assignments

This plotting method is not the default option after installing and starting Origin. To activate this plotting method, do the following:

  1. Open the Options dialog box (Window:Origin Options when a workbook is active or Tools:Options when any other child window is active)

  2. Choose the Excel tab and select the Default Plot Assignments check box.

This instructs Origin to make the same assumptions regarding column designation, column order, etc. as are made when worksheet data are plotted.

The data requirements for each of the built-in graph types are listed below. Note that in all cases, when you are advised to select a column of data, you can alternatively select a range of a column. Additionally, for some of Origin’s graph types, when selecting multiple columns, the use of row numbers for X values can be activated by holding down the CTRL key when selecting Plot:Graph Type or when clicking the Graph Type button on the 2D Graphs, 2D Graphs Extended, or 3D Graphs toolbar (hold the CTRL key down until the graph is created). When this option is available, the Description field refers to the “CTRL key being depressed."

Graph Type

Selected Data Requirements

Description

2 Point segment

2D Waterfall

3D Ribbons

3D Walls

3D Waterfall

3 Point segment

4 Pane

9 Panel

Area

Bar

Column

Horizontal 2 panel

Horizontal step

Line

Line+symbol

Polar

Scatter

Spline connected

Stack

Stack bar

Stack column

Vertical 2 panel

Vertical drop line

Vertical step

XYY 3D Bars

Zoom

One or more columns.

If one column is selected: The column supplies the Y values. The data are plotted versus row number.

If more than one column is selected: The leftmost column supplies the X values. All other columns supply the Y values. The data are plotted versus the X values.

If more than one column is selected and the CTRL key is depressed: All the columns supply the Y values. The data are plotted versus row number.

Box chart

One or more columns.

Each selected column supplies Y values for a separate box. Column names supply the associated X values.

Double Y Axis

Two or more columns.

If two columns are selected: Both columns supply Y values. The data are plotted versus row number.

If three columns are selected: The leftmost column supplies X values. Other columns supply Y values. The data are plotted versus X values.

Fill area

Two or three columns.

If two columns are selected: Both columns supply Y values. The data are plotted versus row number.

If three columns are selected: The leftmost column supplies X values. The other two columns supply Y values. The data are plotted versus X values.

Floating bar

Floating column

Two or more columns.

If two columns are selected and the CTRL key is depressed: The leftmost column supplies the starting Y values. The second column supplies the ending Y values. The data are plotted versus row number.

If three or more columns are selected: The leftmost column supplies the X values. The second column supplies the starting Y values. The next column supplies the intermediate Y values (etc.). The rightmost column supplies the ending Y values. The data are plotted versus X values.

If three or more columns are selected and the CTRL key is depressed: The leftmost column supplies the starting Y values. The next column supplies the intermediate Y values (etc.). The rightmost column supplies the ending Y values. The data are plotted versus row number.

High-Low-Close

Three columns or four columns.

If three columns are selected: The leftmost column supplies the high values, the next column supplies the low values, and the last column supplies the closing values. The data are plotted versus row number.

If four columns are selected: The leftmost column supplies the X values. The second column supplies the high values. The third column supplies the low values. The rightmost column supplies the closing values. The data are plotted versus the X values.

Histogram

One or more columns.

A histogram graph is created containing an interlaced histogram for each of the selected columns.

Histogram + Probabilities

One column.

A histogram is created for the selected column. The cumulative counts are also displayed.

Indexed size (Bubble) and color map

Three columns or four columns.

If three columns are selected: The leftmost column supplies the Y values. The second column supplies the size values. The rightmost column supplies the color values. The data is plotted versus row number.

If four columns are selected: The leftmost column supplies the X values. The second column supplies the Y values. The third column supplies the size values. The rightmost column supplies the color values. The data are plotted versus the X values.

Color map, Indexed size (Bubble)

Two columns or three columns.

If two columns are selected: The leftmost column supplies the Y values. The second column supplies the size or color values. The data are plotted versus row number.

If three columns are selected: The leftmost column supplies the X values. The next column supplies the Y values. The rightmost column supplies the size or color values. The data are plotted versus the X values.

Line series

Two or three columns.

If two or three columns are selected: The columns supply the Y values. Each series of row values comprises a line + symbol data plot. The data plot’s X values are determined by the selected Y column number (1, 2, or 3). The data plot’s Y values are determined by the actual cell values in the selected column.

Pie

One column.

The selected column values are summed, and the percentage of the total is determined for each selected value. The pie chart displays the percentage of the total for each selected value as a pie section.

QC (X bar R)

One or more columns.

If one column is selected: The column supplies the Y values. The X values are determined by the subgroup number (defined by the subgroup size and the number of column values). The data are plotted versus X values.

If more than one column is selected: The selected columns supply the Y values. The X values are determined by the row number. The data are plotted versus X values.

Ternary

Three columns.

The leftmost column supplies the X values. The second column supplies the Y values. The rightmost column supplies the Z values. The X, Y, Z data are plotted.

XYAM Vector

Three columns or four columns.

If three columns are selected: The leftmost column supplies the Y values. The second column supplies the angle values. The rightmost column supplies the magnitude values. The data are plotted versus row number.

If four columns are selected: The leftmost column supplies the X values. The second column supplies the Y values. The third column supplies the angle values. The rightmost column supplies the magnitude values. The data are plotted versus the X values.

XYXY Vector

Four columns.

The leftmost column supplies the X start values. The second column supplies the Y start values. The third column supplies the X end values. The rightmost column supplies the Y end values.

Origin provides two buttons to plot error bars when plotting workbook data using Origin’s default plot assignments, the Y Error button [image] and the XY Error button [image] on the 2D Graphs Extended toolbar.

To create a graph with Y error bars:

  • Highlight two workbook columns, or a range from two columns. Hold the CTRL key down and click [image] on the 2D Graphs Extended toolbar. Origin uses the row index number for X values, the left column for Y values, and the right column for Y error bar values. The data displays as a scatter data plot with Y error bars.

  • Highlight three workbook columns, or a range from three columns, and click [image] (do not press CTRL) on the 2D Graphs Extended toolbar. Origin uses the leftmost column for X values, the second column for Y values, and the rightmost column for Y error bar values. The data displays as a scatter data plot with Y error bars.

Note that you can create additional data plots with error bars as long as your highlighted workbook data is set up as X, Y1, Y1err, Y2, Y2err, etc.

To create a graph with X and Y error bars:

  • Highlight four workbook columns, or a range from four columns, and click [image] (do not press CTRL) on the 2D Graphs Extended toolbar. Origin uses the leftmost column for X values, the second column for Y values, the third column for X error bar values, and the last column for Y error bar values. The data displays as a scatter data plot with X and Y error bars.

Highlighting Data and Using the Default Plot Assignments

This plotting method minimizes the steps required to create a graph from a workbook by allowing you to highlight your workbook data and then select Plot:Graph Type or click the Graph Type button on the 2D Graphs, 2D Graphs Extended, or 3D Graphs toolbar. The graph is automatically created based on the data selection and Origin’s default plot assignments for the selected graph type.

There is no dialog box to serve as an intermediary plotting tool, so this plotting method must make assumptions on the designation (X, Y, etc.) of the highlighted data for a given graph type. These assumptions are discussed in the section, “What Data Must be Selected for each Graph Type?”.

How to Activate this Method

What Data Must be Selected for Each Graph Type?

Origin’s Default Plot Assignments Using this Plotting Method

Creating a Graph with Error Bars

Click here to view a multi-media demonstration


Highlighting and Dragging Data into the Graph Window

  • If one column (or a range from one column) is highlighted, this column supplies the Y values for the data plot. The data are plotted versus row number.

  • If multiple columns (or a range from multiple columns) are highlighted, the leftmost column supplies the X values. All other columns supply the Y values. The data are plotted versus the X values.

  • If multiple columns (or a range from multiple columns) are highlighted and the CTRL key is depressed while dragging the data, all the columns are treated as Y values. The data are plotted versus row number.

If the graph window contains multiple layers, dropped data plot in the active graph layer (note that dropping data onto a single layer graph will activate this graph and this layer). If data are dropped onto a layer icon, the data plots in that layer.

  1. Select Window:Origin Options when a workbook is active or Tools:Options when any other child window is active. This opens the Options dialog box.

  2. Select the Drag and Drop Plot type on the Graph tab. Select among the following options:

  • Select Line, Scatter, or Line+Symbol.

  • Select Current to use the style of the active graph window template (for example, line or scatter). If you have created a custom template with data plot style holders, Origin will search for the first available style holder. If there are no style holders available, Origin plots using the style of the graph template.

  1. Select your workbook data.

  2. With your mouse, point to the right edge of the selection area.

  3. Hold down the left mouse button and drag the highlighted data into the graph window.

  4. Release the mouse button.

Highlighting and Dragging Data into the Graph Window

This method provides no dialog box to serve as an intermediary plotting tool, therefore this method must make assumptions as to how to treat the highlighted data. Note that the resultant plot type is determined by the Drag and Drop Plot drop-down list selection on the Graph tab of the Options dialog box.

This plotting method is available whenever a workbook is active and a graph window is open in the project (excluding minimized and hidden graph windows).

To specify a plot type for your data:

To plot data using the drag and drop method:


Adding Data Using the Select Data for Plotting Dialog Box

  1. Clear the Default Plot Assignments check box on the Excel tab of the Options dialog box (Window:Origin Options when a workbook is active or Tools:Options when any other child window is active).

  2. Select Plot:Graph Type or click the Graph Type button on the 2D Graphs, 2D Graphs Extended, or 3D Graphs toolbar to open the Select Data for Plotting dialog box.

  1. If the Select Data for Plotting dialog box is not already open,

or

  1. If the Select Data for Plotting dialog box is already open,

  2. To clear the current data plot associations in the Select Data for Plotting view box, click Clear. (You may need to resize the dialog box to access this button.)

  3. To specify the X values for the data plot(s), highlight a column of data, or a range of a column, and click the [image] button. To plot the Y values versus row number, skip this step.

  4. To specify the Y values for a single data plot, highlight a column of data, or a range of a column.

    or

To specify the Y values for multiple data plots, do one of the following, or a combination of the following operations:

  • Highlight multiple Y columns by clicking and dragging through the desired column headings, SHIFT+clicking on a range of columns, or CTRL+clicking on nonadjacent columns.

    • Highlight a range of data in a column by clicking and dragging through the desired cells. CTRL+click to select additional cells.

Click the [image] button after selecting the data.

  6. If your graph requires Z values, highlight a column of data, or a range of a column, and click the [image] button in the Select Data for Plotting dialog box.

  7. If your graph requires Err(or bar), Label, or legend Title (Row) values, highlight the appropriate column(s), or a range from the column(s), and click the appropriate button.

  8. Click on your graph window to make it the active (receiving) graph window.

  9. Click Add Plot to plot the data to the active graph window. If the graph window contains multiple layers, the data plots in the active layer.

open the dialog box by making the workbook window active and selecting Plot:Graph Type or by clicking the Graph Type button on one of the graph toolbars.

make the workbook (that contains the data you want to plot) the active window. If this workbook is not the workbook that was active when you opened this dialog box, then the Change Book button displays in the Select Data for Plotting dialog box. Click this button to continue.

Adding Data Using the Select Data for Plotting Dialog Box

This method of adding data plots to an existing graph window uses the interactive Select Data for Plotting dialog box. Use this dialog box to add one or more data plots to a graph. When adding data to an existing graph window, the data are plotted using the style of the graph template (for example, line or scatter). If you have created a custom template with data plot style holders, Origin will use the first available style holder. If there are no style holders available, Origin plots the data using the style of the graph template.

You can continue to add data to a graph using this dialog box as long as you do not click Close. However, if you created a graph using a different plotting method or if you closed the Select Data for Plotting dialog box after creating a graph, then you must manually reopen the dialog box to activate this plotting method. To reopen the Select Data for Plotting dialog box:

To add data plots to an existing graph window using the Select Data for Plotting dialog box:

Note: Each graph type has specific data requirements (for example, a ternary diagram requires X, Y, and Z data). To learn more, see the specific plot type in the section entitled The Graph: Types.


Reference: Select Data for Plotting Dialog Box

Assign the selected workbook data to provide:

X: The X values for a single data plot or for multiple data plots.

Y: The Y values for a single data plot or for multiple data plots.

Z: The Z values for a single data plot.

Err: The Y error bar values for a single data plot. The error bars are associated with the first selected Y dataset to the left of the error bar data.

Label: The data label values for a single data plot. The data labels are associated with the first selected Y dataset to the left of the label data.

Title Row: The legend text for the data plot(s). If the Scan Data for Legend check box on the Excel tab of the Options dialog box is selected (Window:Origin Options when a workbook is active or Tools:Options when any other child window is active), Origin automatically assigns a row number for this designation.

This view box displays the data range selections for the X, Y, etc. values. Except for the Title field, the range is displayed using the following syntax:

StartColNameRowNum:EndColNameRowNum.

The Title field displays the selected row number only.

If you assign multiple Y ranges from the workbook, Origin creates multiple data plots using either the selected X data or the associated row numbers. Control the display of the data plots from this drop-down list.

  • Select Single Layer to plot all data sets into a single layer graph.

  • Select Multiple Layers to plot each data plot into its own layer in the same graph window.

  • Select Multiple Pages to plot each data plot into its own single layer graph window.

Select this check box to close the dialog box after clicking Plot.

If this check box is cleared, the dialog box remains open and available when a workbook or a graph window is active. Edit the dialog box to add additional data plots to the graph, or to create new graphs from the workbook data. Resize the dialog box to minimize the amount of screen space it occupies.

Click this button to create one or more data plots based on the selection in the data plot association view box. The data plots using the graph type that was selected when the dialog box first opened.

If you change workbooks after this dialog box is open, the Plot button is replaced by the Change Book button. Click this button to enable selection of data sets in the currently active workbook. After clicking this button, the button is replaced by the Plot button.

When the graph window is active, the Plot button is replaced by the Add Plot button. Click this button to add the current data selection in the Select Data for Plotting dialog box to the graph.

To use this button effectively, first redirect window activity to the workbook window. Create the new data plot association(s) by selecting data and clicking the plot designation buttons. Then redirect window activity back to the graph window. Click the Add Plot button to add the data plot(s) to the active graph layer.

This button is only available when data is highlighted in the workbook before you select Plot:Graph Type or click the Graph Type button on one of the graph toolbars. Additionally, if the previous condition is met, this button is only active when you first open the dialog box.

Click this button to plot the highlighted workbook data using Origin’s default plot assignments for the selected graph type instead of establishing plot associations in the dialog box.

After clicking the button, an Attention dialog box prompts to select the Default Plot Assignments check box on the Excel tab of the Options dialog box (Window:Origin Options when a workbook is active or Tools:Options when any other child window is active).

  • Click Yes to create the data plots from the highlighted workbook data and change the check box status.

  • Click No to create the data plots but leave the check box status unchanged.

Click this button to save the selection from the Plot Into drop-down list for future instances of this dialog box in the current Origin session.

Click this button to clear the current selection in the data plot association view box.

Click this button to close the dialog box without creating a data plot.

Reference: Select Data for Plotting Dialog Box

Dialog Box Controls (see figure)

The Plot Designation Buttons

The Data Plot Association View Box

The Plot Into Drop-down List

The Close Dialog After Plot Check Box

The Plot Button

The Change Book Button

The Add Plot Button

The Use Defaults Button

The Save Settings Button

The Clear Button

The Close Button


Managing Projects that Include Workbooks

When you select File:Save Project or File:Save Project As, or when you click the Save Project button on the Standard toolbar, all child windows (including minimized and hidden child windows) are saved as part of the project file. If a workbook window is open in the project, the project can be saved with a link to the source workbook file, or the workbook can be saved internal to the project.

  • Saving the project with a link to the source workbook file allows you to maintain an external Excel file that is updated when changes are made to the associated workbook in Origin. This source file is also available for use in other applications and can be accessed by other users.

  • Saving the workbook internal to the project enhances the project’s portability. You can open the project on any computer that has Origin and Excel installed and have full access to your workbook data.

Saving the Project with Links to External Excel Workbook Files

Saving the Project with Internal Excel Workbooks

Opening an Origin Project that has Links to External Excel Workbooks

Opening an Origin Project that Contains Internal Excel Workbooks


Saving the Project with Links to External Excel Workbook Files

To link the active workbook to your Origin project file:

  1. Right-click on the workbook window title bar and select Properties from the shortcut menu. This opens the Workbook Properties dialog box.

  2. Select the External radio button in the Save As group.

Origin displays the full path and file name of the linked source Excel file in the File Name group. If the workbook window was created in Origin, the default path is determined by the Excel path specified on the File Location tab of the Options dialog box (Window:Origin Options when a workbook is active, or Tools:Options when any other child window is active).

Updating the Linked Source Excel Files

Establishing Links if You Created the Workbook in Origin


Updating the Linked Source Excel Files

To ensure that changes made to an external Excel workbook in Origin are reflected in the source workbook file, you can manually re-save the workbook to the source file name, or you can automatically update the source file when you save your Origin project.

  • To manually re-save the workbook to the source Excel file:

    1. Right-click on the workbook window title bar and select Save Workbook As from the shortcut menu.

  • To automatically update the source Excel file when saving your project:

    1. Right-click on the workbook window title bar and select Properties from the shortcut menu. This opens the Workbook Properties dialog box.

    2. Select the Update Automatically check box in the Save As group and click OK.

When you select File:Save Project or File:Save Project As, or when you click the Save Project button on the Standard toolbar, Origin will automatically update the source Excel file.

If you have selected either Before Saving or Before Save Project As from the Saving Excel Workbooks drop-down list on the Excel tab of the Options dialog box (Window:Origin Options when a workbook is active, or Tools:Options when any other child window is active), then the Save Excel Workbooks dialog box opens after selecting one of the project saving options. To update the source Excel file, the associated check box must be selected from the External list box.

See, Reference: Save Excel Workbooks dialog box.


Reference: Save Excel Workbooks dialog box

This list box displays the workbooks in which the Internal radio button was selected from the associated Workbook Properties dialog box. These workbooks are saved as part of the Origin project file, not as an Excel file with a link to the project.

Note: All workbooks created by clicking the New Excel button [image] on the Standard toolbar have the Internal radio button selected by default.

This list box displays the workbooks in which the External radio button was selected from the associated Workbook Properties dialog box. These workbooks are saved as a separate Excel file, with a link to the project.

If the check box next to the workbook is selected, then the source Excel file is updated when the project is saved. To ensure that this check box is selected by default, select the Update Automatically check box in the workbook’s associated Workbook Properties dialog box.

This drop-down list controls the display of this dialog box when you save a project that contains a workbook.

  • Select Never to prevent Origin from opening this dialog box under all circumstances.

To re-enable the display of this dialog box

  • Select Before Saving to direct Origin to open this dialog box whenever you select File:Save Project (or whenever you click the Save button [image] on the Standard toolbar), assuming the project includes an Excel workbook.

  • Select Before Saving Project As to direct Origin to open this dialog box whenever you select File:Save Project As, assuming the project includes an Excel workbook.

, select either Before Saving or Before Save Project As from the Saving Excel Workbooks drop-down list on the Excel tab of the Options dialog box (Window:Origin Options when a workbook is active, or Tools:Options when any other child window is active).

Reference: Save Excel Workbooks dialog box

Dialog Box Controls (see figure)

The Internal List Box

The External List Box

The Show this Dialog Drop-down List


Establishing Links if You Created the Workbook in Origin

When you click the New Workbook button on the Standard toolbar to open a new workbook in Origin, the Internal radio button is selected by default in the workbook’s Workbook Properties dialog box.

To change the workbook’s status to external, do one of the following:

  • Right-click on the workbook window title bar and select Properties from the shortcut menu. This menu command opens the Workbook Properties dialog box. Select the External radio button and click OK.

  • Right-click on the workbook window title bar and select Save Workbook As from the shortcut menu. This menu command opens the Save As dialog box. Type a file name in the associated text box and click OK.

Now when you save your project, a link is saved to the source (external) Excel workbook file.


Saving the Project with Internal Excel Workbooks

To ensure that the active workbook is saved internal to the current project when the project is saved:

  1. Right-click on the workbook window title bar.

  2. Select Properties from the shortcut menu.

This shortcut menu command opens the Workbook Properties dialog box. Select the Internal radio button in the Save As group.

After changing the status of a workbook from external to internal, Origin will not update the original source Excel file when you select File:Save Project or File:Save Project As, or when you click the Save Project button [image] on the Standard toolbar. Additionally, any new changes made to the original source Excel file are not reflected in the project.


Opening an Origin Project that has Links to External Excel Workbooks

When you open a project that includes links to external Excel file(s), Origin opens those workbook(s) in the project. If Origin can’t find the Excel file at the location specified in the Linked File Path field of the workbook’s Workbook Properties dialog box, then Origin opens the File Name dialog box:

  1. Type the correct external file path and file name in this dialog box and click OK.

If the Excel file isn’t available:

  1. Click Ignore (or Ignore All). In such cases, Origin opens the project and displays a placeholder for each workbook whose source wasn’t available. Additionally, data plots created from the missing workbook(s) are not displayed in the graph window(s).


Opening an Origin Project that Contains Internal Excel Workbooks

When you open a project that includes internal Excel file(s), Origin displays the Excel workbook(s) as they were saved with the project.


Type the desired workbook window name in the Window Title text box.

When the External radio button is selected (in the Save As group), Origin displays the full path and file name of the linked source file in the Linked File Path field.

Select the Internal radio button to save the active workbook internal to the project when the project is saved. When this radio button is selected and the project is saved, changes made to the workbook in Origin are not reflected in the original source workbook. Conversely, changes made to the original source workbook file are not reflected in the Origin project.

Select the External radio button to save a link to the active workbook when the project is saved. When this radio button is selected and the project is saved, changes made to the workbook in Origin are reflected in the original source workbook. Additionally, changes made to the original source workbook file are reflected in the Origin project.

Select the Update Automatically check box to automatically update existing links between the workbook display in Origin and the original source workbook when the project is saved. This check box is only available when the External radio button is selected. If this check box is cleared, changes made to the workbook in Origin are not reflected in the source workbook file. Additionally, when the project is re-opened, the workbook changes are not included.

When plotting workbook data from multiple sheets, Origin uses an @SheetNumber notation to denote the sheets that contain plotted data. To determine the numeric value of SheetNumber, Origin numbers the sheets in the order in which they are accessed for plotting. The workbook sheets and their associated SheetNumber values are listed in this list box.

Reference: The Workbook Properties Dialog Box

Dialog Box Controls (see figure)

The File Name Group

The Save As Group

The Sheet Name - Origin Index List Box


Troubleshooting Problems Using Excel in Origin

If Excel Doesn't Close When You Exit Origin

If One of the Windows has a Blank Display

If Excel Fails to Launch from Within Origin


If Excel Doesn’t Close When You Exit Origin

If Excel Doesn't Close When You Exit Origin

If you are working with an Origin project that includes Excel workbooks, Origin closes Excel when you close Origin or when you close the project that includes the workbooks.

If Origin fails to properly close Excel, you must close Excel manually. To accomplish this, press CTRL+ALT+DELETE. This action opens the Close Program dialog box (On Windows 2000 systems, this action opens the Windows Security dialog box. Choose Task Manager). Select Excel (Excel.exe) from the list box and click the End Task (End Process) button.


If One of the Windows has a Blank Display

Occasionally, the workbook window, or other windows containing workbook data, may become inactive. This condition is apparent when the window containing workbook data in blank. To reactivate the window and restore its display:

  1. Right-click on the workbook window title bar and select Update Origin from the shortcut menu.


If Excel Fails to Launch from Within Origin

In certain instances, Excel may fail to launch from within Origin. In most cases, this is due to a problem with the Excel registration entry in Windows. To rectify this problem, Excel must be un-installed and then re-installed.

For a complete discussion of this issue, go to the Online Technical Support Center on OriginLab's website and search on Keyword(s) Excel fails to open.


Analysis: Basics

This chapter is devoted to basic data manipulation and exploration techniques:

  • Methods of selecting and excluding data prior to performing some analysis -- curve fitting, statistical, FFT, etc. -- on your data.

  • Extracting worksheet data that meet certain criteria and writing those data to a new worksheet.

  • Sorting Data.

  • Performing basic math operations on data sets -- normalizing, translating, subtraction/addition of some reference data set from the data to be analyzed, etc.

  • Use of Origin's basic data exploration tools -- the Data Display tool, Data Selector, Data Reader, Screen Reader, Enlarger Tool, etc.


Data: Selecting and Excluding

This section concerns defining a group of data points for purposes of performing some analysis of the data. Analyses and data selection and exclusion actions are performed on both worksheet and plotted data. Some analysis operations are performed on worksheet data (correlation, for instance ), some are performed on plotted data (smoothing, for instance ), and some analyses can be performed on either worksheet or plotted data (FFT or non-linear curve fitting, for instance).

In any case, prior to performing your analysis, you must define a range of data on which to perform the intended analysis. While this may be as simple as selecting a single column of worksheet data or making a data plot active, you are not limited to selection of entire data sets or data plots. Origin provides a number of tools for selecting a subrange of your tabulated (worksheet) or plotted data. Conversely, you may opt to exclude single data points, or a range of points, from your analyses.

Click here to view a multi-media demonstration

Active Child Window

Data Selection/Exclusion Method

worksheet

(For basic worksheet data selection procedures, see Navigating the Worksheet).

  • To define a contiguous subrange of your worksheet data, set the worksheet display range.

  • To exclude (not necessarily contiguous) portions of your data set from analyses, use the Masking tools.

  • To extract data values that meet certain criteria (e.g., if value is > 0) and write values to a new worksheet, use the Extract Worksheet Data feature.

graph

  • To select a data plot for analysis, choose the plot from the data list at the bottom of the data menu.

  • To define a contiguous subrange of your plotted data for analysis, use the Data Selector tool. Similarly, edit the display range of your data plot with the Plot Range dialog box.

  • To exclude a range or a single point from your analysis, use the Masking tools.

Note: If you have imported an image into a matrix and wish to define a subregion of that matrix for further analysis, see Examining a Region of Interest.


Selecting the Active Data Plot for Analysis

When performing analysis on a data plot in a graph window, you must make the data plot you want to analyze the active data plot. To make a data plot active:

  1. Select the data plot from the data list at the bottom of the Data menu.

The data list includes all data plots in the active layer. The currently active data plot is checked.

Note: Numerous analysis menu commands and tool functions, when applied to a data plot, will also make changes to the associated worksheet or worksheet data (for example, Analysis:Subtract and Analysis:Smoothing).


Setting the Worksheet Display Range

To set the beginning of the display range:

  1. Select a cell, a range of cells, or a worksheet row, and select Edit:Set As Begin or right-click and select Set As Begin from the shortcut menu.

Values in the cells above the selected cells are hidden from view; they are not deleted.

To set the end of the display range:

  1. Select a cell, a range of cells, or a worksheet row, and select Edit:Set As End or right-click and select Set As End from the shortcut menu.

Values in the cells below the selected cells are hidden from view; they are not deleted.

To reset the display range back to the full worksheet range:

  1. Highlight the affected columns.

  2. From the menu, select Edit:Reset to Full Range.

Setting the Worksheet Display Range

Origin provides an option to modify the display range of the worksheet without deleting the hidden (excluded) cells and cell values. Once the display range has been modified, plotting and analysis operations act only on the visible data.

Setting the Beginning of the Display Range

Setting the End of the Display Range

Resetting to Full Range


Setting the Data Plot's Display Range

Note that changing the display range in the worksheet affects all current and future plot instances.

To set the beginning of the display range:

  1. Select a cell, a range of cells, or a worksheet row, and select Edit:Set As Begin or right-click and select Set As Begin from the shortcut menu.

Values in the cells above the selected cells are hidden from view; they are not deleted.

To set the end of the display range:

  1. Select a cell, a range of cells, or a worksheet row, and select Edit:Set As End or right-click and select Set As End from the shortcut menu.

Values in the cells below the selected cells are hidden from view; they are not deleted.

To reset the display range back to the full worksheet range:

  1. Highlight the affected columns.

  2. From the menu, select Edit:Reset to Full Range.

This method does not affect the worksheet display range and, therefore, does not affect other plot instances of the data sets.

To set the display range with the Data Selector tool:

  1. Right-click on the data plot whose range you want to edit and select Set as Active from the shortcut menu. If this command is not available, the data plot is already active.

  2. Click on the Data Selector tool [image] in the Tools toolbar. Data markers appear at both ends of the active data plot. The Data Display tool also opens.

  3. To mark the data segment of interest, click and drag the two markers along the X axis with the mouse. Release the mouse button when the marker displays at the desired data point.

    Alternatively, use the ¬ and ® keys to select a marker. The CTRL + ¬ (or ®) keys move the selected marker to the next data point.

  4. Do one of the following after you have positioned the data markers to enclose the data segment of interest:

    • Double-click within the selected range in the graph layer.

    • Press ENTER.

    • Click on the Pointer tool [image] in the Tools toolbar.

    • Press ESC.

  5. To complete the operation and set the display range for the data plot, select Data:Set Display Range from the Origin menu

or

  5. Right-click and select Set Display Range from the shortcut menu.

To reset the display range of the data plot back to the original range:

  1. From the menu, select Data:Reset to Full Range

or

  1. Right-click and select Reset to Full Range from the data plot's shortcut menu.

This method does not affect the worksheet display range and, therefore, does not affect the other plot instances of the data sets.

  • To access this option from the data plot's shortcut menu:

  • To access this option from the Layer n dialog box:

Both actions open the (Plot) Range dialog box.

This method can also be invoked through the Plot Setup dialog box (see next).

  1. Right-click on the data plot whose range you want to edit and select Edit Range.

  1. ALT + double-click on the layer icon that includes the data plot whose range you want to edit. This action opens the Layer n dialog box.

  2. Select the data plot (the primary data set) from the Layer Contents list and click Edit Range. (Note: If the data plot is part of a data plot group, you cannot click the Edit Range button without first ungrouping the data sets. To avoid ungrouping, edit the data plot's range using the shortcut menu command (see next).

Dialog Box Controls ( see figure)

The Min and Max view boxes list the number of rows in the source worksheet. These boxes are not editable.

To alter the data plot's display range, clear the Auto check boxes (as needed) and edit the From and To values.

Note: To reset the display range of the data plot back to the original range, select Data:Reset to Full Range from the Origin menu, or right-click on the data plot and select Reset to Full Range.

Setting the Data Plot's Display Range

There are several ways to change the graph's display range, without altering the axis scale values:

  • Alter the display range of the data sets in the associated worksheet.

  • Alter the display range of the active data plot graphically, using the Data Selector tool from the Tools toolbar.

  • Alter the display range of a data plot by specifying the starting and ending worksheet row numbers.

  • Alter the Range in the Plot Setup dialog box without checking Rescale.


Extracting Data from the Worksheet

Specify a range of worksheet rows in the From and To text boxes.

If you selected a range of rows or a column before selecting the menu command, the From and To text box values will reflect your selection.

Type a conditional expression into the If text box. You can use any of the logical and relational operators listed below. Additionally, you can use any arithmetic operators (+, -, *, /, ^).

To use a worksheet column in the expression, use the col( ) notation and type the column name or number in the parentheses. To indicate a row number, use the variable i. To continue an expression on to the next line, press ENTER.

To extract worksheet data using text criteria, use the following syntax:

col(ColumnName)[i]$=="text"

For example:

col(Station)[i]$=="Northwest"

Origin uses a case insensitive filter when extracting data using a text criteria.

Supported Logical and Relational Operators

> greater than

>= greater than or equal to

< less than

<= less than or equal to

== equal to

!= not equal to

&& and

|| or

Click this button to evaluate the conditional expression for all cells in the selected rows. For each worksheet cell that satisfies the conditions of the expression, Origin copies the data in that entire row to a new worksheet which Origin creates.

Click this button to set the specified formula as the default formula for this worksheet.

Type a name in this text box for the worksheet that will receive the extracted values. Origin will create this worksheet.

Extracting Data from the Worksheet

The Extract Worksheet Data menu command directs Origin to locate data in the worksheet based on a user-specified conditional expression. The located data values are extracted; that is, they are copied and pasted to another worksheet.

To extract data from a worksheet:

  1. Click on the worksheet to activate it.

  2. From the menu, select Analysis:Extract Worksheet Data.

This menu command opens the Extract Worksheet Data dialog box.

The Extract Worksheet Data Dialog Box (see figure)

For Row Number (i) From and To

Type an Expression (The if Text Box)

The Do It Button

The Update Button

The Put into Worksheet Text Box

Note: See the topic, A Note About the Row Number [i].


A Note About the Row Number [i]

In the Set Column Values and the Extract Worksheet Data dialog boxes, columns are specified using the col( ) function or the WorksheetName_ColumnName notation. The row numbers of a worksheet are specified using the variable i.

If i is not used in the expression, Origin assumes that the same i is used for all the columns involved in the given expression.

For example:

col(C)=col(A)-col(B)

is interpreted as:

col(C)[i]=col(A)[i]-col(B)[i]

where the notation col(C)[i] refers to the ith row of column C, and the equation is repeated for all rows in the given range.

If i is used explicitly in the expression, the assumption of a common i is overridden.

For example:

col(C)=col(B)[i+1]-col(B)[i]

calculates the increment between each row in column B, and puts this value into column C. The equation is repeated for all rows in the given range.


Masking Data from Analysis

  1. When a worksheet is active, select a range of data or a single cell and click the Mask Range button [image].

The cell color will change to red and indicating that the data point is masked. The masked data will not be included in any fitting or analysis you do to your data.

Once the data is masked, you can change the color of the masked cells by clicking the Mask Color button [image]. Each time you click this button the mask color increments through the colors in the color palette.

To toggle masking on and off, click the Disable/Enable Masking button [image].

When a graph is active, you can mask a range of data or a single data point.

To mask a single data point:

  1. Click the Mask Point Toggle button [image]. This action activates the Data Reader tool.

  2. Double-click on the data point that you want to mask. The Data Reader tool closes and the data point changes color to red and is masked.

To unmask a data point:

  1. Click the Mask Point Toggle button once more, then double-click on the desired data point.

To mask a range of data in a graph:

  1. Click the Mask Range button [image]. Data markers display on both ends of the active data plot.

  2. Drag the markers to select the desired data range and then press ENTER.

Once the data is masked, you can change the color of the masked cells by clicking the Mask Color button [image]. Each time you click this button the color mask increments through the colors in the color palette.

To unmask a range of data points:

  1. Click the Unmask Range button [image]. You can now select a range to unmask (not necessarily the same range you masked).

The Swap Mask button [image] removes the masking from the masked data and applies it to the unmasked data.

The Hide/Show Masked Points button [image] toggles the display of the masked points in the graph.

The Disable/Enable Masking button [image] toggles the masking on and off.

Masking Data from Analysis

The Mask toolbar (View:Toolbars) allows you to exclude ranges of data or individual data points from analysis. It is most useful if you want to analyze only a specific section of your data, or if you have erroneous data points that you do not want included in your analysis. The Mask toolbar is available for both worksheet and graph windows.

To Mask Data in a Worksheet

To Mask Data in a Graph

Note: The following Analysis menu commands are not affected by masking data (masking is ignored):

>> Simple Math
>> FFT Filtering
>> Translate Horizontal/Vertical
>> Subtract Reference Data or Straight Line (graph is active).

To learn more about masking data, review the DATA MASKING.OPJ project located in your Origin \SAMPLES\ANALYSIS\DATA MASKING folder.


Math Operations on Worksheet Data

Sorting Data

Normalizing Data

Date and Time Math Operations

Performing Calculations on Data Sets Using LabTalk

Click here to view a multi-media demonstration on use of the Set Column Values feature

Click here to view a second multi-media demonstration on Sorting/Normalizing worksheet data


Sorting Data

In simple sorting, the specified data is sorted using one "sort by" column and a selected sort order.

To perform a simple sort of the selected data:

  1. From the menu, select Analysis:Sort Columns.

  2. Specify Ascending or Descending from the associated submenu.

If you have highlighted a range of worksheet columns, or a range of values in multiple columns, Origin sorts only the selected data based on the leftmost selected data set and the chosen sort order. If you have highlighted one column, or a range from one column, Origin sorts only the selected data. Note that if you highlight a range of rows, and not the entire column(s), the sort menu command which is enabled will be Analysis:Sort Range.

To perform a simple sort on the entire worksheet:

  1. Select Analysis:Sort Worksheet.

  2. Specify Ascending or Descending from the associated submenu.

Origin sorts the entire worksheet based on the leftmost selected column or the leftmost range of selected values in the worksheet and the chosen sort order. If no columns or values are selected, then Origin sorts the entire worksheet based on the leftmost column of the worksheet.

To perform a nested sort on the selected data:

  1. Select Analysis:Sort Columns:Custom

or

  1. Click the Sort button on the Worksheet Data toolbar.

To perform a nested sort on the entire worksheet:

  1. Select Analysis:Sort Worksheet:Custom

or

  1. Select the entire worksheet and click the Sort button.

The Nested Sort Dialog Box ( see figure)

Select the column for the primary sort from the Selected Columns list box and click the Ascending or Descending button. Then select the column for the secondary sort from the Selected Columns list box and click the Ascending or Descending button. Select additional columns as needed.

After clicking OK, Origin sorts the selected data so that the primary column is in ascending or descending order, as specified. If there are multiple rows with the same value in the primary column, the values in the corresponding rows of the secondary column, and the sort order chosen for the secondary column, are used to determine the ordering. This nesting process is continued down to the last column in the Nested Sort Criteria list box.

Sorting Data

You can sort individual columns, multiple columns, a range of worksheet data, or an entire worksheet. Origin offers simple sorting as well as nested sorting:

  • Simple Sorting

  • Nested Sorting

Click here to view a multi-media demonstration


Normalizing Data

To normalize a data set or a range of values in a data set:

  1. Highlight the desired column.

  2. Select Analysis:Normalize.

This menu command opens the Normalizing Dataset dialog box. The dialog box displays minima and maxima for the selected range of values, and provides a text box to enter a factor value.

  3. Accept or enter a factor value and click OK.

Origin divides all values in the selected range by the factor value.

Click here to view a multi-media demonstration


using 1 day = 24 hours = 1440 minutes = 86400 seconds, then 30.2765 days would be 30 days, 6 hours, 38 minutes and 9.6 seconds.

46 is converted to October because mod(46,12) is 10, and 10 is October (December = 0). However, you cannot type values outside the range 1 to 12 into a cell in a Month column. If you do so, Origin displays a missing value in the cell.

46 is converted to Thursday because mod(46,7) is 4, and 4 is Thursday. However, you cannot type values outside the range 0 to 6 into a cell in a Day column. If you do so, Origin displays a missing value in the cell.

Date and Time Math Operations

Dates and Time:

If you create a worksheet with column A containing Date values and column B containing some measured values, you could create a third column (C) which contained the elapsed Time between each element (row) by using the following formula for column C in the Set Column Values dialog box:

col(A)[i]-col(A)[i-1] (for i = 2 to last row of A)

If you convert the elapsed Time column to a Numeric column, the elapsed time values will represent the number of days (for example...).

Month:

Months are enumerated from January (1) to December (12). Numbers greater than 12 are handled by a modulus function when converted to Month (for example...).

Day:

Days are enumerated from Sunday (0) to Saturday (6). Numbers greater than 6 are handled by a modulus function when converted to Day (for example...).


Performing Calculations on Data Sets Using LabTalk

Vector calculations are always performed row by row when you use the general notation:

data set = scalar operator data set

or

data set = data set operator data set

This is the case even if the data sets have different numbers of elements. For example, if you start with the following worksheet:

And then type the following LabTalk script in the Script window (Window:Script Window):

data1_C = data1_A * data1_B (press ENTER)

The elements of data1_A are multiplied by the corresponding elements of data1_B and the product of each multiplication is put in the corresponding rows of the data1_C data set.

The resultant worksheet displays as follows:

An example of a vector calculation involving a scalar follows. You can also execute this LabTalk script in the Script window:

data1_b = 3 * data1_a (press ENTER)

In this example, every element of the data1_a data set is multiplied by 3. The results are put into the corresponding rows of the data1_b data set.

If you were to instead execute the following script (assuming newData does not previously exist) in the Script window:

newData = 3 * data1_A (press ENTER)

then a temporary data set called newData is created and assigned the result of the vector operation. Elements of the temporary data set can be accessed in the same way you would access an element of a data set contained in a worksheet.

When you use one of the following notations to perform vector operations:

data set = scalar operator data set

or

data set = data set operator data set

row by row calculations are performed even if the data sets have different numbers of elements. However, there may be times when you want to use linear interpolation when performing calculations on data sets of different sizes.

As an example, consider the following two dependent data sets, each with its own set of independent data:

If you were to subtract baseline_b from signal_b by entering the following script in the Script window:

signal_b -= baseline_b (press ENTER)

then the subtraction would be performed row by row (with no linear interpolation) as follows:

However, if you use a data set operator data set assignment-operation statement (starting with the initial worksheet values) in the Script window:

signal_b - baseline_b (press ENTER)

then linear interpolation of the second data set (baseline_b) within the domain of the first data set (signal_b) is used to carry out the subtraction. The results are stored in the first data set (signal_b). The following figure shows the results of this calculation, when starting with the initial worksheet values.

In this example, interpolation was used to find the Y values of baseline_b using the X values given by signal_a within the X domain of baseline_b.

In order to have Origin perform the interpolation outside the domain of the second data set (in this case, baseline_b) for all X values of the first data set, you need to specify an option switch (-O). The syntax using this option switch is:

data set operator-O data set

Thus, in this example, you would enter the following script in the Script window:

signal_b --O baseline_b (press ENTER)

The following figure shows the results of this calculation, when starting with the initial worksheet values.

In this example, the option switch caused linear interpolation of baseline_b to be used within and outside of its domain in order to perform the calculation for the entire domain of signal_b.

In addition to using the subtraction operator with the -O option, you can use the addition (+), multiplication (*), division (/), and exponentiate (^) operators with -O.

Note: When data is unsorted or there are duplicate Y values for any given X value, there will be inconsistencies in the linear interpolation results.

Performing Calculations on Data Sets Using LabTalk

You can use LabTalk to perform calculations on data sets, either performing the calculations row by row, or using linear interpolation if the data sets have different numbers of elements. In this case of differing numbers of elements, use of linear interpolation is dependent on your LabTalk notation.

Row by Row Calculations

Calculations Using Interpolation

For more information on LabTalk, see the LabTalk Language Reference section of the Programming Help file (Help:Programming).


Subtracting a Straight Line

This feature is only available when a graph is active.

To define a straight line, then subtract that line from the active data plot:

  1. Select Analysis:Subtract Straight Line.

When this menu command is selected, the cursor changes to a cross-hair symbol (the Screen Reader tool) and the Data Display tool opens if it is not already open.

  2. Click in the graph window to view the XY coordinates of the selected location in the Data Display tool.

  3. Double-click at the desired location to set the endpoints of the line.

Origin subtracts the line you have drawn from the active data plot and plots the result. Because this menu command changes the Y data set in the worksheet, it affects all plot instances of the data set.


Subtracting Reference Data

This feature is only available when a graph is active.

To subtract one data plot from another:

  1. Select Analysis:Subtract:Reference Data.

This menu command opens the Math on\between Data Set dialog box with the (-) operator selected in the Operator text box.

Select and move the desired data sets into the Y1 and Y2 text boxes using the => buttons. If the X values of the two data sets do not match, interpolation is automatically performed on the reference data. Because this menu command changes the Y data set in the worksheet, it affects all plot instances of the data set.


Performing Math Operations

To perform a math operation on or between two data sets:

Select Analysis:Simple Math. This menu command opens the Math on/between Data Set dialog box.

Note that the Analysis:Simple Math menu command is only available when a graph window is active. When the worksheet is active, similar results can be obtained by selecting Column:Set Column Values.

Note: The Simple Math operations will modify worksheet data sets. Additionally, the X data set(s) should be sorted before performing Simple Math operations.

The Math on/between Dataset Dialog Box (see figure)

To perform a math operation

  1. Click to select the desired data set from the Available Data list box.

  2. Click the upper => button to display this data set in the Y1 text box.

  3. Type a numerical value, a variable, a data set, or an equation in the Y2 text box. To display a data set in this text box, select the data set from the Available Data list box and click the lower => button.

  4. Type an arithmetic operator in the Operator text box.

  5. Click OK to perform the math operation.

For example, if you add the Data1_B data set into the Y1 text box, the Data1_C data set into the Y2 text box, and a subtraction operator (-) in the Operator text box, Origin subtracts each value in Data1_C from the corresponding value in Data1_B and saves and plots the result as Data1_B after clicking OK.

You can also type a numerical constant for the Y2 value. For example, if Y2=35 and the operator is a minus sign (-), then Origin subtracts 35 from each value in the Y1 data set and plots the result after clicking OK.

Note: If the X coordinate points of Y2 do not correspond to the X coordinate points of Y1, Y2 is interpolated or extrapolated for each point in Y1. The interpolation or extrapolation depends on the line connection type for the Y2 data plot. For example, if the line connection type is spline, the interpolation is a spline interpolation.


Horizontal and Vertical Translation

To move the entire active data plot horizontally along the X axis:

  1. Select Analysis:Translate:Horizontal.

This menu command opens the Data Display tool if it is not already open.

  2. Double-click on the data plot (or click and press ENTER) to choose the initial data point. The XY coordinates of the data point display in the Data Display tool.

  3. Double-click again at any point on the page.

Origin calculates the difference in X between the two selected X-coordinates and adds this amount to the entire active data plot. Because this menu command changes the X data set in the worksheet, it affects all plot instances of the data set.

To move the entire active data plot vertically along the Y axis:

  1. Select Analysis:Translate:Vertical.

This menu command opens the Data Display tool if it is not already open.

  2. Double-click on the data plot (or click and press ENTER) to choose the initial data point. The XY coordinates of the data point display in the Data Display tool.

  3. Double-click again at any point on the page.

Origin calculates the difference in Y between the two selected Y-coordinates and adds this amount to the entire active data plot. Because this menu command changes the Y data set in the worksheet, it affects all plot instances of the data set.

Horizontal and Vertical Translation

The Horizontal and Vertical translation menu commands are only available when a graph is active.


Interpolating and Extrapolating

This feature is only available when a graph is active.

To interpolate or extrapolate between the data points of the active data plot:

  1. Select Analysis:Inter/Extrapolate.

The menu command opens the Make Interpolated Curve from Dataset dialog box.

  2. Type the minimum and maximum values to set the length of the interpolated or extrapolated data plot in the Make Curve Xmin and Make Curve Xmax text boxes. You are not limited to the original length.

  3. Specify the number of points to draw in the interpolated or extrapolated data plot in the Make Curve # Points text box.

  4. Click Apply to view the interpolated or extrapolated data plot based on the current settings including the specified Interpolate Curve Color.

The dialog box remains open and is available for further changes. Each time you change a setting and click Apply, the results update in the graph. The results are not finalized until you click OK.

When you click OK, several things occur:

  • A hidden worksheet is created and named InterExtrapn (To show a hidden window, see Hiding a Window).

  • The resulting data set is named InterExtrapn_wkscol, where n is the inter/extrapolated curve number in the project (starting from 1) and wkscol is the concatenated worksheet and column name of the original data set

  • The InterExtrapn_wkscol data set is plotted in the active graph layer.

Note that the interpolation or extrapolation is dependent on the type of line connecting the data points in the original data plot.

To learn how to perform calculations on data sets (row by row or using interpolation) using LabTalk, see Performing Calculations on Data Sets Using LabTalk.


Averaging Multiple Curves

To calculate the average Y value for all data plots in the active layer at each X coordinate of the active data plot:

  1. Select Analysis:Average Multiple Curves.

  • The result is saved as a new data set (in a new Averagen hidden worksheet) and plotted in the active layer (To show a hidden window, see Hiding a Window).

  • The new data set is named Averagen_Mean NCuv where n is the average curve number in the project (starting from 1) and N is the number of data plots used to calculate the average.

If necessary, Origin will interpolate or extrapolate data plots when calculating the average Y value.


Data Exploration Tools

Origin offers a number of tools to select a region of a data plot, view coordinate values, and enhance the data plot display. These tools are available from the Tools toolbar (View:Toolbars).

The Data Display Tool

The Data Selector Tool

The Data Reader Tool

The Screen Reader Tool

The Enlarger Tool and Undo Enlarge

Zoom In and Zoom Out

Region of Interest (Image Data)


The Data Display Tool

Shortcut Menu Commands Made Available by Right-Clicking on the Tool’s Title Bar

Move: Activates the tool so that it can be moved using the arrow keyboard keys.

Hide: Hides the tool for the current data exploration routine.

Shortcut Menu Commands Made Available by Right-Clicking inside the Tool

Note: To open the Data Display Format dialog box, right-click inside the Data Display Tool and select Properties.

Fixed Size: This shortcut menu command is only available when the Automatically Fit to Display check box in the Data Display Format dialog box is cleared.

Fixes the size of the text in the tool to the current size when this menu command is selected. Resizing the tool horizontally or vertically has no affect on the text size.

Fit Horizontally: This shortcut menu command is only available when the Automatically Fit to Display check box in the Data Display Format dialog box is cleared.

Displays the text in the tool so that it always displays in the full width of the tool. Resizing the tool horizontally causes the text size to change accordingly. Resizing the tool vertically has no affect on the text display.

Fit Vertically: This shortcut menu command is only available when the Automatically Fit to Display check box in the Data Display Format dialog box is cleared.

Displays the text in the tool so that it always displays in the full height of the tool. Resizing the tool vertically causes the text size to change accordingly. Resizing the tool horizontally has no affect on the text display.

Docking View: Automatically docks the tool to the toolbar region (if the shortcut menu command was not already selected). If the docked tool is then dragged to a floating tool, double-click on the tool to restore its docked position. Alternatively, drag the tool to the edge of the workspace.

Properties: Opens the Data Display Format dialog box.

To customize the tool's coordinate display including the font, font color, and tool background color, right-click on the tool and select Properties from the shortcut menu. This shortcut menu command opens the Data Display Format dialog box.

The Data Display Format Dialog Box

The Font Drop-down List

Select the tool’s text font display from this drop-down list.

The Font Color Drop-down List

Select the tool’s text color display from this drop-down list.

The Background Color Drop-down List

Select the tool’s background color display from this drop-down list.

The Automatically Fit to Display Check Box

Select this check box to ensure that all the text within the tool displays when the tool is resized. The text font size changes to accommodate changes in tool size.

When this check box is cleared, the Fixed Size, Fit Horizontally, and Fit Vertically shortcut menu commands are available. Select the desired command to control the text display in the tool.

The Data Display Tool

The Data Display tool provides a dynamic display of the XY coordinates of a data point or a the location of the cursor on the screen. The Data Display tool opens when selecting these Tools toolbar tools:

The Screen Reader Tool

The Data Reader Tool

The Data Selector Tool

The Draw Data Tool

Additionally, the tool opens when moving or deleting data points, or when translating your data.

To enlarge or reduce the tool's display, drag a corner of the window. As a floating tool, position it anywhere in Origin's workspace.

To dock the Data Display tool, right-click on the tool and select (check) Docking View from the shortcut menu. The tool automatically docks to the toolbar region. If the Docking View shortcut menu command was already checked, double-click on the tool to dock it to the toolbar region. Alternatively, drag the tool to the edge of the workspace. The docked tool remains available throughout your Origin session, as well as for future Origin sessions.

Click here to view a multi-media demonstration

The Shortcut Menus Available from the Data Display Tool

Customizing the Display of the Data Display Tool


The Data Selector Tool

To select a range of a data plot for analysis, click the Data Selector tool [image] on the Tools toolbar. Data markers display at both ends of the active data plot. Additionally, the Data Display tool opens if it is not already open.

To mark the data segment of interest:

  1. Click and drag the markers with the mouse. You can also use the left and right arrow keys to select a marker. The CTRL + left or right arrow keys move the selected marker to the next data point. Holding both the SHIFT and CTRL keys while depressing the left or right arrow keys moves the data markers in increments of five along the data plot.

Note: If your X data are not sorted, you may need to sort the data before selecting a range. To do this, activate the worksheet and select Analysis:Sort Worksheet:Ascending.)

As with the Data Reader tool, press the spacebar to increase the cross hair size.

After you have defined the range of interest, press ESC or click the Pointer button [image] on the Tools toolbar to set the data markers and define your segment of interest. Any analysis operations you perform on this data plot will apply to the selected region only (see example).

To hide data outside the selected range, select Data:Set Display Range.

To remove the selection range, select Data:Reset to Full Range.

Click here to view a multi-media demonstration


When you click on a data plot using the Data Reader tool, Origin begins searching for the nearest point by one of two methods based on the number of points in the data plot and the Bisection Search Points combination box value on the Miscellaneous tab of the Options dialog box (Tools:Options).

  • When the number of points is less than the bisection search value, then sequential search is used.

  • When the number of points is greater than the bisection search value, then bisection search is used.

Bisection search is designed to find the nearest point rapidly, but it only works if the X data set is sorted. The middle point of the data set is tested first to determine which half contains the nearest point. This half becomes the new search set. If the X data set is not sorted, then this search scheme fails and you get a 'beep error'. (Actually a few points will be found this way purely by chance.)

If a search fails because bisection searching is being used on an unsorted (in X) data set, then you can either:

  • Sort the source worksheet on the X column.

  • Set the Bisection Search Points combination box to a value larger than the number of data points to 'turn off' bisection search.

The Data Reader Tool

To read the X, Y, and Z (for 3D and contour) values for a data point, click the Data Reader button [image] on the Tools toolbar. This action opens the Data Display tool if it is not already open. Click on the desired data point to read its X,Y, and Z coordinates in the Data Display tool (see figure).

To move the cross-hair to the next data point along the data plot, use the left and right arrow keys or click on the data point.

To change the vertical and horizontal cross hair size after clicking on a point, press the spacebar. Continue pressing the spacebar to further increase the size of the cross hairs (see example).

Press ESC or click the Pointer button [image] on the Tools toolbar when you are finished with the Data Reader.

Click here to view a multi-media demonstration

A Note on Improving the Data Point Search Behavior of the Data Display Tool

Note: When you use the Data Reader tool to view the XY coordinates of a data point in a graph, Origin displays the actual X and Y data values for the data point, not the displayed worksheet values.


The Screen Reader Tool

To read the X, Y, and Z (for 3D and contour) values for any point on the screen, click the Screen Reader button [image] on the Tools toolbar. This action opens the Data Display tool if it is not already open. Click on the desired screen location to read its X,Y, and Z coordinates in the Data Display tool.

As with the Data Reader tool, you can press the spacebar to increase the cross hair size.

Press ESC or click the Pointer button [image] on the Tools toolbar when you are finished with the Screen Reader tool.


The Enlarger Tool and Undo Enlarge

  2. To view the magnified data in the current window, drag out an area of interest in the graph.

  3. To re-display the entire data plot, click the Undo Enlarge button [image].

To view the magnified data in a new window:

  2. Hold down the CTRL key while dragging out the area of interest in the graph window.

  3. Release the mouse button, then release the CTRL key.

Origin opens a new graph window named Enlarged. A rectangle object with sizing handles appears in the original graph window (if the sizing handles are not displayed, click on the object to select it).

  4. To change the data segment that displays in the Enlarged window, resize the rectangular object or drag the object in the original graph window. The Enlarged window updates accordingly.

After you finish analyzing the data, you can click on the rectangle object and delete it.

  1. Highlight the desired worksheet column(s) and click the Zoom button [image] on the 2D Graphs Extended toolbar.

A graph window with two layers opens. The top layer displays the entire data range and the bottom layer provides a zoomed-in view of your data plot.

To change the data segment in the bottom layer, resize the rectangular object or change its position by dragging the object in the top layer.

After you finish analyzing the data, you can click on the rectangle object and delete it.

The Enlarger Tool and Undo Enlarge

When a data plot is magnified using the Enlarger tool, the axes are rescaled to show an expanded view of the data.

To magnify a portion of a data plot:

  1. Click the Enlarger tool [image] on the Tools toolbar.

The expanded view can be displayed in either:

  • The current window

  • A new window

To view a magnified region of data in the same graph window (along with the full range of data):

Click here to view a multi-media demonstration


Region of Interest (Image Data)

When you import image data in a matrix, you can select a region of the image using the Rectangle Tool [image] on the Tools toolbar. When a matrix with an image is active, the Rectangle tool displays in the "region of interest mode" by default. This setting is controlled from the Tools:Region of Interest Tools menu command.

To select a region of the image:

  1. Select the Rectangle Tool, then drag out your region of interest.

  2. Right-click inside the selected region and choose Crop, Copy, or Create New from the shortcut menu.


Analysis: Curve Fitting

Origin provides various interfaces for performing linear and nonlinear curve fitting, depending upon your needs for control and complexity: They are, in order of increasing complexity:

  • Linear Fitting from the Menu

  • Nonlinear Curve Fitting from the Menu

  • The NLSF Fitting Wizard

  • The Advanced Fitting Tool

Click here to view a multi-media demonstration on Linear Regression

Click here to view a multi-media demonstration on Nonlinear Regression


Before You Begin

  1. Select the data plot from the data list at the bottom of the Data menu.

The data list includes all the data plots in the active layer. Note that the active data plot has a check-mark next to it.

  1. Click the Data Selector tool [image] on the Tools toolbar.

Data markers display at both ends of the active data plot. Additionally, the Data Display tool opens if it is not already open.

To mark the data segment of interest:

  1. Hold down the left mouse button and drag the data markers with the mouse.

Note that you can also use the left and right arrow keys to select a marker.

  • The CTRL + left or right arrow key moves the selected marker to the next data point.

  • Holding both the SHIFT and CTRL keys while depressing the left or right arrow keys moves the data markers in increments of five along the data plot.

Note: If your X data is not sorted, you may need to sort the data before selecting a range. To do this, activate the worksheet and select Analysis:Sort Worksheet:Ascending.

As with the Data Reader tool, you can press the spacebar to increase the cross hair size.

When you have defined your range of interest, press ESC or click the Pointer button [image] on the Tools toolbar.

Any fitting operations you perform on this data plot will apply to the selected region only.

To hide the data outside this range, select Data:Set Display Range.

To remove the selection range, select Data:Reset to Full Range.

Before You Begin

Before performing a linear or nonlinear fit, you must first activate the data plot which you intend to analyze. To make a data plot active:

Note that you are not restricted to performing your fit on an entire data set; you can specify a range of data from the data set. To select a range of a data plot for fitting:

The Results Log

Origin automatically types results from most fitting operations to the Results Log. For more information, see The Results Log.


Linear Fitting From the Menu

Origin’s linear and polynomial fit menu commands are located in the Analysis menu. Parameter initialization and linear least squares fitting is carried out automatically when fitting from the menu. A worksheet is created for the fit data, and a fit curve is displayed in the graph window. The fitting parameters and statistical results are recorded in the Results Log.

Linear Regression

Polynomial Regression

Click here to view a multi-media demonstration


Linear Regression

Click here to view a multi-media demonstration

To fit a straight line to the active data plot:

  1. Select Analysis:Fit Linear. With the X data, the independent variable, and the Y data, the dependent variable, the estimated linear regression model is stated as

where the parameters, A and B, are estimated by the method of least squares.

A is the intercept:

B is the slope:

After the fitting, Origin creates a new (hidden) worksheet containing the fitted data, and plots this data in the active graph window. Additionally, Origin copies the following parameters to the Results Log.

Parameter | Description
A | Intercept value and its standard error.
B | Slope value and its standard error.
R | Correlation coefficient.
p-value | Probability (that R is zero).
N | Number of data points.
SD | Standard deviation of the fit.

The standard deviation is defined as

where [image] are the data points.


Polynomial Regression

To perform a polynomial fit on the active data plot:

  1. Select Analysis:Fit Polynomial.

This menu command opens the Polynomial Fit to Dataset dialog box.

  2. Specify polynomial Order (1 through 9), number of points drawn in the fit curve (Fit curve # points) , and minimum (Fit curve Xmin)and maximum (Fit curve Xmax) X values for the fit curve.

  3. To display the fit equation in the graph window, select the Show Formula on Graph check box.

With the X data, the independent variable, and the Y data, the dependent variable, a polynomial regression model of the [image] order is stated:

After the fitting, Origin creates a new (hidden) worksheet containing the fitted data, and plots this data in the active graph window. Additionally, Origin copies the following parameters to the Results Log.

Parameter | Description
, etc. | The parameter estimates and standard errors.
R-square | R-square = (SYY-RSS)/SYY.
p-value | Probability (that R-square is zero).
N | Number of data points.
SD | Standard deviation of the fit.


Linear Fitting Using the Tools

Origin provides two tools to perform linear and polynomial fitting. These tools provide controls not available from the associated menu commands.

The Linear Fit Tool

The Polynomial Fit Tool


The Linear Fit Tool

The Fit Curve Options Group

The Statistics Output Group

Notes on Confidence Intervals

Points. Type the number of points to be used in the fit curve data set.

Range Margin. Type the percent outside of the data plot's X value range to create the fit curve (left and right).

Confidence. Type the confidence level for calculating confidence and prediction limits.

Apparent Fit. Select the Apparent Fit check box to use the apparent values for fitting, according to the current axis scales. Select this box to fit exponentially decaying data with a straight line fit when data are plotted on a log scale. When this check box is selected and the data has error values associated with it, Origin uses the larger of the positive/negative errors as weight.

Note: To learn more about the apparent fit option, review the APPARENT FIT.OPJ project located in your Origin \SAMPLES\ANALYSIS\CURVE FITTING folder.

Span X Axis. Select the Span X Axis check box to calculate a fit curve that spans the entire X axis. The graph is redrawn after fitting to display the entire fit curve over this range.

Residual Data. Select the Residual Data check box to create two columns in the associated data set worksheet. Column Fit(Y) contains the fitting values. Column Residual(Y) contains the residual values.

Fit All Curves. Select the Fit All Curves check box to fit all the data plots in the layer.

Simple. Select the Simple radio button to output simple fitting statistics to the Results Log, including intercept and slope values and standard errors, R (Correlation Coefficient), Standard Deviation, number of points in the raw data curve, and P (the P value for the t-test of the slope = 0).

Advanced. Select the Advanced radio button to output all fitting statistics to the Results Log, including the t-test values and the ANOVA table.

The Linear Fit tool reports confidence intervals on the fit parameters when the Advanced radio button is selected. The confidence intervals can be checked to determine if their slope is significantly different from unity. If the confidence interval contains the number 1, then the conclusion would be that the slope is not significantly different from unity.

The formula for calculating the confidence intervals on the fit parameters is:

(fit parameter value) +/- (standard error on parameter value) * t-table(significance level, degrees of freedom)

The significance level is given by (1- (1-alpha)/2), where alpha is the confidence level. For example, if you set the confidence level in the Linear Fit tool to 95, then the significance level will be (1-(1-0.95)/2) = 0.975. The t-table should then be calculated as t-table(0.975,DOF).

Select this tab to access the Operation options.

The Fit Options Group

The Calculate (Find X/Find Y) Group

Through Zero. Select the Through Zero check box to perform a linear regression through the origin when the Fit button is clicked on. When cleared, a standard linear regression is performed.

Fix Slope. Select the Fix Slope check box to restrict the slope to the value specified in the Fixed Slope text box on the Settings tab. When cleared, a standard linear regression is performed. Type the fixed slope for the fit curve in the associated text box.

Error as Weight. Select the Error as Weight check box to use error bars as weights (1/error^2). If the worksheet is active, a Y error bar column (select Column:Set as Y Error) must be selected in addition to the Y column when the Fit button is clicked. If the graph window is active, the error bars must be plotted.

Use Reduced Chi^2. When the Error as Weight check box is selected, the Use Reduced Chi^2 check box becomes available. The Use Reduced Chi^2 check box only affects the error on the parameters reported from the fitting process, and does not affect the fitting process or the data in any way.

When the Use Reduced Chi^2 check box is cleared, the error on the fit parameters is calculated as SQRT(covii). This is the default, and recommended setting for this check box.

When the Use Reduced Chi^2 check box is selected, the error on the fit parameters are multiplied by the square root of the reduced chi-squared. In this case, the error on the fit parameters is calculated as SQRT(covii*(ChiSqr/DOF)).

Confidence Bands. Select the Confidence Bands check box to plot upper and lower confidence band data sets with the fitting curve. The confidence band is calculated as

where

is the unbiased estimator of the expected value of [image] at [image]. The band will flare out the further it gets from the mean.

Prediction Bands. Select the Prediction Bands check box to plot upper and lower prediction band data plots with the fitting curve. The prediction band is calculated as

where

is the unbiased estimator of the expected value of [image] at [image]. This band is wider than the confidence band due to [image].

Fit. Click Fit to perform a linear regression on the selected data plot according to the tool settings. If a worksheet is active, the highlighted Y column is used as the dependent variable. The associated X column is used as the independent variable. If a graph window is active, the regression is performed on the active data plot. After the fitting, Origin creates a new (hidden) worksheet containing the fitted data, and plots this data in the active graph window. If the data set has not yet been plotted, a new default graph window opens with the selected Y data set (and its associated X data set, row number, or incremental X value) and fitting data plotted in layer 1. Additionally, Origin displays the fitting results in the Results Log.

When the Simple radio button is selected , the following results are reported:

: Intercept value and its standard error.

: Slope value and its standard error.

R: Correlation coefficient.

p-value: Probability (that R is zero).

N: Number of data points.

SD: Standard deviation of the fit.

Additional results are provided when the Advanced radio button is selected. These include the t-values for testing if the parameter equals zero, where t = the parameter estimate/standard error of the estimate, and their corresponding p-values. Additionally, the results include R-square= (SYY-RSS)/SYY, adjusted R-square= 1-[(1-R-square)*(N-1)/(N-2)], and the ANOVA table.

Find X/Find Y. The Find X and Find Y buttons allow you to obtain a Y value given an X value, or obtain an X value given a Y value, respectively, from the fit you perform to the data. These buttons become active only after you perform a fit to the active data set.

Once the fit has been performed and the buttons are active, you can enter a numerical value in the top text box next to the Find X button, and then press the Find Y button to obtain the corresponding X value. The exact fit equation that resulted from the fitting process is used to compute the Y value for the given X value. You can specify any X value inside or outside of the range of the data set or the fit line for computing the Y value.

To find an X value for a given Y value, you should enter the Y value in the bottom text box next to the Find Y button and then press Find X. When this action is performed, the X value is determined in the following way:

The fit equation Y = A + B * X is inverted to give X = (Y - A) / B and this inverted equation is used to compute the exact X value for the given Y value. You can specify any Y value inside or outside of the range covered by the data set or the fit line to compute the corresponding X value.

The Linear Fit Tool

If a worksheet is the active window, you must select a Y column to perform linear regression. The Y column is used as the dependent variable and the associated X column is used as the independent variable. For weighted fitting, the error bar column must be selected along with the Y column. Note that the data columns must be either of Format = Numeric or Text & Numeric.

If the graph window is active, the regression is performed on the active data plot. To set the active data plot, select it from the data list at the bottom of the Data menu. For weighted fitting, the error bars must be plotted.

To open the Linear Fit tool:

  1. Select Tools:Linear Fit.

Linear Fit Tool Controls

The Settings Tab

The Operation Tab

Click here to view a multi-media demonstration

Note: To learn more about linear fitting with the Linear Fit tool, review the LINEAR FIT.OPJ project located in your Origin \SAMPLES\ANALYSIS\CURVE FITTING folder.


The Polynomial Fit Tool

The Fit Curve Options Group

The Statistics Output Group

Notes on Confidence Intervals

Points. Type the number of points to be used in the fit curve data set in the Points text box.

Range Margin. Type the percent outside of the data plot's X value range to create the fit curve (left and right) in the Range Margin text box.

Confidence. Type the confidence level for calculating confidence and prediction limits in the Confidence text box.

Apparent Fit. Select the Apparent Fit check box to use the apparent values for fitting, according to the current axis scales. Select this box to fit exponentially decaying data with a straight line fit when data are plotted on a log scale. When this check box is selected and the data has error values associated with it, Origin uses the larger of the positive/negative errors as weight.

Span X Axis. Select the Span X Axis check box to calculate a fit curve that spans the entire X axis. The graph is redrawn after fitting to display the entire fit curve over this range.

Residual Data. Select the Residual Data check box to create two columns in the associated data set worksheet. Column Fit(Y) contains the fitting values. Column Residual(Y) contains the residual values.

Fit All Curves. Select the Fit All Curves check box to fit all the data plots in the layer.

Simple. Select the Simple radio button to output simple fitting statistics to the Results Log, including the intercept and [image], etc. values and errors, R-Square (Coefficient of Determination), Standard Deviation, number of points in the raw data curve, and P (the P value for R-square = 0).

Advanced. Select the Advanced radio button to output all fitting statistics to the Results Log, including the t values and the ANOVA table.

The Polynomial Fit tool reports confidence intervals on the fit parameters when the Advanced radio button is selected. The confidence intervals can be checked to determine if their slope is significantly different from unity. If the confidence interval contains the number 1, then the conclusion would be that the slope is not significantly different from unity.

The formula for calculating the confidence intervals on the fit parameters is:

(fit parameter value) +/- (standard error on parameter value) * t-table(significance level, degrees of freedom)

The significance level is given by (1- (1-alpha)/2), where alpha is the confidence level. For example, if you set the confidence level to 95, then the significance level will be (1-(1-0.95)/2) = 0.975. The t-table should then be calculated as t-table(0.975,DOF).

The Fit Options Group

The Calculate (Find X/Find Y) Group

Error as Weight. Select the Error as Weight check box to use error bars as weights (1/error^2). If the worksheet is active, a Y error bar column (select Column:Set as Y Error) must be selected in addition to the Y column when the Fit button is clicked. If the graph window is active, the error bars must be plotted.

Use Reduced Chi^2. When the Error as Weight check box is selected, the Use Reduced Chi^2 check box becomes available. The Use Reduced Chi^2 check box only affects the error on the parameters reported from the fitting process, and does not affect the fitting process or the data in any way.

When the Use Reduced Chi^2 check box is cleared, the error on the fit parameters is calculated as SQRT(covii). This is the default, and recommended setting for this check box.

When the Use Reduced Chi^2 check box is selected, the error on the fit parameters are multiplied by the square root of the reduced chi-squared. In this case, the error on the fit parameters is calculated as SQRT(covii*(ChiSqr/DOF)).

Confidence Bands. For the polynomial fit, the confidence band is calculated as

where

.

is the unbiased estimator of the expected value of [image] at [image].

Prediction Bands. The prediction band is calculated as

where

.

is the unbiased estimator of the expected value of [image] at [image].

Set the order for the regression, ranging from one to nine, using the Order spin buttons.

Fit. Click Fit to perform a polynomial regression on the selected data plot according to the tool settings. If a worksheet is active, the highlighted Y column is used as the dependent variable. The associated X column is used as the independent variable. If a graph window is active, the regression is performed on the active data plot. After the fitting, Origin creates a new (hidden) worksheet containing the fitted data, and plots this data in the active graph window. If the data set has not yet been plotted, a new default graph window opens with the selected Y data set (and its associated X data set, row number, or incremental X value) and fitting data plotted in layer 1. Additionally, Origin displays the fitting results in the Results Log.

When the Simple radio button is selected, the fitting results are:

, etc.: The parameter estimates and standard errors.

R-square: R-square = (SYY-RSS)/SYY.

p-value: Probability (that R-square is zero).

N: Number of data points.

SD: Standard deviation of the fit.

Additional results are provided when the Advanced radio button is selected. These include the t-values for testing if the parameter equals zero, where t= the parameter estimate/standard error of the estimate, and their corresponding p-values. Additionally, the results include R-square= (SYY-RSS)/SYY, adjusted R-square= 1-[(1-R-square)*(N-1)/(N-k-1)], and the ANOVA table.

Find X/ Find Y. The Find X and Find Y buttons allow you to obtain a Y value given an X value, or obtain an X value given a Y value, respectively, from the fit you perform to the data. These buttons become active only after you perform a fit to the active data set.

Once the fit has been performed and the buttons are active, you can enter a numerical value in the top text box next to the Find X button, and then press the Find Y button to obtain the corresponding X value. The exact fit equation that resulted from the fitting process is used to compute the Y value for the given X value. You can specify any X value inside or outside of the range of the data set or the fit line for computing the Y value.

To find an X value for a given Y value, you should enter the Y value in the bottom text box next to the Find Y button and then press Find X. When this action is performed, an iterative procedure is used to find the X value corresponding to the given Y value:

  1. First a check is performed to see if the Y value you specified is inside the range of Y values described by the fit line. If not, no computation is done and you are informed that your Y value is out of range.

If the Y value passes this check, then the following steps are performed:

  2. The fit line data set is scanned to find two points (X1,Y1) and (X2, Y2) such that the user-specified Y value lies in the interval [Y1, Y2]. In the case of a fit line that is not monotonic (.ie. multiple X value exist for same Y value), the first interval that satisfies this criterion, starting from the lower end of the X axis, is selected.

  3. The X value of the mid point of this interval is computed: Xm = (X1 + X2) / 2, and the corresponding y-value, Ym, is computed using the exact fit equation

  4. The interval to the right or left of this midpoint is chosen such that the user-specified Y value now falls within the new interval.

  5. This bisectional search is continued till the y-value of the mid point of the interval, Ym, differs from the user-specified Y-value by less than 0.00001%, or until 200 iterations are performed, whichever comes first.

  6. The Xm value corresponding to the final Ym value is reported as the X value corresponding to the y-value you specified.

The Polynomial Fit Tool

If a worksheet is the active window, you must select a Y column to carry out polynomial regression. The Y column is used as the dependent variable and the associated X column is used as the independent variable. For weighted fitting, the Y error bar column must be selected along with the Y column for fitting. Note that the data columns must be either of Format = Numeric or Text & Numeric.

If the active window is a graph window, the regression is performed on the active data plot. To set the active data plot, select it from the data list at the bottom of the Data menu. For weighted fitting, the error bars must be plotted.

To open the Polynomial Fit tool:

  1. From the menu, select Tools:Polynomial Fit.

The Settings Tab

The Operation Tab


The Fit Comparison Tool

A Fit Comparison tool is available by selecting Tools:Fit Comparison. This tool compares two data sets by fitting the same function to the data. It then uses an F-test to determine whether the two data sets are significantly different from each other. Thus, the tool determines if the two data sets are representative samples from the same population or not. The results are output to the Results Log.

The Fit Comparison tool uses the following procedure to perform the comparison:

  1. Origin fits the two data sets individually using the selected function. Origin then combines the two data sets (appending one to the other), and then performs a fit on the combined data set with the same function. From these three fits, Origin obtains values for the SSR (sum of squares of the difference between the data and fit values) and the DOF (number of degrees of freedom). Thus, the following values are obtained: SSR1, DOF1, SSR2, DOF2 from the individual fits, and SSRcombined and DOFcombined from the fit to the combined data.

  2. Origin then computes the following:

SSRseparate = SSR1 + SSR2

DOFseparate = DOF1 + DOF2

  3. Origin then computes an F value using the formula:

  4. Once the F value is computed, Origin calculates a p-value using the formula:

This p-value is then used to make a statistical statement as to whether the data (not the parameter values) are significantly different or not. If the p-value is greater than 0.05, we can say that the data sets are not significantly different at the 95% confidence level.


A Note on Linear Fitting Theory

Theory of Linear Regression

Theory of Polynomial Regression

Theory of Multiple Regression


Theory of Linear Regression

For a given dataset (xi , yi ), i = 1,2,...N, we assign X as the independent variable and Y as the dependent variable. Assume the residuals [image] have normal (Gaussian) distributions with the mean = 0 and the variance = [image] . The maximum likelihood estimates for the parameters a and b can be obtained by minimizing the chi-square

This is essentially a weighted sum of squares with weights

Using the Linear Fit tool, you can set [image] , where [image] is the error bar for [image] (The Error as Weight check box). If you do not make this choice, Origin will carry out a fitting with equal weights, assuming all the [image] are equal. This can be done by setting [image] .

Define the following variables:

, [image], [image],

,

, [image],

where the mean for X and Y are given by

, [image] ,

and

.

The correlation coefficient is

.

Fitting to a Straight Line with Intercept: Y=a+bX

Fitting to a Straight Line Through the Origin: Y=bX


Fitting to a Straight Line with Intercept: Y=a+bX

  1. The estimated parameters are:

Standard errors are:

The estimated standard deviation of the fitting, with df = n - 2 is:

The residual sum of squares is:

.

  2. The [image] confidence interval (confidence band) for the mean of Y is given by:

.

  3. The coefficient of determination is:

COD is also called R-squared since COD = r2. The adjusted R-squared is:

.

  4. The ANOVA for the fitting is summarized in the following table:

 | Degrees of Freedom | Sum of Squares (SS) | Mean Squares (MS) | F
Regression | 1 | SSreg=SYY-RSS | MSreg=SSreg/1 | MSreg/MSE
Residual | n-2 | RSS | MSE=RSS/(n-2) |
Total | n-1 | SYY |  |

The variable F=MSreg/MSE follows an F distribution F(1,n-2). The P-value can be obtained from the F distribution.


Fitting to a Straight Line Through the Origin: Y=bX

1) The estimated parameter is

with standard error

is the estimated standard deviation of the fitting, df = n - 1, and the residual sum of squares is

2) The [image] confidence interval (confidence band) for the mean of Y is given by:

3) The ANOVA for the fitting is summarized in the following table:

 | Degrees of Freedom | Sum of Squares (SS) | Mean Squares (MS) | F
Regression | 1 | SSreg=SYY-RSS | MSreg=SSreg/1 | MSreg/MSE
Residual | n-1 | RSS | MSE=RSS/(n-1) |
Total | n | SYY |  |

The variable F=MSreg/MSE will follow an F distribution F(1,n-1). The P-value can be obtained from the F distribution.


Theory of Polynomial Regression

To fit a polynomial of order k ( [image] ) to the data, assume the residuals [image] have normal (Gaussian) distributions with the mean = 0 and the variance = [image] .

Then the maximum likelihood estimates for the parameters b[i] can be obtained by minimizing the chi-square

Origin uses equal weight fitting by setting [image] .

1) The estimated parameters can be expressed in matrix form: , where

The residual sum of squares is

The estimated standard deviation of the fitting is

and df = n - (k + 1).

2) The ANOVA for the fitting is summarized in the following table:

 | Degree of Freedom | Sum of Squares (SS) | Mean Squares (MS) | F
Regression | k | SSreg=SYY-RSS | MSreg=SSreg/k | MSreg/MSE
Residual | n-(k+1) | RSS | MSE=RSS/(n-k-1) |
Total | n-1 | SYY |  |

The variable F=MSreg/MSE will follow an F distribution F(k,df). The P-value can be obtained from the F distribution.


Theory of Multiple Regression

For given columns of data [image] , i = 1,2,...N, we assign the Y column to be the dependent variable, and all other X columns to be the independent variables. We fit the model: , assuming the residuals [image] have normal (Gaussian) distributions with the mean = 0 and the variance = [image] . Then the maximum likelihood estimation for the parameters b[i] can be obtained by minimizing the chi-square

1) The estimated parameters can be expressed in matrix form:

The residual sum of squares is

2) the estimated standard deviation of the fitting is

and df = n - (k + 1).

3) The ANOVA for the fitting is summarized in the following table:

 | Degree of Freedom | Sum of Squares (SS) | Mean Squares (MS) | F
Regression | k | SSreg=SYY-RSS | MSreg=SSreg/k | MSreg/MSE
Residual | n-(k+1) | RSS | MSE=RSS/(n-k-1) |
Total | n-1 | SYY |  |

The variable F=MSreg/MSE will follow an F distribution F(k,df). The P-value can be obtained from the F distribution.


Nonlinear Curve Fitting from the Menu

The Analysis menu includes commands which use nonlinear least squares fitting to generate a fit curve in the graph window. The fitting parameters, as well as related statistics, are displayed in the Results Log.

First Order Exponential Decay

Second Order Exponential Decay

Third Order Exponential Decay

Exponential Growth

Gaussian

Lorentzian


First Order Exponential Decay

Select Analysis:Fit Exponential Decay:First Order to fit a curve to the active data plot, using the equation:

where

y0 = Y offset

A1 = amplitude

t1 = decay constant

When you select this menu command, Origin makes the necessary initialization for the parameters. Origin also sets [image] to an appropriate fixed number which is close to the asymptotic value of the Y variable for large X values.

Note: When fitting from the menu, all the parameters by default vary during the iterative procedure. If you want to fix certain parameters to particular values, you must open the curve fitter’s dialog box.


Second Order Exponential Decay

Select Analysis:Fit Exponential Decay:Second Order to fit a curve to the active data plot, using the equation:

This menu command opens the Verify Initial Guesses dialog box in which you specify initial values for the fitting parameters.

Fitting to multiple exponentials is more difficult than fitting to a single exponential. You must make good guesses for the fitting parameters. You may need to enter the nonlinear fitting session to get better control for the fitting.

Note: To learn more about second order exponential decay fitting, review the EXP DECAY.OPJ project located in your Origin \SAMPLES\ANALYSIS\CURVE FITTING folder.


Third Order Exponential Decay

Select Analysis:Fit Exponential Decay:Third Order to fit a curve to the active data plot, using the equation:

This menu command opens the Verify Initial Guesses dialog box in which you specify initial values for the fitting parameters.


Exponential Growth

Select Analysis:Fit Exponential Growth to fit a curve to the active data plot, using the equation:

where

= Y offset

A1 = amplitude

t1 = “time” constant


Gaussian

Select Analysis:Fit Gaussian to fit a curve to the active data plot, using the equation:

where

y0 = baseline offset

A = total area under the curve from the baseline

= center of the peak

w = 2 “sigma”, approximately 0.849 the width of the peak at half height

This model describes a bell-shaped curve like the normal (Gaussian) probability distribution function. The center [image] represents the “mean”, while [image] is the standard deviation.


Lorentzian

Select Analysis:Fit Lorentzian to fit a curve to the active data plot, using the equation:

where

y0 = baseline offset

A = total area under the curve from the baseline

= center of the peak

w = full width of the peak at half height

The parameters in the Lorentzian model are similar to the parameters defined for the Gaussian model.


Sigmoidal

Select Analysis:Fit Sigmoidal to fit a curve to the active data plot using either the Boltzmann or Logistical equation.

Boltzmann Equation

Logistical Equation

Using the Sigmoidal Fit Tool


Boltzmann Equation

When the X axis is set to linear scale, the Analysis:Fit Sigmoidal menu command uses the Boltzmann equation for fitting:

where

= center

dx = width

= initial Y value:

= final Y value:

The Y value at [image] is half way between the two limiting values [image] and [image]: . The Y value changes drastically within a range of the X variable. The width of this range is approximately dx.


Logistical Equation

When the X axis is set to a logarithmic scale, the Analysis:Fit Sigmoidal menu command uses the Logistical equation for fitting:

where

= center

p = power

= initial Y value

= final Y value

The Y value at [image] is half way between the two limiting values [image] and [image]: .


The Sigmoidal Fit Tool

Select this tab to access the Settings options.

The Fit Curve Options Group

The Logged Data Fit Function Group

The Weighting Group

Points. Specify the number of points to create for the fit curve.

Left Margin/Right Margin. The proportion outside of the X value range, as a percentage, to draw the fit curve (left and right).

Fit Iterations. The number of iterations of the fitting to perform in the associated text boxes.

Fit All Curves. Select the Fit All Curves check box to fit all the data plots in a layer.

The Use Reduced Chi^2 check box only affects the error on the parameters reported from the fitting process, and does not affect the fitting process or the data in any way.

Select the Reduced Chi^2 check box when there are no associated error bars with the data (which is the default - and only - option). In this case, the error on the fit parameters is calculated as SQRT(covii*(ChiSqr/DOF)).

Clear the Reduced Chi^2 check box when the data has associated error bars and a weighting method is other than None. This is the default, and recommended setting for this check box. The error on the fit parameter is then calculated as SQRT(covii).

When the data has associated error bars and you have chosen a weighting method (other than None), you have the option to select the check box, thereby multiplying the reported error on the fit parameters by the square root of the reduced chi-squared. In this case, the error on the fit parameters is calculated as SQRT(covii(ChiSqr/DOF)).

Select either the Boltzmann or Dose Response (logistic) function to fit logged data (for example, 10^7 plotted as 7).

Note: If the X axis scale is set to Log10, the Dose Response (logistic) function is always used, independent of your radio button selection.

None. No weighting.

Error Bars. If you select the Error Bars radio button, you must have selected a Y error bar column with your Y column in a worksheet, or plotted your data with error bars in a graph. In this case, Origin uses 1/errbar^2 as the weighting.

Inverse Y. For inverse Y weighting, Origin uses 1/Y where Y is the data that is being fitted to.

Select this tab to access the Operation options.

The Asymptotes Group and Associated Fix Check Boxes

The Parameters Group and Associated Fix Check Boxes

The Fit Button

The Simulate Button

The Calculate (Find X/Find Y) Group

Upper/Lower. Specify the parameters A1 and A2 in the Upper and Lower text boxes to be used as the initial values for fitting.

Fix. Select the associated Fix check boxes to lock in the entered value as a constant rather than allowing it to vary during fitting.

Center/Rate. Specify the initial value for the parameter x0 in the Center text box. Specify the initial value for the parameter dx or p in the Rate text box.

Fix. Select the associated Fix check boxes to lock in the entered value as a constant.

Click Fit to execute the fitting routine and update the variables that have not been set to fixed.

If you have specified the values for the parameters and a graph window is active, click Simulate to create a function that can be used like any other function. This can also help you to better determine the initial parameter values for the fit. You can double-click on the function curve or select the function in the data list at the bottom of the Data menu (select the function from the data list twice, as the first action simply makes the function the active data set). Both actions open the Function tab of the Plot Details dialog box.

The Find X and Find Y buttons allow you to obtain a Y value given an X value, or obtain an X value given a Y value, respectively, from the fit you perform to the data. These buttons become active only after you perform a fit to the active data set.

Once the fit has been performed and the buttons are active, you can enter a numerical value in the top text box next to the Find X button, and then press the Find Y button to obtain the corresponding X value. The exact fit equation that resulted from the fitting process is used to compute the Y value for the given X value. You can specify any X value inside or outside of the range of the data set or the fit line for computing the Y value.

To find an X value for a given Y value, you should enter the Y value in the bottom text box next to the Find Y button and then press Find X. When this action is performed, an iterative procedure is used to find the X value corresponding to the given Y value:

  1. First a check is performed to see if the Y value you specified is inside the range of Y values described by the fit line. If not, no computation is done and you are informed that your Y value is out of range.

If the Y value passes this check, then the following steps are performed:

  2. The fit line data set is scanned to find two points (X1,Y1) and (X2, Y2) such that the user-specified Y value lies in the interval [Y1, Y2]. In the case of a fit line that is not monotonic (.ie. multiple X value exist for same Y value), the first interval that satisfies this criterion, starting from the lower end of the X axis, is selected.

  3. The X value of the mid point of this interval is computed: Xm = (X1 + X2) / 2, and the corresponding y-value, Ym, is computed using the exact fit equation

  4. The interval to the right or left of this midpoint is chosen such that the user-specified Y value now falls within the new interval.

  5. This bisectional search is continued till the y-value of the mid point of the interval, Ym, differs from the user-specified Y-value by less than 0.00001%, or until 200 iterations are performed, whichever comes first.

  6. The Xm value corresponding to the final Ym value is reported as the X value corresponding to the y-value you specified.

Using the Sigmoidal Fit Tool

The Sigmoidal Fit tool provides an intermediate level of sophistication for Sigmoidal fitting that is more advanced than the Analysis:Fit Sigmoidal menu command and simpler than the Analysis:Non-Linear Curve Fit:Advanced Fitting Tool menu command. The fitting function used depends on

  • The X axis scale type.

  • The selected radio button in the Logged Data Fit Function group on the Settings tab.

To open the Sigmoidal Fit tool:

  1. From the menu, select Tools:Sigmoidal Fit.

Note: To learn more about fitting with the Sigmoidal Fit tool, review the SIGMOIDAL FIT.OPJ project located in your Origin \SAMPLES\ANALYSIS\CURVE FITTING folder.

The Settings Tab

The Operation Tab


Fitting a Data Plot with Multiple Peaks

Origin includes a number of tools for peak analysis including the Baseline tool, the Pick Peaks tool, and the Analysis:Fit Multi-peaks menu command. For more information, see The Baseline Tool and The Pick Peaks Tool.

Note: To learn more about fitting data with multiple peaks, review the MULTI PEAK FIT.OPJ project located in your Origin \SAMPLES\ANALYSIS\CURVE FITTING folder.

Multiple Gaussian

Multiple Lorentzian


Multiple Gaussian

To fit a curve with multiple Gaussian peaks to the active data plot:

  1. From the menu, select Analysis:Fit Multi-peaks:Gaussian.

This menu command opens the Number of Peaks dialog box>

  2. Enter the number of peaks.

  3. Click OK to close the dialog box.

This opens the Initial Half Width Estimate dialog box. Origin estimates the overall half-width through integration, and then divides by the number of peaks, to arrive at the half-width estimate.

  4. Modify or accept the estimated value in the Initial Half Width Estimate dialog box.

  5. Click OK to close the dialog box.

The Data Display tool opens if not already open.

  6. To read the XY coordinates of a data point in the Data Display tool, click on the desired point.

  7. To determine a peak position, double-click (or click + ENTER) on a data point.

When complete, the fitting parameters, as well as related statistics, are displayed in the graph window and the Results Log. Additionally, the fit data is copied to a new (hidden) worksheet.


Multiple Lorentzian

To fit a curve with multiple Lorentzian peaks to the active data plot:

  1. From the menu, select Analysis:Fit Multi-peaks:Lorentzian This menu command is similar to the Multiple Gaussian menu command as it allows you to specify the number of peaks, and then invokes fitting to multiple Lorentzian functions.


The NLSF Wizard

This page contains controls for selecting the Y fitting data set and for selecting a range of data for fitting. You can also select the data plot type and the X axis scale type on this page and on later pages.

This page provides controls to select your fitting function. You can browse through functions in the selected category using the Previous and Next buttons located in the Preview window, or you can scroll the Function list to select a function.

Additionally, you can add new categories and add / remove functions from categories. You can also delete and rename categories.

This page is only available if you have selected a peak function and you select the Multiple Peaks check box. Use this page to initialize peak heights and centers for data sets with multiple peaks. This process is similar to the Analysis:Fit Multipeaks menu command. (For data sets with a single peak, Origin will automatically initialize the parameter values.)

This page allows you to specify how different data points are to be weighted when computing the reduced chi-square value during the iterative process.

To learn about the weighting methods, see Before you Start: The Chi-Square Minimization.

This page allows you to control the fitting procedure and perform the fit. You can specify the desired confidence level for the confidence and prediction bands, the maximum number of iterations to perform, and the tolerance for performing additional iterations. You can calculate the reduced chi-square value for the current parameter values and perform iterations on this page.

After performing the iterations, the reduced chi-square value and the actual number of iterations performed are listed in the Iteration Results view box. For more information on these options, see Controlling the Fitting Procedure.

This page provides controls for outputting the fit curve, residuals, confidence and prediction bands, and fit results label to the active graph or to a new graph. It also provides controls for outputting the parameter results. For more information, see The Fitting Results.

The Results page also provides a Save Fitting Session as a Procedure File check box. For more information on this check box, see Creating a Custom Wizard.

The NLSF Wizard

Origin provides a wizard for performing nonlinear least squares fitting. The NLSF wizard is easier to use than the advanced fitting tool (NLSF), as it steps you through the fitting process. The wizard provides only the most frequently used fitting options. For complete fitting options, open the NLSF. For more information on the NLSF, see The Nonlinear Least Squares Fitter.

Note: If you want to mask data from fitting, you must mask the data before opening the NLSF wizard.

To open the NLSF Wizard:

  1. From the menu, select Analysis:Nonlinear Curve Fit:Fitting Wizard.

To navigate through the NLSF Wizard, click the Next (and Back) buttons, or click the page icons on the wizard map located on the left side of the wizard. The page icons on the wizard map are color-coded to indicate the active page (green), a page that has not been visited (yellow), a page that has already been visited or skipped (brown), and the last wizard page (red).

The NLSF Wizard includes the following pages:

Select Data :

Select Function:

Peaks:

Weighting:

Fitting Control:

Results:

The following buttons are available on the NLSF Wizard:

Enlarge a section of the wizard graph.

Return the wizard graph to the previous enlarged view or back to the full axes scale if the graph was enlarged once.

Scroll the wizard graph axes left, right, up, and down after enlarging.

Return the wizard graph to the full axes scale.

Opens a dialog box for manually initializing the parameter values, fixing parameter values, sharing parameters, and setting parameter constraints including upper and lower bounds and general linear constraints. This dialog box also provides controls for calculating the reduced chi-square value for the current parameter values and for performing Levenberg-Marquardt and Simplex iterations.

Display the residual plot.

Display confidence bands.

Display prediction bands.

Note: A number of wizard settings are saved globally. These include the tolerance and iterations settings which are saved to the NLSF.INI file. Additionally, the confidence and prediction settings, as well as many other wizard settings, are saved as global settings in the NLSFWizard.INI file. Open either initialization file in a text editor to view the settings.

Creating a Custom Wizard


Creating a Custom Wizard

Select Data page: No actions are saved on this page. However, you can hide and skip this page because the active data set is used by default.

Select Function page: You can save a procedure to a button and have it remember the fitting function chosen during that fitting session. This allows you to create multiple customized fitting routines that use different functions.

Peaks page: No actions are saved on this page. You can only hide and skip this page if your data set has a single peak.

Weighting page: This page can only be hidden and skipped if your weighting method is set to None, Instrumental, or Statistical - because Arbitrary and Direct require a data set selection.

Fitting Control page: This page can be hidden and skipped. However, only the Iteration button is recorded. The Chi^2 button is non-recordable.

The following settings are saved to the NLSF.INI file:

    • Tolerance.

    • Default for the Iterations drop- down list and button.

The following settings are saved to the NLSFwizard.INI file:

    • Confidence Spin/Edit.

    • Prediction Spin/Edit.

Results page: You cannot hide and skip this page.

  1. On the Results page, select the Save Fitting Session as a Procedure File check box.

  2. Right-click again on a blank section of the wizard and select View Mode:Normal from the shortcut menu. The wizard map updates displaying only the non-hidden pages.

  3. Click the Finish button. This action opens the Button Settings dialog box.

This dialog box allows you to save your current wizard settings and actions to a new toolbar button.

When the Button Settings dialog box opens after you click the wizard's Finish button, the top left button in the dialog box will be depressed. You can assign your custom wizard settings to this button or you can select another button*.

You can specify Tool Tip and Status Bar messages for your button.

After you click the OK button, Origin adds this button to a new NLSFWiz toolbar.

*Note: This dialog box does not recognize if a bitmap button is already in use.

Creating a Custom Wizard

After you become familiar with the NLSF wizard, you might find that you consistently perform the same actions on some wizard pages and no actions on other wizard pages. If you step through the wizard pages in a similar way when fitting data, you can simplify the wizard by hiding pages that you either perform no actions on or ones that you always perform the same actions on. You can then save this customized wizard to a new toolbar button for future access.

To hide a page in the wizard:

  1. Right-click on a blank section of the wizard (for example, beneath the wizard map) and select View Mode:Full. The Full view mode is the wizard design mode. This view mode allows you to turn off the display of wizard pages by clearing the associated check box located on the wizard map.

Now you can step through the wizard specifying which pages you want to hide.

  • To hide a page that you never perform any actions on, clear the associated check box on the wizard map.

  • To hide a page that you want to perform the same actions on, manually perform the action on the page (for example, click the Iterate button on the Fitting Control page) and then clear the page's check box on the wizard map. When this page is skipped when you run your customized wizard, the wizard will automatically perform the action.

The following actions can be saved to a custom wizard:

After clearing the desired wizard map check boxes, perform the following steps to create your custom wizard:

Note: A number of settings are saved globally and are independent of custom wizards. These include the tolerance and iterations settings which are saved to the NLSF.INI file. Additionally, the confidence and prediction settings, as well as many other wizard settings, are saved as global settings in the NLSFWizard.INI file. Open either initialization file in a text editor to view the settings.


The Nonlinear Least Squares Fitter

One of the most powerful and complex components of Origin is its nonlinear least squares fitting (NLSF) capability. Using the nonlinear least squares fitter you can fit a function, or a set of functions, to your data, depending on one (or several) independent variables and up to 200* fitting parameters. Essentially, the only limitation is the memory of your computer. Origin provides nearly 200 built-in functions selected from different areas of research and development. Should you be unable to find the function you require among the built-in functions, define a function and Origin will fit it to your data.

Origin's nonlinear regression method is based on the Levenberg-Marquardt (LM) algorithm and is the most widely used algorithm in nonlinear least squares fitting. The Simplex minimization method is provided as well.

Origin’s nonlinear least squares curve fitter is very flexible. It enables you to take almost full control of the fitting process:

  • Estimate initial parameter values by one of three methods: (i) plotting the curve before the actual fitting and comparing it to the data, (ii) use Origin’s automatic parameter initialization feature (built-in functions only) or (iii) write your own Origin C code to calculate dataset-specific parameter estimates for your user-defined functions

  • Impose linear constraints on the values of parameters.

  • Monitor the relevant quantities during the iterative process which may indicate ill-behaving functions.

  • Select the weighting method.

  • Easily set the fitting data range, etc.

*Note 1: If you choose not to share parameters across data sets, the number of fitting parameters is determined by the number of parameters in your fitting function multiplied by the number of datasets you are simultaneously fitting. If an equation has 9 parameters and you are not sharing parameter values across data sets, you can fit a maximum of 22 datasets [22 * 9 = 198] without exceeding the 200 parameter limit. If you are sharing parameters, you are not so limited because the NLSF calculates only a single value for each parameter, regardless of the number of data sets you are fitting.

Note 2: The NLSF always reports the reduced chi^2 value, not chi^2. In some locations of the NLSF, reduced chi^2 is labeled "chi^2". In other locations, it is labeled "chi^2/DoF". In all cases the actual value is reduced chi^2.


Entering the Nonlinear Least Squares Curve Fitting Session

To enter the nonlinear least squares curve fitting session,

  1. Select Analysis:Non-linear Curve Fit:Advanced Fitting Tool when either the graph or worksheet window is active.

Two NLSF Modes: Basic and Advanced


Two NLSF Modes: Basic and Advanced

To help you master the power of Origin’s nonlinear least squares fitter, two NLSF modes are available: Basic and Advanced. While both modes allow you to fit your data, they differ substantially in the options they provide as well as in the degree of complexity they entail.

The Basic mode is much simpler to use and understand. Use this mode to:

  1. Select a function from a reduced set of built-in functions.

  2. Select data sets for fitting.

  3. Perform an iterative fitting procedure.

  4. Display the results on the graph.

The Advanced mode includes more options. Use this mode to:

  1. Define a LabTalk script or Origin C code to initialize parameters.

  2. Impose linear constraints.

  3. Define your own fitting functions.

  4. Specify a weighting method and termination criteria.

  5. Display confidence and prediction bands, residue plot, parameter worksheet, and the variance-covariance matrix.

  6. Fit multiple data sets with a choice of shared parameters.

  7. Change parameter names.


Using the Fitter in the Basic Mode: Examples

Opening a Project File

  1. Click the Open button on the Standard toolbar to open the Open dialog box. Select Project (*.OPJ) from the Files of Type drop-down list.

  2. In the Origin TUTORIAL folder, double-click on FITEXMP1.OPJ in the list of files. This action opens the Fitexmp1 project with a Graph1 window displaying sample data.

Starting the Basic Mode of the NLSF

  1. With the graph window active, select Analysis:Non-linear Curve Fit:Advanced Fitting Tool. This menu command opens the Select Function dialog box of the NLSF. If the advanced mode is displayed instead, select Options:Basic Mode from the fitter’s menu to display the basic mode.

Selecting a Function

  1. If the Select Function dialog box is not displayed, click Select Function to display it.

  2. In the Functions list box, click on ExpDec1 to select the First Order Exponential Decay function.

Starting the Fitting

  1. Click Start Fitting. An Attention message opens informing you that you have not selected a data set for fitting. You can choose to fit either the current active data set (data1_b) or select another data set. Select the active data set. The Fitting Session dialog box replaces the Select Function dialog box.

Fixing Parameters

Suppose that you want to fit the data to the exponential decay function but with a fixed value of the vertical offset y0 (=4).

  1. Type 4 in the Value text box for the y0 parameter. Clear the Vary check box for this parameter.

  2. Type 8 in the Value text box for the A1 parameter. This is the initial value for this parameter. Leave the initial value for the t1 parameter at 1.

  3. Make sure that the Vary check boxes for the A1 and t1 parameters are selected. They may thus vary during the iterative procedure.

Performing Iterations

  1. Click 1 Iter to perform one iteration. New values of the parameters A1 and t1 are displayed together with the current value of the reduced chi^2. Notice that the parameter y0, which we fixed in the previous step, remained unchanged. The theoretical curve corresponding to the current parameter values is displayed in Graph1.

  2. Click 10 Iter to perform (at most) 10 iterations. Notice the improvement of the fit.

Finishing Fitting

  1. Click Done. The fitter’s dialog box closes. The parameter values are displayed on the graph.

Using the Fitter in the Basic Mode: Examples

By default, when you select Analysis:Non-linear Curve Fit:Advanced Fitting Tool from the menu when a graph or a worksheet window is active, Origin’s nonlinear least squares fitter starts in the basic mode. When the fitter is in the basic mode, it does not have its own menu bar.

Switch from the basic to the advanced mode at any time by clicking on the More button.


The Dialog Boxes of the Basic Mode

The basic mode includes five dialog boxes: the Select Function, Define New Function, Edit Function, Select Dataset, and Fitting Session dialog boxes. Open any of these dialog boxes by clicking on the corresponding buttons within the active dialog box.


This list box provides the list of fitting functions available in the basic mode. In addition to a set of built-in functions, all user-defined functions are displayed. Select a function by clicking on its name.

If you have selected a built-in function, the view box to the right of the Functions list box displays either the function's definition (equation) or a curve which shows the function’s profile. Switch between the two by selecting the corresponding radio buttons at the top of the view box. If you have selected a function which you had previously defined, then the view box contains the definition of the function.

Click these buttons to open the Fitting Session and Select Dataset dialog boxes, respectively.

Click this button to switch from the basic to the advanced mode.

Click this button to open the Define New Function dialog box.

Click this button to open the Edit Function dialog box.

Basic Mode: The Select Function Dialog Box

By default, this dialog box is displayed when you invoke the curve fitter. You can also access it from the Select Data Set and Fitting Session dialog boxes by clicking on the Select Function button.

Dialog Box Controls (see figure)

The Functions List Box

The View Box

The Start Fitting and Select Dataset Buttons

The More Button

The New Button

The Edit Button


Basic Mode: The Select Dataset Dialog Box

Each line in this list box includes the following information:

  • VariableName

  • Dep(endent) or Indep(endent)

  • DatasetAssignment,

  • FittingRange

VariableName is the name of the variable. Indep or Dep specifies whether the variable is independent or dependent. DatasetAssignment is the name of the data set to which the variable is assigned. Fitting Range is the data set range used in fitting.

If no data set assignment has been made, the associated section of the line displays question marks. This field updates during data set assignment.

This list box displays the names of all the data sets in the project.

You must assign all the variables to data sets.

The way in which you assign variables to data sets differs depending on whether you are assigning a dependent or an independent variable.

To assign dependent variables to data sets:

  1. Click on the dependent variable you want to assign in the Variables:Datasets list box. The row becomes highlighted. Additionally, the Assign X button becomes unavailable.

  2. Click on the data set name you want the variable assigned to in the Available Datasets list box. The data set becomes highlighted.

  3. Click Assign to assign the variable to the data set.

To assign independent variables to data sets:

  1. Click on the independent variable you want to assign in the Variables:Datasets list box. The Assign X button becomes available.

  2. Click on a data set name in the Available Datasets list box.

  3. There are now two options:

If you want the variable assigned to the data set which you highlighted in step b, click Assign.

If you want the variable assigned to the ‘x of’ the data set which you highlighted in step b (rather than to the data set itself), click Assign X. The ‘x of’ a data set may have three different meanings: another data set; the data sets associated row numbers, or a defined starting value and a step increment.

Specify whether you want to skip some points in fitting in this text box. For example, type 3 to use every third point in the data set. Type 1 to use all the data points.

If a dependent variable is highlighted in the Variables:Datasets list box, use <= Row <= text boxes to specify the interval of data set rows to be used in fitting.

If an independent variable is highlighted in the Variables:Datasets list box, then the space between the two <= signs turns into a button. You can toggle the words Row or <name of variable> on this button.

If Row is selected, the meaning is the same as for dependent variables.

If the name of the independent variable is displayed on the button, specify the interval in units of the independent variable to be used for fitting. For example, if you have specified 3.1<=x<=9.7, this means that only the points with the value of the independent variable X between 3.1 and 9.7 will be used in fitting.

Basic Mode: The Select Dataset Dialog Box

Edit the Select Dataset dialog box to select the data sets for fitting.

Dialog Box Controls (see figure)

The Variables:Datasets List Box

The Available Datasets List Box

The Assign/Assign X Buttons

The Fitting Step Size Text Box

The <= Row <= Text Boxes


Basic Mode: The Fitting Session Dialog Box

These text boxes list the fitting parameters and their current values. Use them to specify what parameter values you want the iterative procedure to start from. Additionally, change the parameter values at any time to enable the iterations to proceed from these new values.

Each parameter contains a Vary check box. Select this check box to vary the parameter value during the iterative procedure. Otherwise, the parameter remains fixed at its current value.

If at least one iteration has been done, these list boxes contain the estimates of the standard errors.

These list boxes display the parameter dependency. If the equation is overparameterized, there will be mutual dependency between parameters. If this value is close to one, there is strong dependency.

Click Chi-Sqr to display the reduced chi^2 value for the current parameter values. The display of this value is automatically updated after each iteration. You may use this button if you have manually changed some parameter values and want to know what the reduced chi^2 value is before proceeding.

Click 1 Iter to perform one iteration. The new parameter values are displayed in the Parameter Value text box, together with the error and dependency values.

Click n Iter to cause the fitter to perform, at most, n iterations. The number n can be changed in the advanced mode. The fitter may perform less than n iterations if it detects that further iterations will not improve the fit. Stop the iterations at any time by pressing the ESC key.

These buttons enable you to retrieve the values of parameters which the fitter has already gone through. For example, click the < button to display the parameter values that were current before the last iterations.

Basic Mode: The Fitting Session Dialog Box

Access this dialog box by clicking the Start Fitting button from the Select Function or Select Data Set dialog boxes in the basic mode.

Dialog Box Controls (see figure)

The (Parameter) Value Text Boxes

The Vary Check Boxes

The Error List Boxes

The Dependency List Boxes

The Chi-Sqr Button

The 1 Iter(ation) Button

The n Iter(ations) Button

The < and > Buttons


Using the Fitter in the Advanced Mode

Access the advanced mode from the basic mode by clicking on the More button.

Some General Notes on the Advanced Mode of the Nonlinear Least Squares Curve Fitter


Some General Notes on the Advanced Mode of the Nonlinear Least Squares Curve Fitter

This tutorial teaches you how to define your own function of two variables to fit sample data sets using the advanced mode of Origin’s NLSF. You will write and compile your function using Origin C. The function to be defined is:

act = vm * substr / (km + (1 + inhib / k) * substr)

Opening a Project File

  1. Click the Open button on the Standard toolbar to open the Open dialog box. Select ‘Project (*.OPJ)’ from the Files of Type drop-down list.

  2. In the Origin TUTORIAL folder, double-click on FITEXMP3.OPJ in the list of files. This opens the Fitexmp3 project with the Graph1 window displaying sample data.

Starting the Fitter

  1. Select Analysis:Non-linear Curve Fit:Advanced Fitting Tool to open the NLSF window.

  2. If the basic mode of the fitter is displayed, click More to proceed to the advanced mode.

Defining a Function

  1. Select Function:New from the fitter’s menu. This menu command opens the Define New Function dialog box.

  2. Type Tutorial in the Name text box.

  3. Select the User Defined Param. Names check box to enable arbitrary parameter names.

  4. Type the following in the Parameter Names text box: ki,km,vm. Origin will fit these parameters during the fitting session.

  5. Type substr,inhib in the Independent Var text box. You must use these names for the independent variables when entering the function definition.

  6. Type act in the Dependent Var text box. You must use this name for the dependent variable when entering the function definition.

  7. In the Definition edit box enter the following two commands which define the function:

double mix = inhib / ki;

act = vm * substr / (km + (1 + mix) * substr);

Note: C-language syntax requires that you declare variables prior to use. In this case, we use the statement "double mix = inhib / ki;" to both declare and define the variable "mix." The other variables and the parameters in these two equations are declared automatically because we typed them into the Parameter Names, Independent Vars. and Dependent Vars. text boxes in the Edit Function dialog box.

  8. Verify that the Use Origin C check box is selected.

  9. From the NLSF menu, select Scripts: After Fit. In the Fit Curve group, select Same X as Fitting Data. This is necessary because the x variable is not a continuous variable.

  10. Verify that the Generate Fit Curve and Paste Parameters to Plot check boxes are selected.

  11. From the NLSF menu, select Function:Save. This saves the function along with our settings, for future use.

Assigning Variables to Data Sets

  1. Select Action:Dataset from the fitter’s menu. This menu command opens the Select Dataset dialog box.

  2. In the Variables:Datasets list box, click on the Act dependent variable to highlight it.

  3. In the Available Datasets list box, click on data1_activity to highlight it.

  4. Click Assign to assign the dependent variable Act to the data set data1_activity.

  5. In the Variables:Datasets list box, click on the Substr independent variable to highlight it.

  6. In the Available Datasets list box, click on data1_substrate to highlight it.

  7. Click Assign to assign the independent variable Substr to the data set data1_ substrate.

  8. In the Variables:Datasets list box, click on the Inhib independent variable to highlight it.

  9. In the Available Datasets list box, click on data1_inhibitor to highlight it.

  10. Click Assign to assign the independent variable Inhib to the data set data1_inhibitor.

Entering a Fitting Session

  1. Select Action:Fit from the fitter’s menu. This menu command opens the Fitting Session dialog box.

Initializing the Parameters

  1. Type 0.01 in the Value text box for the parameter ki.

  2. Type 1 in the Value text box for the parameter km.

  3. Type 100 in the Value text box for the parameter vm.

  4. To enable all three parameters to vary during fitting, make sure that the Vary check boxes are all selected.

Fitting the Data

  1. Click 100 Iter. The actual number of iterations performed is likely to be less than 100 because a satisfactory fit can be reached with fewer than 100 iterations. You can convince yourself that this is the case by clicking on the 1 Iter button to perform one more iteration. If you do that, the reduced chi^2 value does not change.

Pasting the Parameter Values to the Graph and Exiting the Fitter

  1. Click Done.

This tutorial teaches you how to fit multiple data sets to a function using the advanced mode of the NLSF. The function used is Gaussian:

y=y0 + (A/(w*sqrt(PI/2)))*exp(-2*((x-xc)/w)^2) .

Opening a Project File

  1. Click the Open button on the Standard toolbar to open the Open dialog box. Select ‘Project (*.OPJ)’ from the Files of Type drop-down list.

  2. In the Origin TUTORIAL folder, double-click on FITEXMP4.OPJ in the list of files. This opens the Fitexmp4 project with the Graph1 window displaying sample data.

Starting the Fitter

  1. Select Analysis:Non-linear Curve Fit:Advanced Fitting Tool to open the NLSF window.

  2. If the basic mode of the fitter is displayed, click More to proceed to the advanced mode.

Selecting a Function

  1. Select Function:Select to open the Select Function dialog box.

  2. Click on Origin Basic Functions in the Categories list box.

  3. Click on Gauss in the Functions list box. This action selects a Gaussian function.

Selecting Multiple Data Sets

  1. Select Action:Dataset to open the Select Dataset dialog box.

  2. Select the Fit Multiple Datasets check box.

  3. Click twice on the Add Data button to indicate that you want to fit simultaneously three data sets to the same function.

  4. Click on the x(1) independent variable in the Datasets:Variables list box at the top of the dialog box to highlight it.

  5. Click on the data1_a data set name in the Available Datasets list box to highlight it.

  6. Click Assign to assign the independent variable x(1) to the data1_a data set.

  7. Repeat the same procedure with the independent variables x(2) and x(3) to assign them to the same data1_a data set.

  8. Click on the y(1) dependent variable in the Datasets:Variables list box at the top of the dialog box to highlight it.

  9. Click on the data1_b data set name in the Available Datasets list box to highlight it.

  10. Click Assign to assign the dependent variable y(1) to the data1_b data set.

  11. Repeat the analogous procedure for the dependent variable y(2) to assign it to the data1_c data set and for the dependent variable y(3) to assign it to the data1_d data set.

Specifying Parameter Sharing

  1. Double-click on the w and A parameters in the Parameter Sharing list box to tag them as shared. This causes only one “version” of each of these two parameters to be used for all three data sets, whereas each data set will have its own “version” of the remaining two parameters.

Fitting the Data

  1. Select Action:Fit to open the Fitting Session dialog box.

  2. Leave the initial parameter estimates as they are. Note that for built-in fitting functions, Origin calculates data set specific parameter estimates. This is done automatically when you choose Action:Fit from the NLSF menu.

Note also that only one value is listed for w and A parameters because we chose to share those parameter values among the three data sets.

  3. Make sure that all the parameters have their Vary check boxes selected to allow them to vary during fitting.

  4. Click 100 Iter.

Pasting the Results to the Graph and Exiting the NLSF

  1. Click Done.

To Expedite Future Fitting Sessions using the Same Fitting Function and Similar Data

Note that the NLSF will remember which fitting function was last used.

  1. Activate the worksheet that contains the data that you want to fit.

  2. Highlight the data sets.

  3. Select Analysis: Non-linear Curve Fit:Advanced Fitting Tool. The fitting function is selected and the data sets are assigned automatically. When you select Action:Fit the parameters are automatically initialized. You can now start fitting.

Some General Notes on the Advanced Mode of the Nonlinear Least Squares Curve Fitter

The fitting menu bar includes five menus: Category, Function, Action, Options, and Scripts. Each of these menus contain several commands. In most cases, when a menu command is selected, the dialog box associated with the menu command is displayed in the fitting window.

In addition, a fitting toolbar containing twelve buttons displays below the menu bar. Each button is associated with a menu command and can be clicked on to open the respective dialog box. You can toggle the toolbar on and off by (de)selecting Options:Toolbar from the fitter’s menu.

Menu commands (and the corresponding toolbar buttons) may be temporarily disabled. For example, you cannot select the Action:Fit menu command unless you have already selected or defined a fitting function.

The menu command corresponding to the dialog box currently displayed in the fitting window is checked.

The fitting dialog boxes contain buttons, text boxes, drop-down lists, check boxes, and list boxes. Settings in one dialog box often reflect settings in other dialog boxes. For example, you can initialize parameters in the Initializations dialog box. If you then select Action:Fit, the parameter values displayed in the Fitting Session dialog box reflect those set in the Initializations dialog box.

Tutorial: Defining your own Function of Two Variables in the Advanced Mode

Tutorial: Fitting Multiple Data Sets to a Function in the Advanced Mode


Before you Start: The Chi-Square Minimization

Two building blocks of any fitting procedure are:

  • The data which represent the results of some measurements in which one or several independent (input) variables ( [image]) were varied over a certain range in a controllable manner so as to produce the measured dependent (output) variable(s) [image].

  • The mathematical expression (a function or a set thereof) in the form [image] [image] [image] which represents the theoretical model believed to explain the process that produced the experimental data. The model usually depends on one or more parameters [image].

The aim of the fitting procedure is to find those values of the parameters which best describe the data. The standard way of defining the best fit is to choose the parameters so that the sum of the squares of the deviations of the theoretical curve(s) from the experimental points for a range of independent variables...

... is at its minimum. Here, [image] are the measured values of the dependent (output) variable [image] for the values of the independent (input) variables [image], [image], ...; [image] is the total number of experimental points used in the fitting, and [image] is the total number of adjustable parameters used in the fitting (the difference [image] is usually referred to as the number of degrees of freedom). The quantities [image] represent the weights of each experimental point.

Origin supports five weighting methods:

  • No weight: .

  • Instrumental weights: , where [image] are the error bar sizes stored in error bar columns.

  • Statistical: .

  • Any data set: The weights are determined by any user-specified data set so that [image], where [image] are the values of arbitrary data sets.

  • Direct:

In case there is only one independent and one dependent variable:

the expression for [image] simplifies to:

The LM algorithm, starting from some initial parameter values, minimizes [image] by performing a series of iterations on the parameter values and computing [image] at each stage. In order to do that, Origin internally calculates partial derivatives f'j [image] for all the values of the input variables. For built-in functions, all the derivatives are computed using analytic expressions. For user-defined functions, the partial derivatives are computed numerically. The computation is thus faster for built-in functions than for user-defined functions. (Note: You can define a user-defined function with partial derivatives.)

You can limit the set of the allowed values which the fitting parameters can take during the iterative procedure by imposing linear constraints. Origin internally implements the constraints by means of the Lagrange multiplier method.

Note: The NLSF always reports the reduced chi^2 value, not chi^2. In some locations of the NLSF, reduced chi^2 is labeled "chi^2". In other locations, it is labeled "chi^2/DoF". In all cases the actual value is reduced chi^2.


Select the desired category in this list box. Origin provides a variety of built-in functions. Functions are grouped into several categories based on the area of primary use.

Functions belonging to the selected category are displayed in this list box. The listed functions include both built-in and user-created functions. Click to select the desired function.

Select Function:Add to add a function to the selected category.

Select Function:Delete to remove the highlighted function from the list.

Select the Equation radio button to display the function in the lower view box. The radio button is unavailable if a user-defined function is selected.

Select the Sample Curve radio button to display a sample curve of the currently selected function. The curve is displayed in the lower view box. The radio button is unavailable if a user-defined function is selected.

Select the Function File radio button to display the function definition file associated with the function. The function definition file contains all the information about the function and the current fitting session. It is not necessary to view this file. In fact, most of the contents of this file can be changed using other dialog boxes.

Selecting an Existing Fitting Function

Select Function:Select to select a built-in or previously saved user-defined function for fitting. This menu command opens the Select Function dialog box.

The Select Function Dialog Box (see figure)

The Categories List Box

The Functions List Box

The Equation Radio Button

The Sample Curve Radio Button

The Function File Radio Button

Note: To learn more about fitting with a built-in function, review the NLSF BUILT IN FUNC.OPJ project located in your Origin \SAMPLES\ANALYSIS\CURVE FITTING folder.


User-Defined Fitting Functions

This section discusses creating user-defined fitting functions with the Nonlinear Least Squares Fitter (NLSF) Advanced Fitting Tool. Once a function is defined in the NLSF and added to an NLSF fit category, the function becomes available from the NLSF Wizard.

Adding a new Category

Defining a New Function

Defining Parameter Initialization Code

Saving the Parameter Initialization Code

Fitting with the User-defined Function

Accessing the NLSF Object and Properties

Accessing Other Origin C Functions in your NLSF Code

Editing the Function

Click here to view a multi-media demonstration


Adding a new Category

New functions can be added to existing categories, or they can be added to a new category. To create a new category before defining a new fitting function.

  1. From the Origin program menu, select Analysis:Nonlinear Curve Fit:Advanced Fitting Tool.

  2. From the NLSF menu, select Category:New.

  3. In the Category Name text box, type Category Name (spaces are permissible) and click OK.


Defining a New Function

The Name text box will display a default name, such as user1. Enter the name of your function.

When you save a user-defined function, it is stored in the Origin\FitFunc folder as \FunctionName.FDF.

Note: The function name must not contain spaces or special characters. Failure to adhere to function naming conventions will generate a warning.

The Type drop-down list offers two choices: User-Defined and External DLL. The default type – the appropriate choice in most cases – is User-Defined.

The External DLL option gives the user access to a function that is coded and compiled using a non-native compiler (such as a C or FORTRAN compiler). This method predates Origin C and, as such, is perhaps less attractive. However, the option is provided for purposes of backward compatibility.

By default, Origin assigns names of P1, P2 , etc., to function parameters. For example, setting the Number of Parameters drop-down to 3, generates the parameter names of P1, P2, and P3.

If you opt for user-defined parameter names, it is not necessary to set the Number of Parameters drop-down list.

This check box must be selected if you specify your own parameter names.

If default parameter names are used, this text box is not editable. It is only editable when the User Defined Param. Names checkbox is selected.

Note: The following user defined parameter names are not allowed: x1, x2,….xn, y1, y2,…yn, z1, z2,…zn. The letters i, t , j, and e are not allowed for either user-defined parameters or variables. Furthermore, there are some system variables that should be avoided. For more information on these system variables, consult the LabTalk Language Reference section of the Programming Help file (Help:Programming). You are strongly encouraged to choose parameter and variable names that contain more than one character. If you use a name that is not allowed, you will be prompted to change it when you start fitting.

Specify the name(s) of the independent variable(s), using comma separators as needed. Note that the NLSF allows more than one independent variable.

See the note above concerning parameter and variable names.

Specify the name(s) of the dependent variable(s), using comma separators as needed. Note that NLSF allows more than one dependent variable.

See the note above concerning parameter and variable names.

The function definition is typed into this text box. If you define your function using Origin C (the Use Origin C box is check box is selected), it may be more convenient to use the Code Builder workspace to type your function. Refer to the Edit in Code Builder Button section below for more details. Once you have defined your function in Code Builder, you can do further editing in the Definitions text box.

If the Use Origin C check box is cleared, you must type the function in the Definitions text box. This applies to all forms (Expressions, Y-Script, or Equations) available from the Form drop-down list.

When defining a new function, the NLSF default setting is to use Origin C, Origin’s ANSI C-compatible programming language. This option offers the most speed and flexibility for defining your function.

When the Use Origin C check box is selected, the Form drop-down list is unavailable.

The available function forms are Expression, Y-Script, and Equations.

  • Expression. Use is limited to function definitions with a single dependent variable. The function definition follows the form of this example:

a*x+b*x^2+exp(c*x)

  • Y-Script. Use this form when using LabTalk script to define your function. Each dependent variable must be defined in the script using the form…

y =…

where y is the dependent variable.

  • Equations. This option is appropriate for one or more dependent variables. Define your function in Definitions text box. For multiple dependent variables, type a separate line for each following the form of this example:

y1 = ….

y2 = ….

where y1 and y2 are dependent variables. Do not include any loops or if-else clauses. Temporary variables are permissible.

Note 1: When the Use Origin C check box is selected, the Form drop-down list is unavailable. In actuality, both Y-Script and Equations forms will work with Origin C. Only the Expression form is incompatible.

Note 2: If your function definition uses constants and the constant values are not specified in the function definition itself, they must be assigned in the Constants text box of the Initialization dialog box (choose Scripts:Parameter Initialization from the NLSF menu).

This button is available when Use Origin C is enabled. Clicking this button opens a specialized version of the Code Builder workspace.

This specialized Code Builder window will open with an active window named _nlffunctionName.fit (_nlfAsymmetricGaussian.fit, in this example). This is the edit window for the new function definition.

The first few lines of code are #include statements that identify various header files required for compiling the fitting function. The actual function definition begins with the statement:

void _nlsfAsymmetricGaussian(…

The parameters, independent variables, and dependent variables are declared at the beginning of this function definition. After these declarations, there is an editable section – the area bounded in white – that is reserved for entering your function definition.

The above figure shows the definition of the asymmetric Gaussian function having been typed in. Note that the function definition must comply with C programming language syntax. For instance, the parameters and all variable types are case sensitive. Intermediate variables – such as B in this example – must be declared first using a statement such as:

double B;

This declaration must occur before the variable is used in the function definition.

Note that the function is of type void, which means that no values are returned by the function. Instead, the dependent variable value is set inside the function code. In our example, the dependent variable y is assigned a different value, dependent upon whether x is less than or greater than the centroid parameter, xc.

Once the function is defined, you must verify that your syntax is correct. To test, click the Compile button at the top of the Code Builder workspace. This action compiles the function code using Origin C. Any errors generated in the compiling process are reported in the Code Builder output window at the bottom of the workspace. This window also reports when a file has successfully compiled (see the above figure).

Once the function has been defined and compiled, you can return to the NLSF interface by clicking the Return to NLSF button at the top of the window. This closes the specialized Code Builder window.

As mentioned, you can do further editing of your function directly in the NLSF Function Definition text box. You can also click the Edit in Code Builder button and return to the Code Builder workspace to edit your function.

Note: It is not necessary to close Code Builder to return to the NLSF. You can leave the Code Builder workspace open and switch between the NLSF and Code Builder. However, if you leave Code Builder open, you will not be able to edit to your function from the NLSF; the NLSF Function Definition text box will not be editable. Furthermore, if you make changes to your function in the Code Builder workspace, you should click the Compile Button so that when you switch to the NLSF, your function is updated. We recommended that you click the Return to NLSF button to close Code Builder before returning to the NLSF. If you wish to debug the function by setting break points in your code, it makes sense to leave Code Builder open. For further information on debugging, select Help:Programming:Programming Guide… from the Origin menu and search on debug.

Note that if, after defining your function in Code Builder, you click the Return to NLSF button without compiling your function, the function will compile automatically when you select Action:Fit from the NLSF menu.

Click the Save button to save the function as functionName.FDF. The default folder for storing the function file is the \FitFunc subfolder in the Origin software directory. If a function of the same name already exists, the Save As dialog box opens and the user is asked to give the function a new name. Assigning a new name to the function will update the Name field in the Function Name text box.

Note that once you save the function file, the Function Name text box is no longer editable. To change the name of a saved function, save the function with a different name using the Save As button.

The Save As button opens the Save As dialog box. The Save As button allows you to save the current function under another name. Note that choosing another name assigns this name to both the function name and the disk (.FDF) file.

If a function of the same name already exists, the user is prompted to choose a different name.

Click the Cancel button to discard function modifications made since the function file was last saved.

Click the File button to display and/or edit the function definition file associated with the function. To return to the Edit page, click on the Form button.

Specifying partial derivatives of your function can reduce the time it takes to perform a set of iterations. However, given the much-enhanced speed of fitting achieved with Origin C, specifying partial derivatives may not be necessary.

If you wish to specify partial derivatives, note that you must specify the derivatives of the function of the dependent variable in terms of the fit parameters. Furthermore, partial derivatives with respect to all fitting parameters need to be specified.

If you have chosen to define the function using Origin C, the variables for the partial derivatives will be pre-defined in Code Builder. You just need to enter the expression for them..

For example, if the function is:

y = P1 + P2 * x + exp(P3 * x)

then the variables dy_P1, dy_P2, and dy_P3 will be available, and you will need to enter the following equations for the partial derivatives:

dy_P1 = 1;

dy_P2 = x;

dy_P3 = x * exp(P3 * x);

Note that if you do not use Origin C and are defining your function using LabTalk with the Form drop down list set to Y-Script (the only form that is compatible with use of derivatives), then the notation for partial derivatives is different. In this case, the partial derivatives for the above example would be:

y’P1 = 1;

y’P2 = x;

y’P3 = x * exp(P3 * x);

Defining a New Function

To define a new function, choose Function:New from the NLSF menu.

The Define New Function Dialog Box (see figure)

The Name Text Box

The Type Drop-Down List

The Number of Parameters Drop-Down List

The User Defined Param. Names Check Box.

The Parameter Names Text Box

The Independent Var. Text Box

The Dependent Var. Text Box

The Definitions Text Box

The Use Origin C Check Box

The Form Drop-down List

The Edit in Code Builder Button

The Save Button

The Save As Button

The Cancel Button

The File Button


Defining Parameter Initialization Code

This group contains the parameter name, an editable text box with current parameter value and a check box control for varying or fixing the parameter value during the iterative fitting process.

Until the fit dataset is assigned and the automatic parameter initialization code is executed, the parameters will register as missing values. The Vary check box is checked by default.

If your function definition contains constants (not to be confused with parameters and variables), you will need to define those constants in this text box, using this format:

constant1 = value1;

constant2 = value2;

When using Origin C to define your function, any constant you specify in this text box will appear in the function body when you edit/view the function in Code Builder. You should define your constants in this text box before editing your function in Code Builder. This will ensure that your constants appear in your function definition.

If you are defining your function using LabTalk, with the Form drop-down set to Y-Script, then the constant(s) you specify in this text box will be available for use in your function definition script.

You can also use externally defined constants in your Y-script function (e.g., constants defined in the script window). In such cases, you can use the constant in your function definition script, and later assign values to the constant in the Constants text box.

There same naming restrictions apply to constants as apply to parameter and variable names: x1, x2,….xn, y1, y2,…yn, z1, z2,…zn, and the letter i are not allowed. The letters t, j, and e should also be avoided. Furthermore, there are some system variables that should be avoided. For more information on these system variables, consult the LabTalk Reference section of the Programming Help file (Help:Programming => LabTalk Language Reference). You are strongly encouraged to choose constant names that contain more than one character.

This check box determines whether automatic parameter initialization code is executed when you choose Action:Fit from the NLSF menu. This setting is saved with each function file. If this check box is cleared, then the user needs to click the Execute button to run the initialization code. For new functions, this check box is cleared by default. For built-in functions, this check box is selected by default, but can be cleared at your discretion.

Note: If data sets for fitting are not assigned, the parameter initialization code will fail to execute.

When you create a new function, this check box is selected by default. When this check box is selected, parameter initialization code must be defined using Origin C.

If this box is cleared, the parameter initialization code is interpreted as LabTalk script. Leaving the check box selected (using Origin C) optimizes parameter initialization.

This button is available when the user has selected the Use Origin C check box. Clicking the button opens a specialized version of the Code Builder workspace. This workspace will open with an active window named _nlpfunctionName.fit (_nlpAsymmetricGaussian.fit, in this example). This is the edit window for the parameter initialization code.

The first few lines of code are #include statements that identify various header files required for compiling the initialization code. The initialization function starts with the statement (for this example):

void _nlsfParamAsymmetricGaussian(…

The parameters, independent variables, and dependent variables are declared at the beginning of this function definition. In addition to these, a few other Origin objects are also declared. A Dataset object is declared for each of the independent and dependent variables. A Curve object is declared for each xy data pair.

Dataset x_data,

Dataset y_data,

Curve x_y_curve

The Dataset objects point to the x and y data sets for which you are trying to find a best fit. Therefore, the Dataset objects should be used in the initialization code without performing any modifications to them; modifications of the Dataset objects will alter the dataset to be fit.

The Curve object is a copy of the dataset curve that results from pairing an x and a y dataset. You can manipulate this Curve copy in the initialization code without affecting the fit dataset. Many Origin C functions take the Dataset or the Curve as an argument and return potentially useful properties (as, for instance, assigning initial parameter estimates in the initialization code).

Below these declaration statements, there is an editable section – the area bounded in white – that is reserved for entering the initialization code. The above figure shows some parameter initialization code for the asymmetric Gaussian function. Note that the function definition follows the requisite C syntax. Note, also, that the function is of type void, which means that our function returns no values. Instead, the parameter variables are stored in the function code. The y0 parameter is initialized using the minimum value of the y dataset, the xc parameter is initialized using the x value that corresponds to the maximum y value (centroid of the peak in the data) etc.

Initialization is accomplished by calling built-in functions that take a dataset or a curve object as an argument. Such functions are prototyped in the data.h header file and the C code for these functions can be found in the file internal.c, in OriginC\System subfolder.

Once the initialization function is defined, you should verify that the syntax is correct. To do this, click the Compile button at the top of the workspace. This compiles the function code using Origin C. Any errors generated in the compile process are reported in the Code Builder Output window at the bottom of the workspace. The Output window reports that the compilation is successful. (see the above image).

Once the initialization code has been defined and compiled, you can return to the NLSF interface by clicking on the Return to NLSF button at the top of the workspace. This will close Code Builder and return you to the NLSF interface. From there, you can do further editing of your code in the Initialization Code text box or you can click the Edit in Code Builder button again to launch Code Builder.

Note: It is not necessary to close Code Builder to return to the NLSF. You can leave the Code Builder workspace open and switch between the NLSF and Code Builder. However, if you leave Code Builder open you will not be able to edit to your code from the NLSF; the Initialization Code text box will not be editable. Furthermore, if you make changes to your code in the Code Builder workspace, you should click the Compile Button so that when you switch to the NLSF, your code is updated. We recommended that you click the Return to NLSF button to close Code Builder, before returning to the NLSF. If you wish to debug your code by setting break points, it makes sense to leave Code Builder open. For further information on debugging, select Help:Programming:Programming Guide… from the Origin menu and search on debug.

Click the Execute button as needed to execute the parameter initialization code and assign parameter values. Normally, when a function with parameter initialization code is used (and the Enable Automatic Parameter Initialization check box is selected), the initialization code runs automatically when the iterative fitting process begins. The Execute button thus provides a means to reset the parameter values to the initial “guesstimate” values. This is useful if the fit does not converge and the user wants to adjust initial parameter values or fix (prevent from varying) a parameter value. Additionally, you might change the initialization code itself , then click the Execute button to recompute initial parameter values.

Note 1: If Automatic Parameters Initialization is enabled, adjustments to parameters will be overwritten when you select Action:Fit, unless you have changed the initialization code itself.

Note 2: If data sets for fitting are not assigned, the parameter initialization code will fail to execute.

This text box contains the parameter initialization code. The code can be edited in this text box, or it can be edited in Code Builder by clicking on the Edit in Code Builder button. If you make changes to the code in this text box, you can click the Execute button to compile and execute the code. Compilation errors will produce an “Error during compilation” message in the status area at the bottom of the NLSF interface.

Defining Parameter Initialization Code

Good parameter initialization results in fast and reliable model/data convergence. Automatic parameter initialization can effectively approximate parameter values prior to fitting by generating dataset-specific parameter estimates.

The NLSF provides automatic parameter initialization code for all built-in functions. For user-defined functions, you must add your own parameter initialization code. If no parameter initialization code is provided, then the NLSF registers all parameter values as missing values. If parameter values are missing, you must enter “guesstimate” parameter values to start the iterative fitting process.

To open the parameter initializations dialog, choose Scripts:Parameter:Initialization from the NLSF menu.

The Parameter Initializations Dialog Box (see figure)

The Parameters Group

The Constants Text Box

The Enable Automatic Parameter Initialization Check Box

The Use Origin C Check Box

The Edit In Code Builder Button

The Execute Button

The Initialization Code Text Box


Saving the Parameter Initialization Code

When you have defined your parameter initialization code, select Function:Save from the NLSF menu. This saves the fitting function with the parameter initialization code, to a fitting function (.FDF) file.

You can also save the function using the Save or Save As buttons on the Function:Edit page.


Fitting with the User-defined Function

Once you save the user-defined function, you can use it in the same way that you use a built-in curve fitting function. To read more about how to use an existing function, please see Selecting an Existing Fitting Function.


Accessing the NLSF Object and Properties

When you use Origin C to define your fitting function and/or your parameter initialization code, you can access the NLSF object and its properties. For instance, you might use…

LabTalk.NLSF.Func$ = “Gaussian”;

…to set your fit function to Gaussian.

The Origin C using statement provides a short cut for accessing the NLSF object properties. Consider this function definition code example:

using NLSF = LabTalk.NLSF;

if(NLSF.CurRow < 21)

y = P1 + P2 * x;

else

y = P1 + P3 * x^2;

In this example, the current row property of the NLSF object is used to fit the first 20 rows of data with one function while the remaining data are fit with another function.


Accessing Other Origin C Functions in your NLSF Code

When you use Origin C to define your fitting function and/or your parameter initialization code, you can access Origin C functions that you have created outside of the NLSF environment.

To access these functions, do the following:

  1. Add the Origin C function to your Code Builder workspace (For information, see Working_with_Files in the Code Builder User's Guide portion of the Programming Help file (Help:Programming)).

  2. Create a header file that prototypes the function(s) that you want to access.

  3. Add this header file to the nlsf.fit template file in your \OriginC\NLSF subfolder .

This is the method by which the parameter initialization functions are included for use in the NLSF. These functions ( min(), yatxmax(), area() etc.) are defined in internal.c and are prototyped in data.h. The data.h header file is included in the nlsf.fit template file and so is included any time you code with Origin C in the NLSF. The internal.c file is a special file that the NLSF loads and adds to your workspace any time you that compile code with Origin C.


Editing the Function

When editing an existing function, the Name text box is not editable. To change the name of a saved function, save the function with a different name using the Save As button.

The function type is selected from the drop-down list. Choose from User-Defined (default) or External DLL.

Select the number of fitting parameters from this drop-down list. This drop-down list is not available once the user-defined function has been saved with user-defined parameters, though the number of parameters will update if new parameters are added to the Parameter Names text box.

Select this check box to define new names for the function parameters.

The names of the parameters are displayed in this text box. If the User Defined Param. Names check box is selected, you can edit your own parameter names in this text box. Otherwise, the parameter names are set by default to: P1, P2, etc. When entering parameter names in this text box, separate the names by commas.

The number of parameters selected from the Number of Parameters drop-down list must correspond with the number of names in this text box.

Note: If you change the parameter names you must also change the function definition in the Definition text box. Note that the following user defined parameter and variable names are not allowed: x1, x2,….xn, y1, y2,…yn, z1, z2,…zn, and the letter i. The letters t, j, and e should also be avoided. Furthermore, there are some system variables that should be avoided. For more information on these system variables, consult the LabTalk Language Reference section of the Programming Help file (Help:Programming) from the Origin menu. You are strongly encouraged to choose parameter and variable names that contain more than one character. If you use a name that is not allowed, you will be prompted to change it when you start fitting.

Specify the names of the independent variables in this text box. Separate parameters by commas.

Specify the names of the dependent variables in this text box. Separate the parameters by commas.

Alter the definition of the function in the Definition text box. To learn about defining your function and compiling it using Origin C, see Defining a New Function.

You can define a fitting function directly in the Definition text box using Origin C code. To do this, your function must be of the form Y-Script or Equation and the Use Origin C check box must be selected.

If your equation is in the Expression form, it will not be recognizable by Origin C. To use the Origin C compiler, you will have to modify your Description to use the Equation or Y-Script form.

If you choose to select the Use Origin C check box, you can enter your Origin C code in the Definition text box, or you can use Code Builder , the Origin C development environment, to write or edit your code. To learn about editing your function in Code Builder and compiling it using Origin C, see Defining a New Function.

If the Use Origin C check box is not selected, you must type your function in the Definition text box.

Select a form for the user-defined function from the Form drop-down list. The drop-down list includes: Expression, Y-Script, and Equations.

Note that if you have written your function to be compiled using Origin C and the Use Origin C check box is selected, the Form drop-down list is not visible. For more information on defining your function so that it is compatible with Origin C, see Defining a New Function.

Click File to display (and edit) the function definition file associated with the function.

When the function definition file is displayed in the text box, the Form button is available. Click this button to exit the viewing mode of the function definition file.

Specifying partial derivatives of your function can reduce the time it takes to perform a set of iterations. However, given the much-enhanced speed of fitting achieved with Origin C, specifying partial derivatives may not be necessary.

For more information on defining your function so that it is compatible with Origin C, see Defining a New Function.

Click Save to save the function modifications in a disk file. The file is named using the text in the Name text box.

The Save As button opens the Save As dialog box.

The Save As button allows you to save the current function under another name. Note that choosing another name assigns this name to both the function name and the disk (.FDF) file. If a function of the same name already exists, the user is prompted to choose a different name.

Click Cancel to discard the function modifications in the Edit Function dialog box.

Editing the Function

The Edit Function dialog box is only intended for editing user-defined functions (for built-in functions, see note below).

Select Function:Edit to edit the selected function. This menu command opens the Edit Function dialog box. This menu command is not available if you have not selected or defined a function.

The Edit Function Dialog Box (see figure)

The Name Text Box

The Type Drop-Down List

The Number of Parameters Drop-Down List

The User Defined Param. Names Check Box

The Parameter Names Text Box

The Independent Var. Text Box

The Dependent Var. Text Box

The Description/Definition Text Box

The Use Origin C Check Box

The Form Drop-Down List (user-defined functions only)

The File/Form Button

The Derivatives Check Box

The Save Button

The Save As Button

The Cancel Button

Note: If you want to modify a built-in function, copy the equation in the Description text box (it is selectable, but not editable) to the Clipboard, choose Function:New from the NLSF menu and paste the equation into the new function Description text box. Then you can proceed to modify the equation and save it with a new name.


Selecting the Data Sets

Each line in this list box includes the following information:

  • VariableName

  • Dep(endent) or Indep(endent)

  • DatasetAssignment,

  • FittingRange

VariableName is the name of the variable. Indep or Dep specifies whether the variable is independent or dependent. DatasetAssignment is the name of the data set to which the variable is assigned. Fitting Range is the data set range used in fitting.

If no data set assignment has been made, the associated section of the line displays question marks. This field updates during data set assignment.

This list box displays the names of all the data sets in the project.

You must assign all the variables to data sets.

The way in which you assign variables to data sets differs depending on whether you are assigning a dependent or an independent variable.

To assign dependent variables to data sets:

  1. Click on the dependent variable you want to assign in the Variables:Datasets list box. The row becomes highlighted. Additionally, the Assign X button becomes unavailable.

  2. Click on the data set name you want the variable assigned to in the Available Datasets list box. The data set becomes highlighted.

  3. Click Assign to assign the variable to the data set.

To assign independent variables to data sets:

  1. Click on the independent variable you want to assign in the Variables:Datasets list box. The Assign X button becomes available.

  2. Click on a data set name in the Available Datasets list box.

  3. There are now two options. If you want the variable assigned to the data set which you highlighted in step b, click Assign. If you want the variable assigned to the ‘x of’ the data set which you highlighted in step b (rather than to the data set itself), click Assign X. The ‘x of’ a data set may have three different meanings: another data set; the data sets associated row numbers, or a defined starting value and a step increment.

This check box allows you to fit multiple data sets to the same function. This check box, as well as the Add Data and Remove Data buttons, and the Parameter Sharing list box, are not available if your function contains more than one dependent variable.

To fit to multiple data sets:

  1. Select the Fit Multiple Datasets check box. The Parameter Sharing list box and the Add Data and Remove Data buttons become available. The Parameter Sharing list box displays all the parameters. If you have not clicked on the Add Data button before, the Variables:Datasets list box still lists all the variables only once.

  2. Click Add Data. This action allows you to fit your function to two data sets, which is reflected in the updated Variables:Datasets list box. There are now two entries for each variable, with each entry being indexed, such as, y(1), y(2), x(1), x(2). Each time you click Add Data, you enable one more data set to be fitted. You can remove them one-by-one by clicking on the Remove Data button.

  3. Assign the variables to data sets. You must assign all the variables in the Variables:Datasets list box to data sets.

  4. To share a parameter among all the data sets, double-click on one or more parameters in the Parameter Sharing list box. “Shared” is displayed next to the parameter name.

If a parameter is not tagged as "Shared”, then there will be a separate “version” of the parameter for each data set.

If a parameter is tagged as “Shared”, there will be only one, common, “version” for all the data sets. For example, suppose your function has three parameters: c, d, and e. You tag only the parameters d and e as "Shared”. Suppose that you want to fit two data sets. In this case you will have the total of four parameters to fit: one “version” of d and one “version” of e (since d and e are shared) and two (one for each data set) “versions” of c (since c is not shared).

Selecting the Data Sets

After selecting a model for fitting, you must select the data sets for fitting and assign the function variables to the data sets. Select Action:Dataset to open the Select Dataset dialog box. Because the number of both the dependent and the independent variables must be known to perform the data set assignments, you must select or define function(s) prior to entering the Select Dataset dialog box.

The Select Dataset Dialog Box (see figure)

The Variables:Datasets List Box

The Available Datasets List Box

The Assign/Assign X Buttons

The Fit Multiple Datasets Check Box


Starting the Fitting

To begin fitting:

  1. From the menu, select Action:Fit. This opens the Fitting Session dialog box.

The Fitting Session Concept


The Fitting Session Concept

The NLSF provides automatic parameter initialization routines for all of the built-in functions. The parameter initialization routine for the selected fitting function can be reviewed in the Parameter Initializations dialog box of the NLSF (Scripts:Parameter Initialization). These routines use the selected dependent and independent data sets to determine appropriate initial parameter values for the selected fitting function.

The parameter initialization routine for a selected function is automatically run when you activate the Fitting Session dialog box. When activated, the Value text boxes display initial values and the graph displays a first guess fit curve in addition to your data. You can also manually run the parameter initialization routine by:

  1. Activating the NLSF Parameter Initializations dialog box.

  2. Clicking the Check button to compile the initialization routine.

  3. Clicking the Execute button to run the initialization routine.

After clicking the Execute button, the Init. Value text boxes should display initial parameter values.

If you are fitting multiple data sets and you have some parameters which are not shared, the different versions of these parameters are denoted with a_#, where a is the parameter.

You can edit the parameter values in the associated text boxes as desired. Every new iteration (or set of iterations) starts from these values.

Each parameter contains a Vary check box. Select this check box to vary the parameter value during the iterative procedure.

Otherwise, the parameter remains fixed at its current value.

If at least one iteration has been done, these list boxes contain the estimates of the standard errors. The error is [image], where [image] is the diagonal element of the variance-covariance matrix.

The variance-covariance matrix is defined as [image], where [image] is the Jacobian [image] (here [image] is the fitting function for the data set values of the independent variables [image], [image], ...).

These list boxes display the parameter dependency. If the equation is overparameterized, there will be mutual dependency between parameters.

The dependency for the ith parameter is defined as [image]. If this value is close to one, there is strong dependency.

Click Chi-Sqr to display the reduced chi^2 value for the current parameter values. The reduced chi^2 value is displayed in the view box at the bottom of the dialog box.

Click 1 Iter to perform one Levenberg-Marquardt (LM) iteration. The new parameter values are displayed in the Parameter Value text box, together with the error and dependency values.

Click n Iter to cause the fitter to perform, at most, n LM iterations. Set the n value from the Max. Number of Iterations drop-down list in the Control Parameters dialog box.

If the tolerance is reached or an error occurs before n iterations have been performed, less than n iterations will be performed. Sometimes the actual number of iterations performed may be zero. This happens if the parameter values cannot be improved any more. The number of iterations actually performed (which improved the fit by decreasing the reduced chi^2 value) is displayed in the view box at the bottom of the dialog box.

Stop the iterations at any time by pressing the ESC key.

Click this button to perform n Simplex iterations. Normally, you will not need to do this because the Simplex method is much less robust and reliable than the LM method. However, if the LM method for a set of data behaves poorly, try the Simplex method.

These buttons enable you to retrieve the values of parameters which the fitter has already gone through. For example, click the < button to display the parameter values that were current before the last iterations.

This view box displays various quantities which change during a fitting session, including: the reduced chi^2 value, the parameter values, the error estimates, and the actual number of iterations performed (before the current iteration).

The Fitting Session Concept

Note: The NLSF always reports the reduced chi^2 value, not chi^2. In some locations of the NLSF, reduced chi^2 is labeled "chi^2". In other locations, it is labeled "chi^2/DoF". In all cases the actual value is reduced chi^2.

The concept of a fitting session is important for your understanding of how Origin’s nonlinear curve fitter works. At each iteration, the fitter computes the Variance-Covariance matrix using its value from the previous iteration.

This matrix depends on:

  • The fitting function.

  • The number of parameters.

  • The data set assignments.

If any of these properties are altered, the current Variance-Covariance matrix is unusable for the altered properties, which means that the fitting session has to end. When a fitting session ends, all the actions that you have selected or defined in the After Fitting dialog box are executed.

Additionally, when a fitting session starts, all the actions that you have selected or defined in the Parameter Initialization dialog box are executed. To make sure that you do not inadvertently end a fitting session, Origin’s nonlinear fitter prompts you for the confirmation of your action by opening an Attention dialog box.

The Fitting Session Dialog Box (see figure)

The Parameter Value Text Boxes

The Vary Check Boxes

The Error List Boxes

The Dependency List Boxes

The Chi-Sqr Button

The 1 Iter(ation) Button

The n Itera(tions) Button

The n Simplex Iter. Button

The < and > Buttons

The View Box


The Fitting Results

This group enables you to create three supplemental curves for each dependent variable.

  • Confidence Band Curves

  • Prediction Band Curves

  • The Residue Plot Button

Select a dependent variable from the Dependent Var. list box. Specify the desired confidence level in the At Confidence text box. Generate the confidence band curves for the selected dependent variable by clicking the Conf. Band button.

The confidence interval for the fitting function says how good your estimate of the value of the fitting function is at particular values of the independent variables [image], [image], ... . You can claim with 100a% confidence that the correct value for the fitting function lies within the confidence interval, where a is the desired level of confidence. This defined confidence interval for the fitting function [image] is computed as:

where f [image], [image] is the number of degrees of freedom, [image] is the bi-tail [image] -distribution value, [image], and [image] is the variance-covariance matrix.

Select a dependent variable from the Dependent Var. list box. Specify the desired confidence level in the At Confidence text box. Generate the prediction band curves for the selected dependent variable by clicking the Pred. Band button.

The prediction interval for the desired confidence level a is the interval within which 100a% of all the experimental points in a series of repeated measurements are expected to fall at particular values of the independent variables [image], [image], ... . This defined prediction interval for the fitting function [image] is computed as:

where f [image], [image] is the number of degrees of freedom, [image] is the bi-tail [image] -distribution value, [image], and [image] is the variance-covariance matrix.

Click this button to generate the residue plot for the selected dependent variable. Residue points represent the difference between the theoretical function and the actual data points.

Click this button to create a separate worksheet containing all the results of your fitting session (parameter values, reduced chi^2 value, errors, etc.). Type the desired worksheet name in the associated text box.

The Parameters worksheet lists the following quantities:

The first n rows of the worksheet list information on the n parameters that were involved in the fitting process. For each parameter, the quantities listed in successive columns are:

a. Name: parameter name.

b. Value: Parameter value obtained in the fitting process.

c. Err: Error on the parameter value.

d. Vary: Whether the parameter was allowed to vary (floating) or was fixed by the user (fixed).

e. LLimit: Lower confidence limit on the parameter.

f. ULimit: Upper confidence limit on the parameter.

LLimit and ULimit are calculated by searching for the values of each parameter p that give an SSR(p) (minimized over the remaining parameters) greater than SSR by a factor (1+F/(N-P)).

SSR(p) = SSR * (1+F/(N-P))

Where F = Ftable(Confidence, 1, N-P) and SSR is the minimum SSR found during the fitting session.

g. Depend: Dependency of the parameter ( a value very close to 1 indicates strong dependency, and therefore, over parameterization).

h. ConfIntv: Confidence interval. Calculated based on a linear approximation and is given by Standard Error * t, where t is the critical value of the t distribution for the given confidence level.

The n rows of parameter information are followed by:

a. ChiSquare: reduced chi^2 value of fit.

b. SSR: sum of squares of difference between data and fit values.

c. Correlation: correlation coefficient (R).

d. COD(R^2): Coefficient of Determination (R^2).

e. MuFinal: final value of diagonal magnification of the curvature matrix.

f. MuMin: smallest value of Mu that was ever reaching during fitting.

g. DerivStep: parameter change amount for calculating derivatives (Derivative Delta).

h. ParaChange: the number of parameters that were allowed to vary during fitting.

i. Tolerance: tolerance value to stop iterations.

j. Confidence: value for deciding confidence bands.

k. Iterations: the number of iterations performed in the last fitting operation.

l. Range1: beginning index of data range used in fitting.

m. Range2: ending index of data range used in fitting.

n. Step: incremental step size used when only a subset of data points were used in the fitting process (Ex. Step =4 means every fourth data point was used).

o. DataPoints: number of data points considered in the fitting process.

p. DOF: no. of degrees of freedom = No. of data points considered - no. of floating parameters (parameters that were not fixed).

q. Constr: the number of constraints that the user enters in the General Linear Constraints text box in the Parameter Constraints dialog box. The Enabled check box has to be selected for the constraints to be counted.

r. ConstrEff: the number of effective constraints. If you type in constraints on a parameter and then fix the parameter value (clear the Vary? check box in the Fitting Session dialog box), those constraints will not be counted.

Click this button to create a separate window containing the variance-covariance matrix. Type the desired window name in the associated text box.

Click this button to create a label on your graph, and paste the fitting results into the label.

Click this button to copy the results to the Results Log.

Dep. Var. The Advanced Fitting Tool supports multiple dependent variables. When such is the case, you must choose a dependent variable from this drop-down list.

Find X/ Find Y. The Find X and Find Y buttons allow you to obtain a dependent variable value given an independent variable value, or obtain an independent variable value given a dependent variable value, respectively, from the fit you perform to the data. These buttons become active only after you perform a fit to the active data set.

Once the fit has been performed and the buttons are active, you can enter a numerical value in the top text box next to the Find X button (entering more than one value in the Find X or Find Y text boxes is not supported), and then press the Find Y button to obtain the corresponding X value. The exact fit equation that resulted from the fitting process is used to compute the Y value for the given X value. You can specify any X value inside or outside of the range of the data set or the fit line for computing the Y value.

To find an X value for a given Y value, you should enter the Y value in the bottom text box next to the Find Y button and then press Find X. When this action is performed, an iterative procedure is used to find the X value corresponding to the given Y value:

  1. First a check is performed to see if the Y value you specified is inside the range of Y values described by the fit line. If not, no computation is done and you are informed that your Y value is out of range.

If the Y value passes this check, then the following steps are performed:

  2. The fit line data set is scanned to find two points (X1,Y1) and (X2, Y2) such that the user-specified Y value lies in the interval [Y1, Y2]. In the case of a fit line that is not monotonic (.ie. multiple X value exist for same Y value), the first interval that satisfies this criterion, starting from the lower end of the X axis, is selected.

  3. The X value of the mid point of this interval is computed: Xm = (X1 + X2) / 2, and the corresponding y-value, Ym, is computed using the exact fit equation

  4. The interval to the right or left of this midpoint is chosen such that the user-specified Y value now falls within the new interval.

  5. This bisectional search is continued till the y-value of the mid point of the interval, Ym, differs from the user-specified Y-value by less than 0.00001%, or until 200 iterations are performed, whichever comes first.

  6. The Xm value corresponding to the final Ym value is reported as the X value corresponding to the y-value you specified.

The Fitting Results

Select Action:Results to open the Generate Results dialog box. Edit this dialog box to create additional curves describing the results of your fitting, as well as to control the display of the fitting results. This dialog box is usually edited after you have found the best parameter values using the Fitting Session dialog box.

The Generate Results Dialog Box (see figure)

The Fit Curve Options Group

The Param. Worksheet Button

The Var-Cov Matrix Button

The Paste Parameters to Plot Button

The Display Parameters in Results Log Button

The Calculate Group


Controlling the Fitting Procedure

Type a value for the tolerance in this text box.

When you click n Iter in the Fit Session dialog box, this causes the fitter to try to perform, at most, n LM iterations of reduced chi^2. If the relative change of the value of reduced chi^2 between two successive iterations is less than the value in the Tolerance text box, less than n iterations are performed. If you want the fitter to perform still more iterations, click on either the n Iter or the 1 Iter button in the Fitting Session dialog box. The n value is specified in the Max. Number of Iterations text box (see below).

Specify the value for the maximum number of iterations performed when the n Iter button is clicked on in the Fitting Session dialog box.

This group determines how the fitter will compute the partial derivatives with respect to parameters for user-defined functions during the iterative procedure. The Derivative Delta group is unavailable for built-in functions as Origin’s curve fitter uses analytical expressions. (Note: You can define a user-defined function with partial derivatives.)

For the user-defined functions, the derivative with respect to the parameter, [image], is computed as (for simplicity, written for a function which has one independent variable):

where Delta is the increment.

If the Fixed Delta check box is selected, the value of Delta used in the computations is the value entered in Delta text box and is the same for all the parameters. The Maximum and Minimum text boxes are then disabled.

If the Fixed Delta check box is cleared (unchecked), then the actual value of Delta for a particular parameter is equal to the current value of the parameter times the value specified in the Delta text box. In this case, use the Maximum and Minimum text boxes to specify the limiting values of the actual Delta in case a parameter value becomes too large or too small. \

It is recommended (at least when you start fitting your new function,) not to select the Fixed Delta check box.

Select values for the display of significant digits for each parameter from the associated drop-down list. Select Free from the drop-down list to use the current Origin setting.

The bottom part of the Control Parameters dialog box enables you to select how different data set points are to be weighted when computing reduced chi^2 during the iterative procedure. Select the desired weighting method from the Weighting Method drop-down list. The choices are: No weighting, Instrumental, Statistical, Arbitrary data set, and Direct Weighting.

If you select the Arbitrary data set method, specify the data set which contains the weighting values for each dependent variable from the Available Datasets list box.

This check box only affects the error on the parameters reported from the fitting process, and does not affect the fitting process or the data in any way.

Leave the check box selected when there are no associated error bars with the data (which is the default - and only - option). In this case, the error on the fit parameters is calculated as SQRT(covii).

Leave the check box cleared when the data has associated error bars and a weighting method has been chosen by you. This is the default, and recommended setting for this check box. In this case, the error on the fit parameters is calculated as SQRT(covii).

When the data has associated error bars and a weighting method has been chosen by you, you have the option to select the check box, thereby multiplying the reported error on the fit parameters by the square root of the reduced chi-squared. In this case, the error on the fit parameters is calculated as SQRT(covii*(Chi^2/DOF)).

If you selected the Arbitrary data set method from the Weighting Method drop-down list, highlight a dependent variable in this list box. Click on the desired data set name in the Available Datasets list box.

Click on the data set name in this list box after selecting the dependent variable in the Dependent Var. list box (for Arbitrary data set weighting method only).

Controlling the Fitting Procedure

Select Options:Control to open the Control Parameters dialog box. Edit this dialog box to specify several quantitative properties of the fitting procedure. These properties directly affect the way the fitter performs iterations.

The Control Parameters Dialog Box (see figure)

The Tolerance Text Box

The Max. Number of Iterations Drop-down List

The Derivative Delta Group

The Parameters Significant Digits Group

The Weighting Method Drop-Down List

The Scale Errors with Sqrt(reduced chi^2) Check Box

The Dependent Var. List Box

The Available Datasets List Box


Setting the Parameter Constraints

In the exponential growth model

the values of the parameter [image] close to zero may cause instabilities. A constraint such as [image] may remedy the problem.

Simple constraints such as lower and upper bounds on the parameters are set in this group. The parameter names are listed in the middle of each row. The Lower Bounds and Upper Bounds text boxes contain the lower and the upper bounds.

If you have not set a particular bound, the corresponding text box is empty. Edit the bounds by selecting the associated check boxes. Click the <= buttons to toggle between <= (less than or equal to) and < (less than). Type the desired value in the text box. Disable a bound by clearing the associated check box.

Impose general linear constraints in the associated text box using the following format (assuming a, b, c, and d are parameters):

a>b;

a+2*b>=c*2-d;

a<b<c;

a/3<9

If there is more than one constraint, separate constraints by a semicolon. To change lines, press CTRL+ENTER.

Because they are nonlinear, the following examples are invalid as constraints :

a^2>c;

a*b>3;

1/b>c+2;

sin(a)<c

Five relational operators are supported: =, <, <=, >, and >=. The curve fitter treats < and <= the same. Likewise > and => are treated the same (this is not true for simple constraints, see above).

You can place multiple operators in a single sentence, such as:

4<a<b<6

which is equivalent to:

4<a; a<b; b<6

Coefficients need not be numeric constants. However, they must evaluate to valid numbers. For example, if the function has two parameters, P1 and P2, you can use a linear constraint such as P1+qw*P2 assuming that you have previously given qw a numeric value.

Temporarily disable constraints by clearing the Enabled check box. Constraints take effect only if the Enabled check box is selected.

Setting the Parameter Constraints

Select Options:Constraints to open the Parameter Constraints dialog box. Impose linear constraints on the parameter values in this dialog box. If the constraints are selected, the fitter chooses only those combinations of parameter values which satisfy the constraints during the iterative procedure.

Use the constraints if the fitting procedure is unstable causing the parameters to wander into wrong parameter regions (For example).

The Parameter Constraints Dialog Box (see figure)

The Lower and Upper Bounds Group


Simulation of Data

This text box displays the name of the data set which will contain the theoretical data points to be generated.

All the dependent variables are displayed in this list box. Click to select a variable to be plotted.

The names of all the parameters are displayed in the list box. Set the parameter values used for plotting the theoretical curve in the associated text box. Click the < and > buttons to browse through the sets of parameter values for which you have already created curves. If you select Action:Fit, the last set of parameter values selected in this dialog box are carried over to the Fit Session dialog box, which enables you to start fitting from these values.

Determine how to plot the theoretical curves for the simulation in the Begin/End group. All independent variables are listed in this view box. Set the lower and the upper limit of the independent variable values by editing the associated Begin and the End text boxes. Select the number of theoretical points in the associated # Points text box. If there is more than one independent variable, then the # Points text boxes must contain the same number for each independent variable. Origin’s fitter generates theoretical curves as follows:

  1. One data set (or column in a worksheet) is created for each independent variable. The number of rows is the same for all of the data sets (columns).

  2. The fitter takes the independent variable values from a row, computes the values of the dependent variable(s), and displays them. The process is repeated for each row.

Click Create Curve to generate the curve.

This check box applies only if there is more than one independent variable. If the check box is selected, the theoretical curve will be simulated on a grid. Note that this way of simulating curves requires much more computer memory (for example, if you have specified 60 points for each of the three independent variables, the use of Matrix Form will create 60x60x60 values, rather than only 60).

Simulation of Data

Select Action:Simulate to open the Simulate Curves dialog box. Features provided in this dialog box are useful when you are uncertain about the initial values of parameters for fitting. You can plot the theoretical function for any parameter values in order to compare the curve with the data. This enables you to get an understanding of which parameter values produce curves that “look like the data”. This is important because reasonably good starting parameter values are in most cases a precondition for fitting success.

The Simulate Curves Dialog Box (see figure)

The Func Dataset Name Text Box

The Dependent Variables List Box

The Parameter Group

The Begin/End Group

The Create Curve Button

The Matrix Form Check Box


Running Scripts at Specified Triggers

Parameter Initialization

After Fitting

Before Fitting


Parameter Initialization

The NLSF provides automatic parameter initialization routines for all of the built-in functions. The parameter initialization routine for the selected fitting function can be reviewed in this dialog box. These routines use the selected dependent and independent data sets to determine appropriate initial parameter values for the selected fitting function.

The parameter initialization routine for a selected function is automatically run when you activate the Fitting Session dialog box. When activated, the Value text boxes in the Fitting Session dialog box display initial values and the graph displays a first guess fit curve in addition to your data.

You can also manually run the parameter initialization routine from this dialog box by:

  1. Clicking the Check button to compile the initialization routine.

  2. Clicking the Execute button to run the initialization routine. After clicking the Execute button, the Init. Value text boxes should display initial parameter values.

You can also edit these parameter values as needed.

If your function contains constants other than the parameter names and the independent or dependent variables, and the values of those constants are not specified in the function definition script or outside the fitter (for example, in the Script window), define these constants in the Constants text box. When you define the constants in this field, you will never have to set them as fixed, because they are automatically set.

The proper procedure to follow when using the Constants text box is to first define your function with the constant parameter names in it using the fitter's Define New Function dialog box. When you type your parameter names in the Define New Function dialog box, do not include the constant parameter names. Instead, define the constant parameters in the Constants text box (in the Parameter Initializations dialog box). Enter the constant parameters in this field as follows: c0=2; <Enter> c1=3; <Enter> and so on. In other words, each constant term and its associated value should be separated by a semicolon (;).

When the fitting process is performed the constants terms will automatically be figured into the calculation, but will not show up in the parameter list for initialization since they are already initialized and set as fixed by entering them into the Constants field.

Note: The following numeric system variables should not be used as constant names: X1...Xn, Y1...Yn, Z1...Zn, and the letter i. There are also LabTalk system variables which should be avoided. For more information on these system variables, see the LabTalk Help file. Furthermore, the letters T, J, and E should be avoided. As a result of these limitations, it is suggested that constant names contain more than one character.

For user-defined fitting functions, you can write your own initialization routines in this text box. If you enter Origin C code (instead of LabTalk script), you must select the Compile check box so that the routine gets compiled when you activate the Fitting Session dialog box. You can also click the Check button to immediately compile the routine to check for syntax errors. The Execute button runs the parameter initialization routine and initializes the fit parameters. Additionally, the routine is automatically run when you activate the Fitting Session dialog box.

For help in writing the Origin C parameter initialization routine for your user-defined function, review the initialization routines provided with the built-in functions. You can review them in the NLSF or you can review the [Parameters Initialization] section of the built-in function's .FDF file.

The parameter initialization routines for the built-in functions call Origin C functions that are defined in the internal.c source file which is located in your Origin \ORIGINC\SYSTEM subfolder. To review these functions, open internal.c in Code Builder (click the Code Builder button [image] on Origin's Standard toolbar and then click the Open button). Notice that some functions such as sort, smooth, and xatymin take a Curve as an argument. Other functions such as min take a Dataset as an argument.

To pass a Curve to a function, use the notation independentVar_dependentVar_curve. For example, if your independent variable is named position and your dependent variable is named amplitude, then pass a Curve to the function using the argument position_amplitude_curve.

To pass a Dataset to a function, use the notation independentVar_data or dependentVar_data. For example, if your dependent variable is named amplitude, then pass a Dataset (in this case, the dependent variable) to the function using the argument amplitude_data.

For more information, see the Programming Help file (Help:Programming).

Note for built-in and user-defined fitting functions that include parameter initialization routines: If a fit drifts off during the minimization process, re-select the Parameter Initializations tab and click the Execute button. This action re-runs the parameter initialization routines and resets the fit.

Code Builder is the Integrated Development Environment (IDE) for Origin C programming. Code Builder provides tools for writing, compiling, linking, debugging, and executing your Origin C programs.

Parameter Initialization

Select Scripts:Parameter Initialization to open the Parameter Initializations dialog box.

Upgrade Note: If the version you are upgrading includes a user-defined fitting function with LabTalk script defined in the pre-7 Parameter Initializations dialog box of the NLSF, then this script will be accessible from the Before Fitting dialog box (Scripts:Before Fit) in the post-version 7 NLSF. Any Origin C code or LabTalk script that you enter on the Parameter Initializations dialog box will be executed after the Before Fitting script when you activate the Fitting Session dialog box.

The Parameter Initializations Dialog Box (see figure)

The Parameter Group

The Constants Text Box


Before Fitting

Select Scripts:Before Fit to open the Before Fitting dialog box. Edit this dialog box to define what you want Origin’s nonlinear curve fitter to do when starting a fitting session.

The Before Fitting Dialog Box (see figure)

Type a LabTalk script in the Scripts to Execute Before Fitting text box for execution when entering a fitting session. The script in this text box will execute before any scripts in the Parameter Initializations dialog box. However, you must select the Enabled check box for the script to execute.

Note: You cannot enter Origin C routines in this dialog box - only LabTalk is allowed. However, you can compile an Origin C function in Code Builder and then call that function using LabTalk. For more information on Origin C, see the Programming Help file (Help:Programming).

Upgrade Note: If the version you are upgrading includes a user-defined fitting function with LabTalk script defined in the pre-7 Parameter Initializations dialog box of the NLSF, then this script will be accessible from the Before Fitting dialog box (Scripts:Before Fit) in the post-version 7 NLSF. Any Origin C code or LabTalk script that you enter on the Parameter Initializations dialog box will be executed after the Before Fitting script when you activate the Fitting Session dialog box.


After Fitting

Code Builder is the Integrated Development Environment (IDE) for Origin C programming. Code Builder provides tools for writing, compiling, linking, debugging, and executing your Origin C programs.

Select the Generate Fit Curve check box to create a new data set which contains the theoretical curve points and display the curve on the graph. Select the X data set source from the associated radio buttons.

Uniform X means that the fitter chooses equidistant points.

Same X as Fitting Data means that the curve is created for the points contained in the original data.

Select the Curves for Each Replica check box to create a separate curve for each replica. The number of replicas is set in the Replicas dialog box.

Note: If you clear the Generate Fit Curve check box and later end the fitting session, the fitting curve that is displayed during the iterative process will be erased.

Select this check box to send the fitting results to the Results Log when ending a fitting session.

Select this check box to create a label on your graph and paste the fitting results onto it when ending a fitting session.

Type a LabTalk script in this text box for execution when ending a fitting session. For example, if you want the fitting results displayed or stored in a particular manner, write a script which performs the task and enter it in this text box.

The script entered in the Scripts After Fitting text box is executed when ending a fitting session only if the Enabled check box is selected.

After Fitting

Select Scripts:After Fit to open the After Fitting dialog box. Edit this dialog box to define what you want Origin’s nonlinear curve fitter to do when ending a fitting session.

Note: You cannot enter Origin C routines in this dialog box - only LabTalk is allowed. However, you can compile an Origin C function in Code Builder and then call that function using LabTalk. For more information on Origin C, see the Programming Guide Help file.

The After Fitting Dialog Box (see figure)

The Fit Curve Group

The Write Parameters to Results Log Check Box

The Paste Parameters to Plot Check Box

The After Fitting Scripts Text Box


Select the number of replicas (“copies”) of the function that you want to use in fitting from the Number of Replicas drop-down list. You must set the number to n - 1, where n is the number of peaks you believe are present in your data.

The Replicate From value shows which parameters are used for fitting multiple peaks for the particular function. For example, in the case of a Gaussian function the parameters are ordered as: xc, w, and A in the function definition file. If the value of Replicate From is 2, that means that the parameters, beginning with the second one (w), will be used in replicas, whereas there will be only one value of the first parameter (xc).

The Replica Size is the number of parameters used in replicas.

Specify if you want some of the parameters in the replicate unit to have the same value for all the peaks by tagging those parameters as shared. Tag a parameter as shared by double-clicking on its name in the Parameter Sharing list box. The meaning of parameter sharing (here) is the analogous to the same feature when fitting multiple data sets.

Select this check box to display the peak curves for each replica after every iteration.

Select this check box if you want each peak curve to be plotted from the common vertical offset.

Fitting Multiple Peaks with Replicas of the Function

Select Options:Replicas to open the Replicas dialog box. Edit this dialog box to fit your data to some of the built-in peak functions by replicating the function into several “copies”, each of which may have different parameters. Use this feature if you believe that your data contain multiple peaks of the same sort (say, Lorentzian) but different centers and/or widths. If the function you have selected does not support replications, this dialog box is disabled.

Edit this dialog box to fit your data to some of the built-in peak functions by replicating the function into several “copies”, each of which may have different parameters.

The Replicas Dialog Box (see figure)

The Replicas Group

The Parameter Sharing List Box

The Generate Peak Curves During Each Iteration Check Box

The Peaks with Baseline Check Box


Initializing the Fitter

Select Action:Initialize to initialize the fitter. This action should be performed after you are done fitting the current data set and before starting a new fitting process in another data set. The initialization resets all settings under the various menu options to the default values.

You need not perform this operation if you are fitting subsequent data sets with the same fitting function, and would like to retain your settings under various menu options.


Using the Fitter with the Network Version of Origin

An Origin client can modify or create a fitting function. If the created function has the same name as a server fitting function, the client function is used for fitting.

To define a new fitting function on an Origin server so that clients can use it, perform the following:

  1. Run the server and create the new fitting function.

  2. On the server, rename the created *.FDF file (in the \FITFUNC folder) from User#.FDF to NewName.FDF where NewName is descriptive of the function.

  3. In the server’s NLSF.INI file, change the default FDF file name for the newly created fitting function from User# to NewName, where NewName is the same descriptive file name.

  4. Copy this line you just modified:

New Function Name = NewName

from the server’s NLSF.INI file to the client’s NLSF.INI file, under the same [FunctionGroup] section.

The client can now use this server-defined fitting function.


Fitting Strategies

Do I need NLSF?

Using the Built-in Functions

Parameter Initialization

When the Fitting Procedure Does Not Converge


Do I need NLSF?

Before even starting Origin’s nonlinear least squares fitter (NLSF), you must determine if you actually need it. If you want to fit a function, such as:

you may be tempted to use NLSF since the function is obviously nonlinear. However, Origin’s NLSF is primarily intended for use with functions which depend nonlinearly on at least one of its parameters. Since the above function is linear in the parameters, you may be better off trying (multiple) linear regression, which is also supplied with Origin.


Using the Built-in Functions

Before deciding to define your own function, make sure that the function you need is not already among the built-in functions. This is very important because of the way the Levenberg-Marquardt chi^2 minimization is implemented in Origin’s NLSF. For user-defined functions, in each iterative step the NLSF computes partial derivatives of the fitting function(s) with respect to parameters in all the data set points. For built-in functions, Origin’s NLSF uses built-in analytical derivatives for the computation of the derivatives, which is more reliable than straightforward numerical computation of the same derivatives. (Note: You can define a user-defined function with partial derivatives.)


Parameter Initialization

An indispensable part of any fitting procedure is a good choice of initial parameter values. The NLSF provides automatic parameter initialization routines for all of the built-in functions. The parameter initialization routine for the selected fitting function can be reviewed in the Parameter Initializations dialog box of the NLSF (Scripts:Parameter Initialization). These routines use the selected dependent and independent data sets to determine appropriate initial parameter values for the selected fitting function.

The parameter initialization routine for a selected function is automatically run when you activate the Fitting Session dialog box of the NLSF (Action:Fit). When this dialog box is activated, the Value text boxes display initial values and the graph displays a first guess fit curve in addition to your data.

You can also manually run the parameter initialization routine by:

  1. Activating the NLSF Parameter Initializations dialog box.

  2. Clicking the Check button to compile the initialization routine.

  3. Clicking the Execute button to run the initialization routine. After clicking the Execute button, the Init. Value text boxes should display initial parameter values.

You can also check and improve initial parameter values using the Simulate Curves dialog box of the NLSF (Action:Simulate). Use this dialog box to plot your theoretical function for any choice of parameters. Thus, you can easily compare your data with the theoretical function for any choice of parameter values. When you find a set of parameter values that generates the curve which closely resembles the data, start the iterative procedure from those values.


When the Fitting Procedure Does Not Converge

It is not uncommon for the iterative procedure to find a relative, rather than absolute, minimum. In this case, the procedure actually converges in the sense that further decrease of reduced chi^2 seems impossible. The biggest problem is that you do not even know if the routine has reached an absolute or a relative minimum. The only way that you can “make” the iterative procedure get to an absolute minimum is to try to start fitting from several different initial parameter values and see what happens. If you always get the same final result, the result is less likely to represent a local minimum.

The most common problem that arises in nonlinear fitting is that no matter how you choose the initial parameter values, the iterations cannot seem to converge in the sense that some, or all, parameter values keep changing with each iteration and eventually diverge producing arithmetic overflow or underflow. This should be a signal for you to do something about the fitting function and/or data you are using. There is simply no one set of parameter values which fits the data best, but rather a continuum of the values.

Here is a typical example:

y=A*exp(x-x0);

No matter what kind of data you have, the iterative procedure will never be able to find a minimum because you have too many parameters! Rewrite your function as:

y=B*exp(x);

where B=A*exp(-x0). In other words, if, during the fitting procedure, the values of A and x0 change so that the combination B=A*exp(-x0) remains the same, the reduced chi^2 value will not change. Any attempt to further improve the fit is a waste of time. There are two simple indications that something is wrong:

  1. The parameter error, as displayed in the parameter list in the Fitting Session dialog box, is very large relative to the parameter value. For example, if the width of the Gaussian is 0.5 while the error is 10, the result for the width is meaningless since no convergence has been reached.

  2. The parameter dependence (for one or more parameters) is very close to one. This is a certain indication that you have to remove (or fix) one of the parameters whose dependency is close to one since the fit does not depend on the parameter (or a combination thereof) very much.

Even when the function is not theoretically overparameterized, the iterative procedure may behave as if it were, due to the fact that the data do not contain enough information for some or all of the parameters to be determined. This usually happens when the data are available only in a limited interval of the independent variable(s). For example, if you are fitting a non-monotonous function such as Gaussian to the data which are monotonous, the NLSF will have a difficult time determining the position of the center, or the width of the peak, since the data obviously describe only one side of the Gaussian peak.

When the Fitting Procedure Does Not Converge

Nonlinear least squares fitting is essentially the minimization of a function of several variables (in this case, the variables the reduced chi^2 function depends on are the parameters of the fitting function). The aim of the minimization procedure is to find the absolute minimum of reduced chi^2. There are several reasons for the minimization procedure to have problems reaching the absolute minimum.

  • Relative Minimum Reached

  • Parameter Values Keep Changing

  • Overparameterized Function

  • Bad Data

Be sure to see the topic, Using Constraints.


Using Constraints

When trying to reach the reduced chi^2 minimum, the Levenberg-Marquardt method carefully chooses the path in the parameter space which should lead to the minimum. However, there are situations when good initial parameter values are hard to find and a small departure can cause the fitter to wander away from the minimum without being able to come back. To prevent that, you may impose linear constraints on the parameters.

For example, if you believe that the reduced chi^2 minimum for a particular case of Gaussian fit corresponds to the Gaussian width being greater than 0.1, you can prevent the fitter from trying too small values of the width w by imposing a constraint w>0.1. Since too small values of the width can easily cause an arithmetic underflow, you may improve the stability of the iterative procedure.


Analysis: Statistics

Descriptive Statistics

  • Statistics on Columns

  • Statistics on Rows

  • Frequency Count

  • Shapiro-Wilk Normality Test

Hypothesis Testing

  • One Sample t-Tests

  • Two Sample t-Tests

  • The Fit Comparison Tool

ANOVA

  • One-Way ANOVA

  • Two-way ANOVA

Multiple Regression

Survival Analysis

  • Kaplan-Meier Estimator

  • Cox Proportional Hazards Model


Descriptive Statistics

Active Window(s): Worksheet.

Menu Command: Descriptive Statistics:Command

Statistics on Columns calculates mean, sd, se, confidence intervals, percentiles, etc., for one or more selected columns of data.

Statistics on Rows calculates mean, sd, se, confidence intervals, percentiles, etc., for one or more selected rows of data.

Frequency Count reports bin centers, counts, upper bin values and cumulative counts.

Normality Test (Shapiro-Wilk) tests the likelihood that a randomly drawn sample is taken from a normal population.


Statistics on Columns

To produce descriptive statistics on worksheet data:

  1. Highlight the desired column(s) or a range of cells

  2. Select Statistics:Descriptive Statistics:Statistics on Columns.

This menu command opens a new worksheet that displays the mean, standard deviation, standard error of the mean, minimum, maximum, range, sum, and number of points for each of the highlighted columns (or ranges) in the active worksheet. The standard deviation and standard error of the mean columns are automatically set as error bars to direct plotting.

The new worksheet contains a Recalculate button to recalculate the statistics data if column values change. By default, the Advanced Statistics check box is selected (advanced statistics include the median, 25th and 75th percentiles (lower and upper quartiles), user-defined percentile (specified in the Percentile text box), Inter Quartile Range, variance, 95% confidence limits on the mean, and Kurtosis). Clear Advanced Statistics and click Recalculate to obtain a reduced set of parameters.

The standard deviation (SD) is calculated as follows:

The standard error of the mean (SEM) is calculated as follows:

See this note on The Percentile with Averaging Text Box on the Graph tab of the Options dialog box.

Note: Columns that are set to Disregard from the Plot Designation drop-down list of the Worksheet Column Format dialog box as well as columns that are set to Text from the Display drop-down list of this dialog box are not used in the calculation)


Statistics on Rows

To produce descriptive statistics on rows of data:

  1. Highlight the desired cells (including columns of data).

  2. Select Statistics:Descriptive Statistics:Statistics on Rows.

This menu command creates a new worksheet displaying the row number, mean, standard deviation, standard error of the mean, minimum, maximum, range, and number of points for the selected data.

For methods of standard deviation and standard error calculation, see Statistics on Columns.

Note: Columns that are set to Disregard from the Plot Designation drop-down list of the Worksheet Column Format dialog box as well as columns that are set to Text from the Display drop-down list of this dialog box are not used in the calculation.


Frequency Count

To determine a frequency count for a column or range of values, select Statistics:Descriptive Statistics:Frequency Count. This menu command opens the Count dialog box in which you specify the From Minimum, To Maximum, and Step Size values. Origin uses this input to create a set of bins, beginning at the minimum value and creating the necessary number of bins based on the step size. Origin then searches each bin, and records the number of times a value is encountered that falls within each bin. If a value falls on the upper edge of the bin, it is included in the next higher bin.

Origin then creates a worksheet with four columns. The first column displays the mid-point value in each bin (BinCtr), the second column displays the number of “hits” observed for each bin (Count), the third column displays the end point of each bin (BinEnd), and the fourth column displays the cumulative count (Sum).

The Results Log displays the Mean, standard deviation (SD), Size, and Median for the selected data. The data are sorted to calculate the median value.


where

and [image] is a weighting factor.

  1. Open the Script window (Window:Script Window).

  2. Assign a value between 0 and 100 to the LabTalk variable ONormTestSL prior to executing the Normality Test menu command.

For example, entering:

ONormTestSL=10 (Press ENTER)

will set the Normality Test significance level to 0.1.

Normality Test (Shapiro-Wilk)

The Shapiro-Wilk Normality Test is used to determine whether or not a random sample of values ( [image] for i = 1 to n) follows a normal distribution. The Normality Test is useful because other statistical tests (such as the t-Test) assume that data is sampled from a normally distributed population. A W statistic and a P value are computed, from which a statistical decision can be made by comparison with a level of significance.

The W statistic is defined as:

The W value reported by Origin is computed using the NAG function nag_shapiro_wilk_test (g01ddc) that implements the Applied Statistics Algorithm AS 181 described in Royston (1982). The function supports sample sizes of [image] . See the NAG documentation for more detailed information.

Performing the Shapiro-Wilk Normality Test

To run the Shapiro-Wilk Normality Test:

  1. Highlight one or more columns of non-text data in a worksheet.

  2. Select Statistics:Descriptive Statistics:Normality Test (Shapiro-Wilk).

The test is performed and the data set name, sample size, W statistic, P value, and decision rule (based on a default significance level of 0.05) is output for each selected data set.

To specify a significance level other than 0.05:


Hypothesis Testing

One Sample t-Tests

Two Sample t-Tests


One Sample t-Tests

The one sample t-Test can either be a one- or two-tailed test depending on the nature of the variable under study and the objectives of the experimenter. The experimenter develops a null hypothesis (H0) that is the logical counterpart, mutually exclusive and exhaustive, to an alternative hypothesis (H1) which the experimenter is attempting to evaluate. Depending on the outcome of the test, the null hypothesis is either rejected or retained. Rejection of the null hypothesis logically leads to acceptance of the alternative hypothesis and retention of the null hypothesis leads to an inability to accept the alternative hypothesis. Two-tailed hypotheses take the form:

H0: and H1:

while one-tailed hypotheses take the form:

H0: and H1: or H0: and H1:

depending on the direction of the test.

The test statistic [image] is used to evaluate the null hypothesis which then allows the indirect evaluation of the alternative hypothesis. The computed test statistic, [image] , has a Student’s t-distribution with [image] degrees of freedom, where [image] and [image] . We reject the null hypothesis H0 (and thereby accept the alternative hypothesis H1) when [image] is extreme enough to cause the observed significance to be less than some pre-specified significance level. We retain the null hypothesis (and thereby fail to accept the alternative hypothesis) when the observed significance is greater than the pre-specified significance level. The observed significance (or P value) is the probability of obtaining a test statistic as extreme or more extreme than [image] due to chance factors alone. The pre-specified significance level is called alpha (a) or just significance level.

In the context of a one sample t-Test, a confidence interval consists of a lower limit and an upper limit that, with some specified degree of confidence, contains the true mean of the population. The degree of confidence (or probability) that a given confidence interval contains the true mean of a population is called the confidence level. The lower and upper limits of a confidence interval are [image] where [image] and [image] are defined as above. The factor [image] is a critical value of [image] from the Student's t distribution indexed at the [image] level and by [image] degrees of freedom. Here alpha (a) is specified by the confidence level where a = 1 - (confidence level/100).

The power of a one sample t-Test is a measurement of its sensitivity. In terms of the null and alternative hypotheses, power is the probability that the test statistic [image] will be extreme enough to allow the rejection of the null hypothesis when it should in fact be rejected (i.e. given the null hypothesis is not true). For each of the three different null hypotheses, power is mathematically defined below.

For H0: ,

For H0: ,

For H0: ,

where [image] is a random variable having a [image] distribution with [image] degrees of freedom, the computation of the test statistic [image] is given above, the terms [image] , [image] , [image] , and [image] are critical values of [image] from the Student's t distribution indexed at the [image] , [image] , [image] , and [image] levels and by [image] degrees of freedom. The computation for hypothetical power is the same as for actual power except that the test statistic [image] , the critical values of [image] , and [image] are recomputed using hypothetical sample sizes instead of the actual sample size.

  1. Highlight the desired worksheet column.

  2. Select Statistics:Hypothesis Testing:One Sample t-Test.

The menu command opens the One Sample t-Test dialog box in which you specify the Sample data set as well as all other test parameters described below. After clicking the Compute button, the test results are output to the Results Log. The results include the sample data set’s name, mean ( [image] ), standard deviation ( [image] ), standard error ( [image] ), and sample size ( [image] ). The test statistic ( [image] ), degrees of freedom ( [image] or [image] ), observed significance ( [image] value), the null (H0) and alternative (H1) hypotheses, and the decision rule of the test are output as well.

If the Confidence Interval(s) and Power Analysis check boxes are selected, then all specified confidence intervals and the actual power of the experiment are output. Checking the Sample Size(s) check box causes a hypothetical power for each specified sample size to also be output.

Select the sample data set on which to perform a one sample t-Test. The sample data is assumed to have been drawn from a population that follows a normal distribution.

Enter the test mean, [image] , in the Null Hypothesis edit box just to the right of Mean =. The value of the test mean displayed in each of the three Alternate Hypotheses updates accordingly.

Select the appropriate radio button for Alternate Hypothesis indicating whether a two-tailed or one-tailed t-Test is to be performed. The direction of the one-tailed t-Test is also specified by the radio button selection. The (in)equality of the Null Hypothesis updates accordingly.

Enter a decimal value greater than 0 and less than 1 for alpha (a) in the Significance Level edit box. The Power Analysis edit box in the Power Analysis group is initialized to the same value of alpha (a) and, if unique, a complementary ([1-a]*100) confidence level is added to the Level(s) in % edit box in the Confidence Interval(s) group.

Select or clear the Confidence Interval(s) check box to determine whether or not confidence intervals are computed.

The Level(s) in % edit box is enabled when the Confidence Interval(s) check box is selected. Enter a comma separated list of confidence levels greater than 0 and less than 100 in the Level(s) in % edit box.

Select or clear the Power Analysis check box to determine whether or not the "actual" power of the t-Test is computed. The Power Analysis edit box (located to the right of its check box) and the Sample Size(s) check box are enabled when the Power Analysis check box is selected.

Enter a decimal value greater than 0 and less than 1 for alpha (a) in the Power Analysis edit box. By default, the Power Analysis edit box is initialized to the same value of alpha (a) that is entered in the Significance Level edit box but it can be modified if desired. The "actual" power computation uses the sample size of the selected sample data and the alpha (a) specified in the Power Analysis edit box.

Select or clear the Sample Size(s) check box to determine whether or not "hypothetical" powers for the t-Test are computed. The Sample Size(s) edit box (located to the right of its check box) is enabled when the Sample Size(s) check box is selected.

Enter a comma separated list of hypothetical sample sizes (positive Integers only) in the Sample Size(s) edit box. A "hypothetical" power is computed for each hypothetical sample size entered. The hypothetical power computation uses the alpha (a) specified in the Power Analysis edit box.

Click the Compute button to perform the indicated computations on the selected sample data set. Control settings (including the Sample) can be changed and the Compute button can be clicked as many times as desired without closing the dialog box. All results are output to the Results Log.

To perform a one sample t-Test:

  1. Open the Origin sample project file ONE SAMPLE T-TEST.OPJ located in the Origin \SAMPLES\ANALYSIS\STATISTICS subfolder. This data file contains 130 observations of normal body temperature (°F), gender (1=male, 2=female), and heart rate (beats/minute).

  2. Highlight the leftmost column of values in the OnePopTtst worksheet and select Statistics:Hypothesis Testing:One Sample t-Test.

  3. Type 98.6 for [image] in the Null Hypothesis edit box and check the Confidence Interval(s), Power Analysis, and Sample Size(s) check boxes.

  4. Accept all other default values and click the Compute button.

One Sample t-Test Results

The observed significance (P value = 2.41063E-7) gives the probability of obtaining a test statistic as extreme or more extreme than [image] by chance alone if the sampled data were in fact drawn from a population having a mean ( [image] ) equal to 98.6°F. Thus, with a two-tailed significance level (or alpha) set at a = 0.05, we reject the null hypothesis and accept the alternative hypothesis. We conclude that the true population mean is not 98.6°F.

In addition, the 99% confidence interval tells us that we can be 99% sure that the limits 98.08111 (lower) and 98.41735 (upper) contain the true population mean. Power analysis (actual power = 0.99965) leads us to conclude that the experiment is very sensitive. Given that the true population mean is not not 98.6°F, it is highly probable that this experiment would correctly reject the null hypothesis (as it did). We might even be able to reduce the sample size (and cost) of similar experiments to 100 (hypothetical power = 0.99693) without loosing much sensitivity. Increasing the sample size to 200 would cause power to approach 1 (with 5 decimal digits of precision) but we would have to incur additional expense and gain little sensitivity.

One Sample t-Tests

A one sample t-Test can be employed to test whether or not the true mean of a population, [image] , is equal to or different than a specified test mean, [image] . The one sample t-Test is performed on a sample data set that is randomly drawn from a population of scores that is assumed to follow a normal distribution.

Theory: One Sample t-Test:

To perform a one sample t-Test:

One Sample t-Test Controls (see figure)

The Sample Combination Box

The Hypotheses Group

The Confidence Interval(s) Group

The Power Analysis Group

The Compute Button

Example: Performing a One Sample t-Test


Two Sample t-Tests

The two sample t-Test can either be a one- or two-tailed test depending on the nature of the variable under study and the objectives of the experimenter. The experimenter develops a null hypothesis (H0) which is the logical counterpart, mutually exclusive and exhaustive, to an alternative hypothesis (H1) that the experimenter is attempting to evaluate. Depending on the outcome of the test, the null hypothesis is either rejected or retained. Rejection of the null hypothesis logically leads to acceptance of the alternative hypothesis and retention of the null hypothesis leads to an inability to accept the alternative hypothesis. Two-tailed hypotheses take the form:

H0: and H1:

while one-tailed hypotheses take the form:

H0: and H1:

or

H0: and H1:

depending on the direction of the test.

The test statistic [image] is used to evaluate the null hypothesis which then allows the indirect evaluation of the alternative hypothesis. We reject the null hypothesis H0 (and thereby accept the alternative hypothesis H1) when [image] is extreme enough to cause the observed significance to be less than some pre-specified significance level. We retain the null hypothesis (and thereby fail to accept the alternative hypothesis) when the observed significance is greater than the pre-specified significance level. The observed significance (or P value) is the probability of obtaining a test statistic as extreme or more extreme than [image] due to chance factors alone. The pre-specified significance level is called alpha (a) or just significance level.

In the context of a two sample t-Test, a confidence interval consists of a lower limit and an upper limit that, with some specified degree of confidence, contains the difference of the true population means. The degree of confidence (or probability) that a given confidence interval contains the difference of the true population means is called the confidence level.

Note: See the separate discussions for independent and paired t-tests below for their respective mathematical definitions of the test statistic [image] and confidence intervals.

The power of a two sample t-Test is a measurement of its sensitivity. In terms of the null and alternative hypotheses, power is the probability that the test statistic [image] will be extreme enough to allow the rejection of the null hypothesis when it should in fact be rejected (i.e. given the null hypothesis is not true). For each of the three different null hypotheses, power is mathematically defined below.

For H0: ,

For H0: ,

For H0: ,

where [image] is a random variable having a [image] distribution with [image] degrees of freedom, the computation of the test statistic [image] is given below, the terms [image] , [image] , [image] , and [image] are critical values of [image] from the Student's t distribution indexed at the [image] , [image] , [image] , and [image] levels and by [image] for the Independent t-Test and by [image] degrees of freedom for the Paired t-Test. The computation for hypothetical power is the same as for actual power except that the test statistic [image] , the critical values of [image] , and [image] are recomputed using hypothetical sample sizes instead of the actual sample size.

Two Sample Independent t-Tests

Two Sample Paired t-Test

For the two sample independent t-Test, the computed test statistic, [image] , has a Student’s t-distribution with [image] degrees of freedom. For samples i=1 and 2 and data points [image] , [image] , [image] is the estimated difference between sample means, [image] , and [image] .

For the two sample independent t-Test, the lower and upper limits of a confidence interval for the difference of the sample means are [image] where the factor [image] is a critical value of [image] from the Student's t distribution indexed at the [image] level and by [image] degrees of freedom. Here alpha (a) is specified by the confidence level where a = 1 - (confidence level/100).

For the two sample paired t-Test, the computed test statistic, [image] , has a Student’s t-distribution with [image] degrees of freedom (assuming an equal number of n data points in each sample). For samples 1 and 2 and data points [image] , [image] , [image] is the estimated difference between sample means, [image] , and [image] .

For the two sample paired t-Test, the lower and upper limits of a confidence interval for the difference of the sample means are [image] where the factor [image] is a critical value of [image] from the Student's t distribution indexed at the [image] level and by [image] degrees of freedom. Here alpha (a) is specified by the confidence level where a = 1 - (confidence level/100).

To perform a two sample t-Test:

  1. Highlight the desired worksheet columns and then select Statistics:Hypothesis Testing:Two Sample t-Test.

The menu command opens the Two Sample t-Test dialog box in which you specify the Sample1 and Sample2 data sets as well as all other test parameters described below. After clicking the Compute button, the test results are output to the Results Log.

The results include the type of test performed (Independent or Paired), the names of the sample data sets, sample means ( [image] and [image] ), standard deviations ( [image] and [image] ), standard errors ( [image] and [image] ), and sample sizes ( [image] and [image] ). The test statistic ( [image] ), degrees of freedom ( [image] or [image] ), observed significance ( [image] value), the null (H0) and alternative (H1) hypotheses, and the decision rule of the test are output as well.

If the Confidence Interval(s) and Power Analysis check boxes are selected, then all specified confidence intervals and the actual power of the experiment are output.

Selecting the Sample Size(s) check box causes a hypothetical power for each specified sample size to also be output.

Select the Independent Test or Paired Test radio button depending on the test type you want to conduct.

The Paired Test type requires that sample 1 and sample 2 have the same number of data points and that the data points are experimentally paired.

Select the sample data sets on which to perform a Two Sample t-Test. The sample data sets are assumed to have been drawn from population(s) that follow a normal distribution.

Enter the estimated difference of the sample means, [image] , in the Null Hypothesis edit box to the right of the text Mean1 - Mean2 =. The value entered for the difference of the sample means is updated in each of the three Alternate Hypotheses.

Select the appropriate radio button for Alternate hypothesis indicating whether a two-tailed or one-tailed t-Test is to be performed. The direction of the one-tailed t-Test is also specified by the radio button selection. The (in)equality of the Null hypothesis updates accordingly.

Enter a decimal value greater than 0 and less than 1 for alpha (a) in the Significance Level edit box. The Power Analysis edit box in the Power Analysis group is initialized to the same value of alpha (a) and, if unique, a complementary ([1-a]*100) confidence level is added to the Level(s) in % edit box in the Confidence Interval(s) group.

Select or clear the Confidence Interval(s) check box to determine whether or not confidence intervals are computed. The Level(s) in % edit box is enabled when the Confidence Interval(s) check box is selected.

Enter a comma separated list of confidence levels greater than 0 and less than 100 in the Level(s) in % edit box.

Select or clear the Power Analysis check box to determine whether or not the "actual" power of the t-Test is computed. The Power Analysis edit box (located to the right of its check box) and the Sample Size(s) check box are enabled when the Power Analysis check box is selected.

Enter a decimal value greater than 0 and less than 1 for alpha (a) in the Power Analysis edit box. By default, the Power Analysis edit box is initialized to the same value of alpha (a) that is entered in the Significance Level edit box but it can be modified if desired. The "actual" power computation uses the sample sizes of the selected sample data sets and the alpha (a) specified in the Power Analysis edit box.

Select or clear the Sample Size(s) check box to determine whether or not "hypothetical" powers for the t-Test are computed. The Sample Size(s) edit box (located to the right of its check box) is enabled when the Sample Size(s) check box is selected.

Enter a comma separated list of hypothetical sample sizes (positive Integers only) in the Sample Size(s) edit box. A "hypothetical" power is computed for each hypothetical sample size entered. The sample sizes entered are considered to be total (aggregate) sample sizes for the Independent Test and individual (separate) for the Paired Test. The hypothetical power computation uses the alpha (a) specified in the Power Analysis edit box.

Click the Compute button to perform the indicated computations on the selected sample data sets. Control settings (including Sample1 and Sample2) can be changed and the Compute button can be clicked as many times as desired without closing the dialog box.

All results are output to the Results Log.

  1. To perform a two sample (independent) t-Test, open the Origin sample project file TWO SAMPLE T-TEST.OPJ located in the Origin \SAMPLES\ANALYSIS\STATISTICS subfolder.

  2. Activate the worksheet TwoPopInd and highlight both columns of values. This data file contains 65 observations of male and female normal body temperature (°F). (The column on the left contains the data for men and the column on the right contains the data for women.)

  3. Select Statistics:Hypothesis Testing:Two Sample t-Test.

  4. Select the Independent Test radio button, and clear the Confidence Interval(s), Power Analysis, and Sample Size(s) check boxes.

  5. Accept all other default values and click the Compute button.

Origin displays the following results:

With the significance level (or alpha) set at a=0.05, we conclude that male and female normal body temperature are different. The observed significance (P value=0.02393) tells us our probability of obtaining a more extreme t-value by chance alone when the normal body temperatures of males and females are not different. Therefore, if we had set our level of significance at 0.01 for this test, we would have concluded that male and female normal body temperature does not differ.

Note: For a description of how to perform and interpret confidence intervals and power analysis, see One Sample t-Tests.

  1. To perform a two sample (paired) t-Test, open the Origin sample project file TWO SAMPLE T-TEST.OPJ located in the Origin \SAMPLES\ANALYSIS\STATISTICS subfolder.

  2. Activate the worksheet TwoPopPair and highlight both columns of values. This worksheet contains observations of two types of percent body fat measurement techniques on 252 men. (One column uses the Brozek body fat technique and the other column uses the Siri body fat technique).

  3. Select Statistics:Hypothesis Testing:Two Sample t-Test.

  4. Select the Paired Test radio button, and clear the Confidence Interval(s), Power Analysis, and Sample Size(s) check boxes.

  5. Accept all other default values and click the Compute button.

Origin displays the following results:

With the significance level (or alpha) set at a=0.05, we conclude that the Brozek and Siri percent body fat measurement techniques are different. The observed significance (P value=3.54206E-7) gives the probability of obtaining a test statistic as extreme or more extreme than t by chance alone when the body fat measuring techniques are in fact not different.

Two Sample t-Tests

A two sample t-Test can be employed to test whether or not two population means, [image] and [image] , are equal (i.e. whether or not their difference is 0, [image] ). The two sample t-Test is performed on two sample data sets that are assumed to have been drawn from populations that follow a normal distribution with constant variance.

Theory: Two Sample t-Test:

Performing a Two Sample t-Test

Two Sample t-Test Controls (see figure)

The Test Type Radio Buttons

The Sample1 and Sample2 Drop Down Lists

The Hypotheses Group

The Confidence Interval(s) Group

The Power Analysis Group

The Compute Button

Example 1: Performing a Two Sample (Independent) t-Test

Example 2: Performing a Two Sample (Paired) t-Test

Note: For a description of how to perform power analysis and interpret confidence intervals, see One Sample t-Tests.


ANOVA

One-Way ANOVA

Two-way ANOVA


One-Way ANOVA

The null hypothesis is that the means of all selected data sets are equal. The alternative hypothesis is that the means of one or more selected data sets are different (not equal).

The test statistic for one-way analysis of variance is the ratio [image] , where [image] , [image] , r is the number of data sets, [image] is the number of data points in the i-th data set, [image] is the mean of the i-th data set, [image] is the global mean of all data points (in all data sets), [image] is the j-th data point in the i-th data set, and [image] is the total number of all data points.

A P value for the computed [image] statistic is then obtained from the F-distribution for the degrees of freedom of the numerator [image] and the degrees of freedom of the denominator [image] . Large values of [image] will lead to small P values. If the P value is smaller than a specified significance level alpha, the null hypothesis is rejected and the decision rule states that the means are significantly different. In other words, at least one of the means is significantly different than the others. If the P value is larger than the specified significance level alpha, the null hypothesis is accepted and the decision rule states that the means are not significantly different.

A general reference for Origin’s one-way analysis of variance is Applied Linear Statistical Models, Neter J., Kutner M., Nachtsheim C., and Wasserman W. (1996), The McGraw-Hill Companies, Inc., Boston, MA. See Sections 16.8 and 16.9.

Tests for equal variance test whether or not two or more population variances (rather than population means) are significantly different. The computation for Levene’s test for equal variance is similar to the computation for the one-way analysis of variance. The equations above are precisely followed except that each [image] is replaced with an [image] where [image] prior to all calculations. The computation for the Brown-Forsythe test for equal variance is also similar to the computation for the one-way analysis of variance. Again, the equations above are precisely followed except that each [image] is replaced with [image] where [image] (where [image] is the median of the i-th data set) prior to all calculations. See Section 18.2 of Applied Linear Statistical Models (1996) for a discussion on tests of equal variance.

Given that an ANOVA experiment has determined that at least one of the population means is statistically different, a post hoc means comparison subsequently compares all possible pairs of population means in the ANOVA experiment to determine which mean (or means) are significantly different. See Sections 17.5, 17.6 and 17.7 of Applied Linear Statistical Models (1996) for a detailed discussion on the Bonferroni, Scheffé, and Tukey post hoc means comparisons. In addition, Origin uses the NAG function nag_anova_confid_interval (g04dbc) to perfrom means comparisons. See the NAG documentation for more detailed information. (When you install Origin, you are provided the option to install the NAG PDF files which document the NAG functions. If you clicked Yes to install these files, a \NAG PDFs folder is created with a subfolder for each library. If you did not install the PDFs, they remain accessible on your installation CD. Furthermore, you can install them at a later date by running the Origin "Add or Remove Files" program.)

The power of a one-way analysis of variance is a measurement of its sensitivity. Power is the probability that the ANOVA will detect differences in the population means when real differences exist. In terms of the null and alternative hypotheses, power is the probability that the test statistic [image] will be extreme enough to allow the rejection of the null hypothesis when it should in fact be rejected (i.e. given the null hypothesis is not true).

Power is defined by the equation:

power = 1 - probf ( f , dfa , dfe , nc )

where f is the deviate from the non-central F-distribution with dfa and dfe degrees of freedom and nc = ssa / mse. Ssa is the sum of squares of the Model, mse is the mean square of the Errors, dfa is the degrees of freedom of the numerator, dfe is the degrees of freedom of the Errors. All values (ssa, mse, dfa, and dfe) are obtained from the ANOVA table. The value of probf( ) is obtained using the NAG function nag_prob_non_central_f_dist. See the NAG documentation for more detailed information.

Contains a list of all non-Text data sets in the Origin project file that are available to be selected. Highlight the desired available data sets and then click the right-arrow toolbar button to select them.

Contains the selected data sets on which an analysis of variance will be performed. Two or more data sets must be selected before you can perform the ANOVA. De-select selected data sets by highlighting them in the Selected Data list box and then clicking the left-arrow toolbar button.

Enter a Significance Level for comparison with the P value when making statistical decisions. The decimal value entered must be greater than 0 and less than 1.

Select or clear the Bonferroni check box determining whether or not the Bonferroni post hoc means comparison is performed.

Select or clear the Scheffé check box determining whether or not the Scheffé post hoc means comparison is performed.

Select or clear the Tukey check box determining whether or not the Tukey post hoc means comparison is performed.

Select or clear the Levene check box determining whether or not Levene’s test for equal variance is performed.

Select or clear the Brown-Forsythe check box determining whether or not the Brown-Forsythe test for equal variance is performed.

Select or clear the Power Analysis check box to determine whether or not the "actual" power of the ANOVA is computed. The Power Analysis edit box (located to the right of its check box) and the Sample Size(s) check box are enabled when the Power Analysis check box is selected.

Enter a decimal value greater than 0 and less than 1 for alpha (a) in the Power Analysis edit box. By default, the Power Analysis edit box is initialized to the same value of alpha (a) that is entered in the Significance Level edit box but it can be modified if desired. The "actual" power computation uses the total sample size of all selected sample data sets and the alpha (a) specified in the Power Analysis edit box.

Select or clear the Sample Size(s) check box to determine whether or not "hypothetical" powers for the ANOVA are computed. The Sample Size(s) edit box (located to the right of its check box) is enabled when the Sample Size(s) check box is checked.

Enter a comma separated list of hypothetical sample sizes (positive Integers only) in the Sample Size(s) edit box. A "hypothetical" power is computed for each hypothetical sample size entered. The sample sizes entered are considered to be total (aggregate) sample sizes. The hypothetical power computation uses the alpha (a) specified in the Power Analysis edit box.

Click the Compute button to perform the indicated computations on the selected sample data sets. Control settings (including selected data sets in the Selected Data list box) can be changed and the Compute button can be clicked as many times as desired without closing the dialog box. All results are output to the Results Log.

  1. To perform a one-way analysis of variance, open the Origin sample project file ONE-WAY ANOVA.OPJ located in the Origin \SAMPLES\ANALYSIS\STATISTICS subfolder.

  2. Activate the Anova1 worksheet and highlight all three columns. Select Statistics:ANOVA:One-Way ANOVA to open the One-Way ANOVA dialog box. The highlighted data sets are automatically moved into the Selected Data list box.

  3. Enter a Significance Level (alpha) of 0.01. Note that the Power Analysis edit box updates and also displays the value 0.01.

  4. Select the Bonferroni check box in the Means Comparison group to enable the Bonferroni post hoc means comparison.

  5. Select the Levene check box in the Tests of Equal Variance group to enable Levene’s test for equal variance.

  6. Select the Power Analysis check box to enable the computation of “actual” power for the ANOVA. If desired, enter an alpha of 0.05 for Power Analysis in the associated edit box (or just accept the ANOVA alpha of 0.01).

  7. Select the Sample Size(s) check box to enable computation of “hypothetical” powers for the ANOVA. Accept the default hypothetical sample sizes which consists of the comma separated list “50,100,200” (total sample sizes).

  8. Click the Compute button to perform the indicated computations.

The One-Way ANOVA is performed. Summary Statistics (including the Null and Alternative hypotheses), an ANOVA table, and a decision rule are output in the Results Log. Similar results for Levene’s test for equal variance are also output. Next, the Bonferroni post hoc means comparison is performed and a comparison of each data set’s mean against the others is output in the Results Log. Finally, both actual and hypothetical powers for the ANOVA are output.

One-Way ANOVA

The one-way analysis of variance can be employed to test whether or not two or more populations have the same mean. One-way analysis of variance assumes that the sample data sets have been drawn from populations that follow a normal distribution with constant variance.

The One-Way ANOVA dialog box includes Levene’s test and the Brown-Forsythe test for equal variance. Computations for actual and hypothetical power and for the Bonferroni, Scheffé, and Tukey post hoc means comparisons are also included.

Theory: One-Way ANOVA

One-way ANOVA Dialog Box Controls (see figure)

The Available Data List Box

The Selected Data List Box

The Significance Level Edit Box

The Means Comparison Group

The Tests for Equal Variance Group

The Power Analysis and Sample Size(s) Check Boxes

The Compute Button

Example: Performing a One-way Analysis of Variance


Two-way ANOVA

A general reference for Origin’s two-way analysis of variance is Applied Linear Statistical Models, Neter J., Kutner M., Nachtsheim C., and Wasserman W. (1996), The McGraw-Hill Companies, Inc., Boston, MA. See Section 22.2 of Applied Linear Statistical Models for a discussion of how to use dummy variables for testing both factor main effects and interaction effects. In addition, Origin’s two-way analysis of variance makes use of several NAG functions. The NAG function nag_dummy_vars (g04eac) is used to create the necessary design matrices and the NAG function nag_regsn_mult_linear (g02dac) is used to perform the linear regressions of the design matrices. The results of the linear regressions are then used to construct the two-way ANOVA table. See the NAG documentation for more detailed information. (When you install Origin, you are provided the option to install the NAG PDF files which document the NAG functions. If you clicked Yes to install these files, a \NAG PDFs folder is created with a subfolder for each library. If you did not install the PDFs, they remain accessible on your installation CD. Furthermore, you can install them at a later date by running the Origin "Add or Remove Files" program.)

Given that a two-way ANOVA experiment has determined that at least one factor level mean is statistically different than the other factor level means of that factor, a post hoc means comparison subsequently compares all possible pairs of factor level means of that factor to determine which mean (or means) are significantly different. See Sections 17.5, 17.6 and 17.7 of Applied Linear Statistical Models (1996) for a detailed discussion on the Bonferroni, Scheffé, and Tukey post hoc means comparisons. In addition, Origin uses the NAG function nag_anova_confid_interval (g04dbc) to perform means comparisons. See the NAG documentation for more detailed information.

The power of a two-way analysis of variance is a measurement of its sensitivity. Power is the probability that the ANOVA will detect differences in the factor level means when real differences exist. In terms of the null and alternative hypotheses, power is the probability that the test statistic [image] will be extreme enough to allow the rejection of the null hypothesis when it should in fact be rejected (i.e. given the null hypothesis is not true).

The Origin Two-Way ANOVA dialog box computes power for the Factor A and Factor B sources. If the Interactions check box is selected, Origin also computes power for the Interaction source A * B.

Power is defined by the equation:

power = 1 - probf ( f , df , dfe , nc )

where f is the deviate from the non-central F-distribution with df and dfe degrees of freedom and nc = ss / mse. Ss is the sum of squares of the source A, B, or A * B, mse is the mean square of the Errors, df is the degrees of freedom of the numerator for the source A, B, or A * B, dfe is the degrees of freedom of the Errors. All values (ss, mse, df, and dfe) are obtained from the ANOVA table. The value of probf( ) is obtained using the NAG function nag_prob_non_central_f_dist. See the NAG documentation for more detailed information.

Enter a Significance Level for comparison with the P value when making statistical decisions. The decimal value entered must be greater than 0 and less than 1.

Select or clear the Interactions check box determining whether or not interaction effects for the two-way ANOVA are computed.

Specify how the levels of each factor will be identified.

  • Select the Datasets radio button if the dependent variable data values for each factor level are grouped into separate data sets.

  • Select the Classification Variables radio button if all dependent variable data values are grouped into one data set and their factor levels are identified by two paired classification variable data sets.

This setting is predetermined by the manner in which the experimental data are organized.

Reports the number of data sets that have been selected.

  • When specifying levels by data sets, two or more data sets must be selected.

  • When specifying levels by classification variables, exactly three data sets must be selected.

Contains a list of all data sets in the Origin project file that are available to be selected. Highlight the desired available data sets and then click the [image] button to select them.

Contains the selected data sets on which an analysis of variance will be performed. De-select selected data sets by highlighting them in the Selected Data list control and then clicking the [image] button.

The first column of the Selected Data list control always contains the names of all selected data sets. Click the Selected Data column header button to highlight or un-highlight all selected data sets. The remaining columns of the list control are determined by the Specify Levels by radio buttons.

If the Specify Levels by Datasets radio button is selected, then two or more data sets must be selected for the remaining list control columns to properly function. The second column of the list control contains the assigned Factor A Level for each selected data set. Click the Factor A Level column header button to assign the level name displayed in the Factor A Level combo box to all highlighted data sets in the list control. The third column of the list control contains the assigned Factor B Level for each selected data set. Click the Factor B Level column header button to assign the level name displayed in the Factor B Level combo box to all highlighted data sets in the list control. Clicking the Factor A Level or Factor B Level column header button also adds the level name displayed in its combo box to the combo box drop-down list for future selection.

If the Specify Levels by Classification Variables radio button is selected, then exactly three data sets must be selected for the remaining list control columns to properly function. The second column of the list control contains the assigned Variable Type for each selected data set. Click the Variable Type column header button to assign the variable type Dependent Variable to the next data set in the list control. There is no third column, but the Switch Factors button < > can be clicked to switch the Factor A and Factor B Classification Variable types.

Enter or select levels in the Factor A Levels drop-down combo box. Entered and selected levels are assigned to the Factor A Level column in the Selected Data list control for all highlighted data sets. Click the Factor A Level column header button to add the displayed level name to the combo box list for future selection.

Enter or select levels in the Factor B Levels drop-down combo box. Entered and selected levels are assigned to the Factor B Level column in the Selected Data list control for all highlighted data sets. Click the Factor B Level column header button to add the displayed level name to the combo box list for future selection.

Select or clear the Power Analysis check box to determine whether or not the "actual" power of the ANOVA is computed. The Power Analysis edit box (located to the right of its check box) and the Sample Size(s) check box are enabled when the Power Analysis check box is selected.

Enter a decimal value greater than 0 and less than 1 for alpha (a) in the Power Analysis edit box. By default, the Power Analysis edit box is initialized to the same value of alpha (a) that is entered in the Significance Level edit box but it can be modified if desired. The "actual" power computation uses the total sample size of all selected sample data sets and the alpha (a) specified in the Power Analysis edit box.

Select or clear the Sample Size(s) check box to determine whether or not "hypothetical" powers for the ANOVA are computed. The Sample Size(s) edit box (located to the right of its check box) is enabled when the Sample Size(s) check box is selected.

Enter a comma separated list of hypothetical sample sizes (positive Integers only) in the Sample Size(s) edit box. A "hypothetical" power is computed for each hypothetical sample size entered. The sample sizes entered are considered to be total (aggregate) sample sizes. The hypothetical power computation uses the alpha (a) specified in the Power Analysis edit box.

Select or clear the Bonferroni check box determining whether or not the Bonferroni post hoc means comparison is performed.

Select or clear the Scheffé check box determining whether or not the Scheffé post hoc means comparison is performed.

Select or clear the Tukey check box determining whether or not the Tukey post hoc means comparison is performed.

Click the Compute button to perform the indicated computations on the selected sample data sets. Control settings (including selected data sets in the Selected Data list control) can be changed and the Compute button can be clicked as many times as desired without closing the dialog box. All results are output to the Results Log.

  1. To perform a two-way analysis of variance, open the Origin sample project file TWO-WAY ANOVA.OPJ located in the Origin \SAMPLES\ANALYSIS\STATISTICS subfolder.

  2. Activate the ByDatasets worksheet and highlight all six columns. Select Statistics:ANOVA:Two-Way ANOVA to open the Two-Way ANOVA dialog box. The highlighted data sets are automatically moved into the Selected Data list control.

  3. Enter a Significance Level (alpha) of 0.05. Note that the Power Analysis edit box updates and also displays the value 0.05.

  4. Select the Interactions check box to enable the computation of interaction effects.

  5. Select the Power Analysis check box to enable the computation of “actual” power for the ANOVA. If desired, enter an alpha of 0.01 for Power Analysis in the associated edit box (or just accept the ANOVA alpha of 0.05).

  6. Select the Sample Size(s) check box to enable computation of “hypothetical” powers for the ANOVA. Accept the default hypothetical sample sizes which consists of the comma separated list “50,100,200” (total sample sizes).

  7. Select the Tukey check box in the Means Comparison group to enable the Tukey post hoc means comparison.

  8. Select the Datasets radio button to specify levels by data set.

  9. Drag or CTRL+click to select all the data sets in the Selected Data list control having the word “Light” in their name, so that they become highlighted. Enter “Light” in the Factor A Level combo box and note the Factor A Level setting for the highlighted data sets becomes “Light”.

  10. Click the Factor A Level column header button and note the item “Light” is added at the bottom of the Factor A Level drop-down combo box.

  11. Repeat steps 9 and 10 for the word “Moderate”, again using the Factor A Level combo box and column header button. Now repeat steps 9 and 10 for the levels identified by the text “100mg”, “200mg”, and “300mg”, but this time using the Factor B Level combo box and column header button instead of the Factor A Level combo box and column header button.

  12. Click the Compute button to perform the indicated computations. The Two-Way ANOVA is performed. Selected data sets and their associated level names and an ANOVA table are output in the Results Log. Next, the Tukey post hoc means comparison is performed on both Factor A and Factor B levels. A comparison of each data set’s (level’s) mean against the others is output in the Results Log. Finally, both actual and hypothetical powers for the sources of the ANOVA (A, B, and A * B) are output.

  13. Click the Selected Data column header button until all selected data sets become highlighted and then click the left-arrow toolbar button removing them from the Selected Data list control.

  14. Drag or CTRL+click to select all three data sets in the Available Data list box having the word “ByVariables” in their name, so that they become highlighted. Click the right-arrow toolbar button adding them to the Selected Data list control.

  15. Click the Classification Variables radio button to specify levels by classification variables. The Selected Data list control updates and the Factor A and B combo boxes disappear. If the three “ByVariables” data sets are listed in the Selected Data list control, they will automatically be assigned initial variable types. If the three data sets are not selected and the variable types are not automatically assigned, repeat step 14.

  16. Click the Variable Type column header button until the data set “ByVariables_TotalChol” is identified as the Dependent Variable. Click the Switch Factors button < > until the data set “ByVariables_Exercise” is identified as the Factor A Classification Variable.

  17. Click the Compute button once again to perform the indicated computations. The data in the “ByVariables” worksheet is identical to the data in the “ByDatasets” worksheet, except for its organization. If all other settings remain the same, the new results should be identical to the previously generated results.

Two-way ANOVA

Two-way analysis of variance (ANOVA) is a widely used statistical technique for studying the effect that independent (or controlled-by-the-experimenter) variables, called factors, have on a dependent (or response) variable. Two-way analysis of variance experiments have two independent factors each of which have two or more levels. Two-way ANOVA tests for significant differences between the factor level means within a factor and for interactions between the factors.

Two-way ANOVA includes several of the basic elements in the Design of Experiments (DOE) which is an important statistical tool in data analysis. In addition to the two-way analysis of variance, the Origin Two-Way ANOVA dialog box includes computations for the Bonferroni, Scheffé, and Tukey post hoc means comparisons and for actual and hypothetical power.

The Origin Two-Way ANOVA dialog box uses a linear regression approach when computing the two-way analysis of variance and consequently supports unequal sample sizes. This is important because designers of experiments seldom have complete control over the ultimate sample size of their studies. However, Origin’s two-way ANOVA does not support empty cells (factor levels with no sample data points). Each of the two factors must have two or more levels and each factor level must have one or more sample data values.

T heory: Two-way ANOVA

Two-way ANOVA Dialog Box Controls (see figure)

The Significance Level Edit Box

The Interactions Check Box

The Specify Levels by Group

The N = Edit Box

The Available Data List Box

The Selected Data List Control

The Factor A Level Comb Box (visible only when specifying levels by data sets)

The Factor B Level Combo Box (visible only when specifying levels by data sets)

The Power Analysis and Sample Sizes Check Box

The Means Comparison Group

The Compute Button

Example: Performing a Two-Way Analysis of Variance


Multiple Regression

To perform a multiple regression on worksheet data, highlight the independent variable columns and select Statistics:Multiple Regression. This menu command opens an Attention dialog box confirming the data set selection and automatic designation. Click OK to perform the multiple regression.

With the first column in the worksheet assumed to contain the dependent variable values (Y), and the highlighted columns assumed to contain the independent variables (X), the multiple regression model is stated:

Origin copies the regression results and the ANOVA table to the Results Log.

, etc. | The parameter estimates and standard errors.
t-value | The t-values for testing if the parameter equals zero, where t = the parameter estimate/standard error of the estimate.
p-value | The corresponding p-values.
R-square | (SYY-RSS)/SYY.
Adj. R-square | 1-[(1-R-square)*(N-1)/(N-k-1)].
Root-MSE | estimated standard deviation.


Survival Analysis

Survival Analysis is used in bio-science and in quality assurance to quantify survivorship in a population under study. Origin includes two widely used techniques - the Kaplan-Meier Product-Limit Estimator and the Cox Proportional Hazards Model. Both techniques compute a survivorship function (the probability of survival to a given time based on a sample of failure times) and a summary of event (failure) and censored values. In addition, the results of the Kaplan-Meier Product-Limit Estimator include survivorship by quartile with upper and lower confidence limits. The Cox Proportional Hazards Model additionally includes covariate parameter estimates with standard error, chi-square statistic, P value, and hazard ratio.

A general reference for Origin’s Survival Analysis features is Applied Survival Analysis: Regression Modeling of Time to Event Data, Hosmer, D.W. and Lemeshow, S. (1999), John Wiley and Sons Inc., New York, NY. \

K aplan-Meier Product-Limit Estimator

Cox Proportional Hazards Model

Click here to view a multi-media demonstration


Kaplan-Meier Product-Limit Estimator

Contains a list of all non-Text data sets in the Origin project file that are available to be selected as Time Variables and Censor Variables. Highlight the desired available data set(s) and then click the appropriate right-arrow toolbar button to select it (them).

Contains the selected Time Variable data set. The Time Variable data set is a sample of event (failure) and censored times. Any unit of time may be used but all time values must be positive and must be expressed as elapsed time (relative to the beginning time of the study) and not be absolute time values (calendar dates and clock times). This data set is paired with the Censor Variable data set and must contain precisely the same number of data values. De-select a selected Time Variable data set by selecting a different Time Variable data set or by clicking the appropriate left-arrow toolbar button.

Contains the selected Censor Variable data set. The Censor Variable data set must contain exactly two unique values (text or numeric) one of which identifies a paired time value as an event (or failure) time and one of which identifies a paired time value as censored. The Censor Variable data set must contain precisely the same number of data values as the Time Variable data set. De-select a selected Censor Variable data set by selecting a different Censor Variable data set or by clicking the appropriate left-arrow toolbar button.

Contains the currently selected Censor Value chosen from one of the two unique values contained in the Censor Variable data set.

The Censor Value identifies which time values in the Time Variable data set are censored. An observation having a censored time value represents some outcome other than failure such as prematurely leaving the study due to chance factors or surviving beyond the completion of the study.

Click the Toggle Censor Value button [image] to choose the Censor Value from one of the two unique values contained in the Censor Variable data set.

Enter a Confidence Level to be used when computing errors for the survivorship function and for the upper and lower limits of the quartile estimates. The decimal value entered must be greater than 0 and less than 1.

Select the Advanced check box if you want the survivorship function output in the Results Log.

Select the Worksheet check box if you want the survivorship function and quartile estimates to be output in a worksheet.

Select the Plot check box if you want a plot of the survivorship function.

Select the Errors check box if you want the errors of the survivorship function to be plotted along with the survivorship function as confidence bands.

Click the Compute button to perform the indicated computations on the selected Time Variable and Censor Variable. All settings can be changed and the Compute button can be clicked as many times as desired without closing the dialog box. Results are output as indicated in the Results Group.

  1. To run the Kaplan-Meier Product-Limit Estimator, open the Origin sample project file SURVIVAL ANALYSIS.OPJ located in the Origin \SAMPLES\ANALYSIS\STATISTICS subfolder.

  2. Activate the Data1 worksheet and select Statistics:Survival Analysis:Kaplan-Meier Estimator to open the Kaplan-Meier Estimator dialog box.

  3. Highlight the data set Data1_Time in the Available Data list box and then click the [image] button.

  4. Highlight the data set Data1_Censor in the Available Data list box and then click the [image] button.

  5. Click the (Toggle) Censor Value button [image] if needed to toggle the selected Censor Value from 0 to 1.

  6. Enter a Confidence Level of 0.90.

  7. Make sure all four check boxes in the Results Group are selected and then click the Compute button.

The Kaplan-Meier Estimator runs, outputting the Summary of Event and Censor Values, the Survivorship Function, and Quartile Estimates in the Results Log and in a Survival worksheet. The Survivorship Function and Confidence Bands (upper and lower confidence limits) are plotted in a SurvivalPlot graph.

Kaplan-Meier Product-Limit Estimator

The computational engine for the Origin Kaplan-Meier Product-Limit Estimator dialog box is the NAG function nag_prod_limit_surviv_fn (g12aac). See the NAG documentation for more detailed information. (When you install Origin, you are provided the option to install the NAG PDF files which document the NAG functions. If you clicked Yes to install these files, a \NAG PDFs folder is created with a subfolder for each library. If you did not install the PDFs, they remain accessible on your installation CD. Furthermore, you can install them at a later date by running the Origin "Add or Remove Files" program.)

An additional reference for the Origin Kaplan-Meier Product-Limit Estimator dialog box is Chapter 2 of Applied Survival Analysis: Regression Modeling of Time to Event Data (Hosmer and Lemeshow, 1999).

Kaplan-Meier Estimator Dialog Box Controls (see figure)

The Available Data List Box

The Time Variable Edit Box

The Censor Variable Edit Box

The Censor Value Edit Box

The Toggle Censor Value Button

The Confidence Level Edit Box

The Results Group

The Compute Button

Example: Running the Kaplan-Meier Product-Limit Estimator


Cox Proportional Hazards Model

Contains a list of all non-Text data sets in the Origin project file that are available to be selected as Time Variables, Censor Variables, and Covariates.

Highlight the desired available data set(s) and then click the appropriate right-arrow toolbar button to select.

Contains the selected Time Variable data set. The Time Variable data set is a sample of event (failure) and censored times. Any unit of time may be used but all time values must be positive and must be expressed as elapsed time (relative to the beginning time of the study) and not be absolute time values (calendar dates and clock times). This data set is paired with the Censor Variable data set and must contain precisely the same number of data values.

De-select a selected Time Variable data set by selecting a different Time Variable data set or by clicking the appropriate left-arrow toolbar button.

Contains the selected Censor Variable data set. The Censor Variable data set must contain exactly two unique values (text or numeric) one of which identifies a paired time value as an event (or failure) time and one of which identifies a paired time value as censored. The Censor Variable data set must contain precisely the same number of data values as the Time Variable data set.

De-select a selected Censor Variable data set by selecting a different Censor Variable data set or by clicking the appropriate left-arrow toolbar button.

Contains one or more selected Covariate data sets. Each Covariate data set is paired with the Censor and Time Variable data sets and must contain precisely the same number of data values. Covariate data set values are Real Numbers but can also be Categorical (e.g. indicate the presence of a condition or characteristic by using the value 1 and the absence of a condition or characteristic by using the value 0; indicate the level of a characteristic by using consecutive integers, etc.).

De-select selected Covariate data sets by highlighting them in the Covariates list box and then clicking the appropriate left-arrow toolbar button.

Contains the currently selected Censor Value chosen from one of the two unique values contained in the Censor Variable data set. The Censor Value identifies which time values in the Time Variable data set are censored. An observation having a censored time value represents some outcome other than failure such as prematurely leaving the study due to chance factors or surviving beyond the completion of the study.

Click the Toggle Censor Value button [image] to choose the Censor Value from one of the two unique values contained in the Censor Variable data set.

Select the Advanced check box if you want the survivorship function output in the Results Log.

Select the Worksheet check box if you want the survivorship function and quartile estimates to be output in a worksheet.

Select the Plot check box if you want a plot of the survivorship function.

Click the Compute button to perform the indicated computations on the selected Time Variable, Censor Variable, and Covariates data sets.

All settings can be changed and the Compute button can be clicked as many times as desired without closing the dialog box. Results are output as indicated in the Results Group.

  1. To run the Cox Proportional Hazards Model, open the Origin sample project file SURVIVAL ANALYSIS.OPJ located in the Origin \SAMPLES\ANALYSIS\STATISTICS subfolder.

  2. Activate the Data1 worksheet and select Statistics:Survival Analysis:Cox Proportional Hazards Model to open the Cox Proportional Hazards Model dialog box.

  3. Highlight the data set Data1_Time in the Available Data list box and then click the [image] button.

  4. Highlight the data set Data1_Censor in the Available Data list box and then click the [image] button.

  5. Highlight the data sets Data1_Gender and Data1_Dose in the Available Data list box and then click the [image] button.

  6. Click the Toggle Censor Value button [image] if needed to toggle the selected Censor Value from 0 to 1.

  7. Make sure all three check boxes in the Results Group are selected and then click the Compute button.

The Cox Proportional Hazards Model runs, outputting the Summary of Event and Censor Values, the Survivorship Function, and Parameter Estimates in the Results Log and in a Survival worksheet. The Survivorship Function is plotted in a SurvivalPlot graph.

Cox Proportional Hazards Model

The computational engine for the Origin Cox Proportional Hazards Model dialog box is the NAG function nag_surviv_cox_model (g12bac). See the NAG documentation for more detailed information. An additional reference for the Origin Cox Proportional Hazards Model is Chapter 3 of Applied Survival Analysis: Regression Modeling of Time to Event Data (Hosmer and Lemeshow, 1999).

Cox Proportional Hazards Model Dialog Box Controls (see figure)

The Available Data List Box

The Time Variable Edit Box

The Censor Variable Edit Box

The Covariates List Box

The Censor Value Edit Box

The Toggle Censor Value Button

The Results Group

The Compute Button

Example: Running the Cox Proportional Hazards Model


Analysis: Advanced Math on Data Sets

Scientific data sets frequently require some "massaging" before they you can perform meaningful analyses on them. At times, you may wish to focus on a subrange of your data in order to exclude meaningless measurements at the front- or tail-end of your data set; Or, you may wish to remove certain data points from a data set that meet -- or fail to meet -- certain criteria; Or you may wish to parse a data plot into subregions so that you can fit a separate curve to each subregion. Periodically, you may wish to mathematically transform your data set in order to remove some background signal or to accentuate variation in your data set.

The purpose of this section is to introduce you to some of the tools that Origin provides for selecting, masking, or transforming your data:


Baseline and Peak Analysis

Origin provides several tools for performing baseline and peak analysis:

 | Fit Multi-Peaks Menu Command | Pick Peaks Tool | Baseline Tool
Summary of Method | Fit either a Gaussian or a Lorentzian function to the data using the Levenberg-Marquardt algorithm. | Finds peaks when the data do not seem to have a definable baseline (i.e. when the peaks appear to follow or overlap each other without intervening flat regions). | Finds peaks and integrates the data from the baseline or from Y = 0.
Peak Determination | Specify the peak positions manually. | Finds the peak positions automatically after specifying search criteria. | Finds the peak positions automatically after specifying search criteria.
Find Areas of Overlapping Peaks | Find areas of overlapping peaks because a fit curve is created for each peak. | Not applicable. | Does not find areas of overlapping peaks because it performs an integration of the data plot. Does not create a fit curve.
Creating Baselines | Does not create a baseline. | Not applicable. | Creates a baseline that can be modified, or uses a data set as the baseline.
Integrating from a User-Defined Baseline | Integration is performed from Y=0. | Not applicable. | Yes.
Baseline Subtraction | No baseline subtraction. | Not applicable. | Yes, and you can undo the subtraction.
For Information, see this topic... | Fitting a Data Plot with Multiple Peaks. | The Pick Peaks Tool. | The Baseline Tool.


This tool can locate both positive and negative peaks in your data plot. Select the desired radio button from this group.

The method for peak picking uses a moving rectangle. If a peak is to be found inside a rectangle, the difference in height between the local data maximum inside the rectangle and the data values at both rectangle ends has to be no less than the rectangle height. The height of the rectangle is the percentage, as specified in the Height text box, of the total amplitude of the data in the range (the amplitude is defined as the difference between the maximum and the minimum of the data). The width of the rectangle is the percentage, as specified in the Width text box, of the total number of points in the data range.

Generally, the smaller the Height and the Width text box values, the more peaks are likely to be found. The width should not be too small, however, since the rectangle must include at least a few points.

The minimum height is the percentage, as specified in the Minimum Height text box, of the total amplitude of the data in the range, that the peak must have, as determined relative to the minimum of the data. The smaller the Minimum Height text box value, the more peaks are likely to be found.

Select the Show Center check box to mark the center of the plotted peak.

Select the Show Label check box to label the data plot with the X coordinate of the center of each peak.

Click this button to perform the peak search based on the specified settings. The peak results are stored in a hidden Peaks# worksheet, where # starts from 1 and increments each time a new data plot is processed.

The Pick Peaks Tool

The Pick Peaks tool is available when a graph window is active. To open the tool, select Tools:Pick Peaks. This tool operates on the active data plot in the graph window. It enables you to find peaks when the data do not seem to have a definable baseline (for example, when the peaks appear to follow or overlap each other without intervening flat regions). The method of peak picking used for this tool does not rely on the smoothness of the data, and is, therefore, somewhat more robust than the Baseline tool.

Pick Peaks Tool Dialog Box Controls (see figure).

The Pick Peaks Group

The Search Rectangle Group

The Minimum Height Text Box

The Display Options Group

The Find Peaks Button


The Baseline Tool

The Baseline tab provides three options for creating a baseline. After clicking the Create Baseline button, the X and Y baseline coordinates are stored in a hidden worksheet named Base#.

The Automatic(ally Find the Baseline) Radio Button

The User-Defined Equation Radio Button

The Use Existing Data Set Radio Button

The Subtract Button

The Undo Subtraction Button

The Modify Button

Select the Automatic radio button to find baseline points based on the baseline detection method selected from the associated drop-down list and the number of points in the # Pts text box. Click the Create Baseline button to create the baseline.

End weighted: This baseline detection method first selects data points from the two ends of the original data set. By default, the number of data points selected is approximately one-quarter of the total number of points of the original data set (one-eighth from each end). Adjacent points in this new set of data (from the ends of the original data set) are then averaged with a large window size, resulting in a smoothed data set. Baseline data points are then constructed by interpolation on the set of points common to the smoothed data set and the "end points" data set. The number of baseline points is determined by the # Pts text box value.

Entire Data w/o Smooth: Adjacent averaging is performed on the data set with a large window size, resulting in a smoothed data set. Baseline data points are then constructed by interpolation on the set of points common to the smoothed data and the original data set. The number of baseline points is determined by the # Pts text box value. This process is extremely sensitive to the distribution of the data. For instance, if the number of points on the baseline is not very large compared to the number of points that fall on the peaks, the baseline will not be well defined. In such cases, you may need to adjust the baseline points using the Modify button.

Entire Data w/ Smooth: The "Entire Data w/o Smooth" algorithm is used, but first the data is smoothed once using the Savitzky-Golay filter.

Positive Peak Algorithm: The peaks are located first, assuming there are only positive ones. The bases of each peak are then connected to form the baseline. This method is fast, but the results may not be very good in many cases.

Select the User Defined Equation radio button to create a baseline for the data plot based on a user-defined equation. Type the equation in the associated text box and then click the Create Baseline button.

If the baseline data is available in a separate data set, you can type the name of that data set in the Dataset text box and then click the Create Baseline button to define the baseline.

Click on the Subtract button to subtract the calculated or user-specified baseline from the data plot.

Click the Undo Subtraction button to undo a baseline subtraction.

Click the Modify button to manually modify the baseline with the Data Reader tool.

  1. Click on a baseline point and drag it to a new position.

If the baseline was created automatically or based on a user-defined equation, the modification to the baseline is stored in the worksheet Base#.

If the baseline was created from existing data sets, the associated data sets will be modified when you move baseline points.

The Peak Properties Group

The Display Options Group

The Find Peaks Button

The minimum width of the peak is the percentage, as specified in the Minimum Width text box, of the total number of points in the data range that the peak must have in order to be recognized as a peak. Generally, the smaller the Minimum Width text box value, the more peaks are likely to be found.

The maximum width of the peak is the percentage, as specified in the Maximum Width text box, of the total number of points in the data range that the peak must not exceed in order to be recognized as a peak.

The minimum height of the peak is the percentage, as specified in the Minimum Height text box, of the total amplitude of the data in the range, that the peak must have (the amplitude is defined as the difference between the maximum and the minimum of the data). The smaller the Minimum Height text box value, the more peaks are likely to be found.

Select the Labels check box to label the data plot with the X coordinates of the center of each peak.

Select the Center Markers check box to mark the center of the peaks found.

Select the Base Markers check box to display markers at the boundaries (bases) of each peak.

Click this button to find both positive and negative peaks in the current data plot. This button should be clicked after the baseline has been defined (The baseline should be defined prior to performing this operation).

The values under the Peak Properties group are used to determine the peak positions in the data plot. A peak is defined as a point where there is a change of sign in the first derivative, which:

  • is above a user-defined distance from the baseline.

  • is flanked by a neighborhood of at least two points on each side where the first derivative is monotonic.

  • The feet of this peak are the points where it meets the baseline.

The peak values are stored in a hidden worksheet name BsPeak#, where # starts from 1 and increments each time a new data plot is processed.

The Peak Properties Group

The Display Options Group

The Find Peaks Button

The minimum width of the peak is the percentage, as specified in the Minimum Width text box, of the total number of points in the data range that the peak must have in order to be recognized as a peak. Generally, the smaller the Minimum Width text box value, the more peaks are likely to be found.

The maximum width of the peak is the percentage, as specified in the Maximum Width text box, of the total number of points in the data range that the peak must not exceed in order to be recognized as a peak.

The minimum height of the peak is the percentage, as specified in the Minimum Height text box, of the total amplitude of the data in the range, that the peak must have (the amplitude is defined as the difference between the maximum and the minimum of the data). The smaller the Minimum Height text box value, the more peaks are likely to be found.

Select the Labels check box to label the data plot with the X coordinates of the center of each peak.

Select the Center Markers check box to mark the center of the peaks found.

Select the Base Markers check box to display markers at the boundaries (bases) of each peak.

Click this button to find both positive and negative peaks in the current data plot. This button should be clicked after the baseline has been defined (The baseline should be defined prior to performing this operation).

The values under the Peak Properties group are used to determine the peak positions in the data plot. A peak is defined as a point where there is a change of sign in the first derivative, which:

  • is above a user-defined distance from the baseline.

  • is flanked by a neighborhood of at least two points on each side where the first derivative is monotonic.

  • The feet of this peak are the points where it meets the baseline.

The peak values are stored in a hidden worksheet name BsPeak#, where # starts from 1 and increments each time a new data plot is processed.

The Integral Curve Group

The Use Base Markers Check Box

The Integrate Group

Select the Not Created radio button to find the area under the curve after clicking either the Use Baseline or From Y=0 buttons.

Select the Add to Graph radio button to find the area under the curve and plot the area data in the current layer after clicking either the Use Baseline or From Y=0 buttons. Rescale the Y axis of the layer to view the area data.

Select the Make New Graph radio button to find the area under the curve and plot the area data in a new default graph window after clicking either the Use Baseline or From Y=0 buttons.

The integration results are sent to the Results Log.

  • The Area column contains the area size under each peak.

  • The Center column contains the center position of the peak.

  • The Height column contains the height of the peak.

Select this check box to include only the region between the base markers when integrating. When this check box is selected, the Add to Graph and Make New Graph radio buttons are unavailable.

Click the Use Baseline button to find the area between the active data plot and the baseline. If the Use Base Markers check box is selected, find the area between the base markers only.

Click the From Y=0 button to integrate to find the area between the active data plot and Y=0. If the Use Peak Markers check box is selected, find the area between the markers only.

The Baseline Tool

The Baseline tool is useful for analyzing peak areas when the data plot has a definable baseline. In addition to picking peaks, it enables you to determine the extent of the peaks and the underlying baseline, as well as to integrate the data from the baseline or from the Y=0 line.

This tool has three tabs: the Baseline tab, the Peaks tab, and the Area tab. The tool is optimally used by first finding the baseline by editing the Baseline tab, and then finding both positive and negative peaks in the data plot by editing the Peaks tab. Finally, areas under the peaks or the entire data plot can be obtained using the Area tab.

To open the Baseline tool:

  1. Click on a graph window to make it active.

  2. Select Tools:Baseline to open the Baseline tool.

Baseline Tool Dialog Box Controls

The Baseline Tab Controls

The Peaks Tab Controls

The Area Tab Controls


Math Operations on Plotted Data

Differentiation and Integration

Differentiating

Differentiating using Savitzky-Golay Smoothing

Integrating


Differentiating

To calculate the derivative of the active data plot, select Analysis:Calculus:Differentiate. Origin calculates the derivative and adds this data to a new Derivative# (hidden) worksheet. Origin then opens an instance of the DERIV.OTP graph template and plots the derivative into this window. Any subsequent derivative operation is plotted into this Deriv window.

The derivative is taken by averaging the slopes of two adjacent data points:


Differentiating using Savitzky-Golay Smoothing

To find the first or second order derivatives for the active data plot, select Analysis:Calculus:Diff/Smooth. This menu command opens the Smoothing dialog box. Specify the Polynomial Order (from 1-9), the Points to the Left, and the Points to the Right, and click OK.

If you select a Polynomial Order greater than 1, the Derivatives On Dataset dialog box opens. Specify the derivative order and click OK. An instance of the DERIV.OTP graph template then opens. The derivative is plotted into this window. The derivative data is saved in a new Smoothed# hidden worksheet, where # is the derivative curve number in the project (starting from 1).

The Diff/Smooth menu command uses the Savitzky-Golay smoothing method that performs a local polynomial regression around each point. Enough information is thus provided to calculate the derivatives of the data set up to an order equal to the order of the polynomial used (in Origin’s case, this order is 2).

This “side-effect” (of the Savitzky-Golay smoothing) is used by the Diff/Smooth menu command to find either the first or second derivative of the active data plot. The derivatives thus calculated are the coefficients of the local polynomials that approximate the data plot.


Integrating

To numerically integrate the active data plot from a baseline of zero using the trapezoidal rule, select Analysis:Calculus:Integrate. The integral is plotted and the resulting area, peak location, peak height (maximum deflection from the X axis), and peak width are written to the Results Log.

The integrated result is stored in the data set _integ_area. Temporary data sets are deleted when the project is printed or saved or are overwritten when another integration is performed. To preserve integration data, the contents of this dataset are saved to a hidden worksheet, following the naming convention Integraln_columnName).

To restore the hidden worksheet and manipulate the data:

  1. Open Project Explorer

  2. Browse the window list and locate the grayed-out Integraln window.

  3. Double-click on the window icon to restore the window.

Note that the creation of this hidden worksheet creates a non-temporary data set which is saved with the .OPJ file.

If you wish to manually copy _integ_area to a non-temporary dataset and view the new data set in the worksheet, type the following script in the Script window (replace MyNewWks_b with your worksheet and column name):

copy -x _integ_area MyNewWks_b (ENTER)

edit MyNewWks_b (ENTER)

Note 1: By convention, reversing the limits of integration changes the sign of the integral. When integrating over an interval [a,b], it is presumed that a<b. Therefore, when a>b (i.e. x column values are in descending order), integration yields a negative area.

Note 2: Origin also supports 3D integration. To compute the volume beneath the surface defined by the matrix, select Matrix:Integrate when a matrix is active. Origin performs a double integral over X and Y to compute the volume and reports the value in the Script window.


Fast Fourier Transform (FFT)

The mathematician Fourier recognized that a periodic function could be described as an infinite sum of periodic functions. In particular, he described the formulas for transforming such periodic functions into sums of harmonics of Sine or Cosine functions. Here is an example of four Sine waves that sum to make a periodic function:

Collectively, the various transform equations are know as Fourier Transform equations. While common use has been to apply these transforms to functions of Time, there is nothing in the equations that implies such a limitation. The transform is referred to as an inverting function in that the units are inverted. Thus, data as a function of Time would be transformed to data as a function of 1/Time (frequency). Similarly, data as a function of oranges/acre would be transformed to data as a function of acres/orange. Often the units are referred to as domains, and the transform is said to display time domain data in the frequency domain (for example).

Real world use of these transforms considers discrete data points rather than continuous functions. The data is sampled at regular periods (the sampling rate or interval) over the interval at which the data repeats (the sampling period). The equations or algorithms for these calculations are called Discrete Fourier Transforms (DFT). The inverse of the sampling period represents a lower limit to the resolution of the transformed data. The inverse of the sampling interval would thus seem to represent an upper limit to the resolution of the transformed data, but - due to the Nyquist sampling theorem - the upper limit is half that. For example:

Measurements are taken at 0.001 second intervals for a period of 0.5 seconds. Since seconds are the period units, then Hz (1/sec.) are the transform units. The lower limit of resolution is 1/0.5 or 2 Hz. The upper limit of resolution is 1/2 of 1/0.001 or 500 Hz. We should therefore be able to examine the frequencies in the data in steps of 2 Hz up to 500 Hz.

The Real component of a Fourier transform is symmetrical about the center while the Imaginary component exhibits negative symmetry about the center. The Fourier zero value is variously referred to as the 'Zero Frequency' value, the DC component, and the Mean or Average value.

The time it takes to calculate the DFT increases exponentially as more data points are considered. For the past 50 years or so, mathematicians have exploited redundancies and symmetries in the DFT to reduce computation time. The results of their efforts are collectively called Fast Fourier Transforms (FFT). The fastest of these FFTs are based on equations when the number of data points happens to be an integral power of 2.


Origin and FFT

Origin and the FFT

The first step in Origin's calculation of the FFT is to make the number of data points an integral power of 2. Origin does this by extending the X data set using the existing step values of X until there are 2^N points and setting all the new Y values to zero, or by truncating the length of a data set until there are 2^N points. The changed sample period results in a slight change in resolution, while the same sampling interval yields the same maximum. The algorithm is based on the initial data set size as follows:

Data Size | Excess Power of Two | Action
0 to 511 | Any | Always pad to next power of two
512 to 2047 | less than 5% over | Truncate - otherwise pad
2048 to 8192 | less than 10% over | Truncate - otherwise pad
8192 to 16383 | less than 20% over | Truncate - otherwise pad
>16383 | less than 30% over | Truncate - otherwise pad

For example:

Given | Next Lowest 2^N | Percent Cutoff Point | Action
2252 points | 2048 | 2048+.1*2048=2252.8 | Truncate to 2048
2253 points | 2048 | 2048+.1*2048=2252.8 | Pad to 4096

If you want to use interpolation to first get an exact power of two, then you must first plot the data as a line plot and then use the Analysis:Interpolate/Extrapolate menu command to generate an equal-spaced data set of however many 2^N points you need. Use the FFT on the new data set.

The FFT Tool presents a number of options for performing an FFT, including Forward, Backward, Amplitude, Power, Normalization, Shifting and Phase Unwrapping as well as four 'windowing' functions for enhancing resolution. Some of these options only affect the display of data and some affect magnitudes - in particular, use of Windowing options include scaling factors which are not easily removable or reversible. While the Fourier Transform is its own inverse, most practical implementations of the DFT and the FFT include a sign difference in the imaginary part of its results. Origin makes this difference a selectable option.

The Origin FFT calculates the Real, Imaginary, Complex , Phase and Power components. The plots used by the Forward FFT are (by convention) vs. Frequency. The plots used by the Backward FFT are vs. Time. The complex result in the 'r' column is derived from the square root of the sum of the squares of the Real and Imag(inary) columns. The phase angle in the 'Phi' column is derived from the angle whose tangent is Imag/Real with corrections for quadrant based on the phase unwrap option. The Power is derived from the Real^2/N, where N is the number of points.

There is no difference in the worksheets created by selecting either Amplitude or Power. The complex or 'r' column is displayed in plots of Amplitude while the Power column is displayed in plots of Power.

Normalization in a Forward FFT divides the Real results by N/2 (both AC and DC components). Normalization in a Backward FFT divides the Real results by 2, except for the DC component which is left unchanged.

Shifting will change the X scale and adds an additional data point that duplicates the first (completing a natural symmetry). The unshifted results are 0 to a maximum, while the shifted results are between plus and minus a half-maximum.

By Phase wrapping, Origin keeps the phase angle between plus and minus 180 degrees. Unwrapping the phase allows the angle to vary outside those limits based on the sign changes of the real and imaginary columns.

For more information on FFT, search the OriginLab Knowledge Base on "FFT".


FFT and the NAG Libraries

Origin includes a number of the NAG function libraries, including c06 - Fourier Transforms. Reference information is provided on the NAG libraries in the Origin C Reference Help file (Help:Programming:Origin C Reference).

When you install Origin, you are given the option to install the NAG PDF files which document the NAG functions. If you clicked Yes to install these files, a \NAG PDFs folder is created with a subfolder for each library. If you did not install the PDFs, you can still open them from your installation CD. If you did not install them, you can do so at any time by running the Origin "Add or Remove Files" program.

To help you get started calling NAG functions from Origin C functions, a number of sample Origin projects and associated source files are included in your Origin \SAMPLES\PROGRAMMING subfolders.

Those related to FFT include:

\NAG 2D FFT\

\NAG FFT Convolution\

\NAG FFT Lowpass\

\NAG STFT\


Troubleshooting Problems with FFT

Problem: After selecting Analysis:FFT, an Attention box opens displaying the message “Sampling resolution test failed! Please check your data and set the sampling interval in FFT settings.”

Response: This error message displays when the sampling rate (interval between each X or time value) changes. Among its other restrictions, the FFT requires that sampling data be equally spaced. Although the FFT algorithm will operate on data not equally spaced, it will produce incorrect results.

A small change in sampling rate could be due to instrument instability during data collection. This kind of fluctuation will not have a significant effect on the results of the FFT. However a larger change in sampling rate, such as a data spike, will produce incorrect results.

The sampling interval used to perform the FFT is calculated using only the first few cells of X data. If there is a spike in this data range, it can result in the sampling rate being set incorrectly on the FFT tool’s Settings tab. If this is the case, type the correct sampling rate value in the Sampling Interval text box on the Settings tab before performing the FFT. This will allow for accurate results to be calculated.

Problem: When I do an FFT of a known SINE wave, I don't get a perfect amplitude peak at my known frequency.

Response: When you look at the result of an FFT, you can think of it as looking at the 'true' FFT through a picket fence. Changing the picket spacing or shifting your viewpoint will give you a slightly different, but equally valid view. The number of points in the original data set and the sample period will have analogous effects on the FFT. To get the ideal situation asked for, the sample would have to represent one (or more) complete periods with exactly 2^n points of data.

Problem: When I do a Backward FFT of my Forward FFT, I don't get my original data.

Response: The settings for Origin 3.x were such that clicking the Inverse FFT button on the FFT Template returned the original data set (plus any padded points). The correct procedure in 4.x through 7.x is as follows:

  1. Do the Forward FFT with Normalization and Shift OFF (unchecked).

    The Complex result will be plotted along with Phase. You can modify the Real and Imag values in the FFT worksheet to do Frequency Domain Filtering.

  2. Select Real and Imag from the FFT results worksheet and do the Backward FFT with Normalization and Shift OFF (unchecked).
    The Complex result will be plotted along with Phase.

  3. The Real column of the IFFT results worksheet will be the same as the original data set (plus any padded zero values).


Using the FFT Tool

The FFT Group

The Spectrum Group

The OK Button

The Cancel Button

Select the Forward radio button to perform a forward FFT calculation when you click OK.

Select the Backward radio button to perform a backward FFT calculation when you click OK.

Select the Amplitude radio button to plot amplitude and phase data.

Select the Power radio button to plot the power spectrum and phase data.

Click OK to perform an FFT. The resulting data is displayed in a new worksheet and graph window.

Click Cancel to close the tool.

The Sampling Text Box

The Real Text Box

The Imaginary Text Box

The Sampling Interval Text Box

The Window Method Group

The Output Options Group

The Exponential Phase Factor Group

Type a data set to be used for time or frequency information. By default, the X data set of the active data plot (or the worksheet’s X column) is selected as the sampling data set.

Type a data set to be used as the real component for the FFT calculation. By default, the Y data set of the active data plot is selected as the real data set.

Type a data set to be used as the imaginary component for the complex FFT calculation. If no data set is specified, a real FFT will be performed.

Type the time or frequency interval to be used in the FFT calculation. Increase this value if a Time Resolution error occurs.

Select the window method to be used in the FFT calculation.

Rectangular Window

for [image] and zero otherwise.

This is the window function used in pre-4.0 versions of Origin.

Using appropriate window functions other than the rectangular window can enhance the spectrum resolution.

Welch Window

Hanning Window

Hamming Window

Blackman Window

Select the Normalize Amplitude check box to perform amplitude normalization. The effect on the FFT result is to divide the amplitudes of the DC and AC components by N/2, where N is the number of data points. This will reveal the true amplitudes in the original data set. This occurs because we know that [image] . Thus, when a time domain data set is transformed into the frequency domain by FFT, each component splits into two frequencies, a positive one and its negative image. The amplitude of each of these frequencies is N/2 times that of its original component.

To calculate the mean of the data set, divide the DC component by 2.

The Shift Results check box determines how the transformed data will be presented. If the check box is cleared, the transform is displayed for positive frequencies only, similar to displaying the phase in the range of 0° to 360°. This is in better agreement with the normal definition of DFT. If the check box is selected, the transform is shifted around to be displayed with both positive and negative frequencies centered at zero, similar to displaying the phase in the range of –180° to +180°. There is one extra frequency point involved in this presentation. Some symmetrical properties of FFT can be better seen in this form.

Select the UnWrap Phase check box to keep the phase unwrapped, to maintain the true phase data. By default, phase data is wrapped so that it is defined in the range of –180° to +180°.

Select the Electrical Engineering or Science convention to set the sign of the Exponential Phase factor for the FFT operation.

If you select the Science option, the phase factor will be set according to the formulae listed in page 503 of Numerical Recipes in C, 2nd edition.

If you select the Electrical Engineering option, the phase factor will be of opposite sign compared with the Science option. The two definitions give the same real components, but their imaginary components and the phase angle will have opposite signs.

After clicking OK on the Operation tab of the FFT tool, Origin performs the FFT and appends the results to two new windows: a graph and worksheet window.

The FFTPlotn graph window displays the amplitude and phase information for the transformed data. Because Origin’s FFT assumes that the independent variable (X data set) is time (in seconds) and that the dependent variable (Y data set) is some sort of amplitude, the X axis for the FFT graph window will be scaled in units of Hz. If your data is not time-series data, you will need to re-label your axis.

The FFT worksheet window contains the frequency data, the real and imaginary parts of the transformed data, the polar form of the transformed data, and the power spectrum data.

The frequency column is obtained from the time data set as follows: If the time separation between successive abscissas is D t, then the nth frequency datum is:

If the time data are given by the row index, then D t is simply unity.

If there are N input data points, the frequency domain will also have N points with the maximum frequency, [image] equal to [image] where Dt is the time step between points. If the Shift Results check box on the Settings tab of the FFT tool has been cleared, the unshifted transform displays from 0 to [image] . Otherwise, the shifted transform displays from [image] to [image] .

Using the FFT Tool

To perform a fast Fourier transform (FFT) on highlighted data in the worksheet or on the active data plot, select Analysis:FFT. This menu command opens the FFT tool that allows you to prepare the data and choose the real, imaginary, and time components for the calculation. Origin’s FFT assumes that your independent variable (X data set) is time and that your dependent variable (Y data set) is some sort of amplitude.

FFT Tool Controls

The Operation Tab

The Settings Tab

Discussion of FFT Tool Results


Performing a Backward FFT

Origin allows you to apply a backward (or inverse) FFT on the FFT result to transform back the original data set. Thus, you can apply a backward FFT on the Freq(X), Real(Y), and Imag(Y) data sets in the FFT results worksheet. In principle, this should transform the FFT result back to its original data set. However, this claim is valid only for the FFT results when both the Normalize Amplitude and Shift Results check boxes are cleared when first applying FFT to the (original) data set.

Otherwise, if the Normalize Amplitude check box is selected when performing the FFT, the amplitude ratio between AC and DC components will be distorted by a factor of 2. Additionally, if the Shift Results check box is selected when performing the FFT, the FFT results will be in a computationally wrong order and, furthermore, the total number of frequency points is incorrect. Consequently, in this situation the backward FFT will not get the FFT result back to its original data.


FFT Mathematical Descriptions

Discrete Fourier Transform (DFT)

Fast Fourier Transform (FFT)

Power Spectrum Estimation Using FFT


Discrete Fourier Transform (DFT)

For a data set [image] with index [image] in the range [image] , ( [image] can be real or complex numbers), the (forward) Discrete Fourier Transform (DFT) is defined to be:

where [image].

Note that DFT transforms N complex numbers [image] (real numbers are complex numbers with imaginary components having zero values) into N complex numbers [image] . Also note that DFT involves only the data values and their indices. Other variables associated with the data (such as time) are not needed in the calculation. In practice, DFT is often performed on data collected at an equal (time) interval [image] . It is easy to convert the index into “time” [image] , and [image] into “frequency” [image] .

The inverse (backward) Discrete Fourier Transform (DFT) is defined to be:

The formulae for forward and inverse DFT presented here follow the phase convention used in Electrical Engineering. It differs from the definition in Numerical Recipes in the sign of the phase factor in the exponent. The FFT definition in Numerical Recipes follows:

The two definitions give the same real components, but their imaginary components have the opposite sign. You can select between the Engineering and Science phase conventions in Origin under the Settings tab of the FFT interface.

Parseval’s theorem can be used to check the results of DFT:


Fast Fourier Transform (FFT)

Every efficient algorithm of DFT can be called an FFT. Origin implements the Danielson-Lanczos method (see references). Danielson and Lanczos showed that if the total number of data points [image] is an integer power of 2, the DFT of these [image] numbers can be rewritten as the sum of two DFTs, each of length [image] :

where [image] . We can use the Danielson-Lanczos Lemma recursively, thus reducing the calculation to ~ [image] , compared to ~ [image] required by DFT.


Power Spectrum Estimation Using FFT

The FFT of a set of sampled data is not the true Fourier transform of the process from which the data was obtained. The discrete data is obtained effectively by a window function [image] which selects a finite-length (N samples) of [image] from the continuous signal:

sampled data

( [image] for n outside the range [image] )

The FFT of the sampled data is:

An estimate of the power spectrum is:

, which is also called periodogram.

Some of the popular window functions are listed below:

Rectangular Window:

for [image] and zero otherwise. This is the window function used in pre-4.0 versions of Origin.

Using appropriate window functions other than the rectangular window can enhance the spectrum resolution.

Welch Window:

Hanning Window:

Hamming Window:

Blackman Window:


Correlation using the FFT

To measure the correlation between two columns of data, highlight the desired data (independent of column designation) and select Analysis:Correlate. Origin adds two columns to the rightmost position in the worksheet. The left column holds the resultant lag or index variables, and the right column holds the correlation result.

The absolute value of the correlation result will be large when the leftmost data set is exactly shifted to the right or to the left of the second data set by the lag value.

To learn more about correlation, review the FFT CORRELATION.OPJ project located in your Origin \SAMPLES\ANALYSIS\FFT folder.


Convolution using the FFT

The convolution of two data sets is a general process that can be used for various types of data smoothing, signal processing, or edge detection. The leftmost data set, the signal data set, is convolved by the second data set, the response data set. The response data set should meet the following requirements:

  • The response data set should consist of an odd number of points and be a representative sample of a symmetric function.

  • The number of points, r, in the response data set must be less than half the number of points, s, in the signal data set. (The last r points, and, to a lesser extent, the first r points, of the s points in the result are of no value. Therefore, 2*r should be much less than s.)

  • The sum of the points in the response curve should be unity in order to retain the amplitude of the original data set. Otherwise the convolution result will be scaled by a factor equal to the sum.

To avoid possible artifacts from the FFT (performed as part of the convolution process), you should pad the signal data with zero values until you have an integral power of two number of points. You will also need to extend your X data accordingly.

To convolve a data set with a response data set, highlight both data sets and select Analysis:Convolute. Origin adds two columns to the rightmost position in the worksheet. The left column holds the index variables, and the right column holds the convolution result.

To learn more about convolution, review the FFT CONVOLUTION.OPJ project located in your Origin \SAMPLES\ANALYSIS\FFT folder.

Note: Origin 7 includes a number of the NAG function libraries, including c06 - Fourier Transforms. Reference information is provided on the NAG libraries in the Origin C Reference Help file (Help:Programming:Origin C Reference). Furthermore, when you install Origin, you are provided the option to install the NAG PDF files which document the NAG functions. If you clicked Yes to install these files, a \NAG PDFs folder is created with a subfolder for each library. If you did not install the PDFs, they remain accessible on your installation CD. Furthermore, you can install them at a later date by running the Origin "Add or Remove Files" program.

To help you get started calling NAG functions from Origin C functions, a number of sample Origin projects and associated source files are included in your Origin \SAMPLES\PROGRAMMING subfolders. Those related to FFT include:

\NAG 2D FFT\

\NAG FFT Convolution\

\NAG FFT Lowpass\

\NAG STFT\


Deconvolution using the FFT

Deconvolution is a process that can undo the “blurring” obtained after convoluting data. While convolution is the product of the signal and response data sets, deconvolution is achieved by dividing the known convolution by the response data set.

The response data set should meet the following requirements:

  • The response data set should consist of an odd number of points and be a representative sample of a symmetric function.

  • The number of points, r, in the response data set must be less than half the number of points, s, in the signal data set. (The last r points, and, to a lesser extent, the first r points, of the s points in the result are of no value. Therefore, 2*r should be much less than s.)

  • The sum of the points in the response curve should be unity in order to retain the amplitude of the original data set.

To avoid possible artifacts from the FFT (performed as part of the deconvolution process), you should pad the signal data with zero values until you have an integral power of two number of points. You will also need to extend your X data accordingly.

To deconvolve a data set with a response data set, highlight both data sets (the convolved data set should be on the left, the response data set on the right) and select Analysis:Deconvolute. Origin adds two columns to the rightmost position in the worksheet. The left column holds the index variables, and the right column holds the deconvolution result.

To learn more about deconvolution, review the FFT DECONVOLUTION.OPJ project located in your Origin \SAMPLS\ANALYSIS\FFT folder.


Data Smoothing and Filtering

Origin provides the following data smoothing and filtering options:

  • Smoothing using Savitzky-Golay filtering.

  • Smoothing using adjacent averaging.

  • FFT filter smoothing.

  • Digital filtering using low pass, high pass, band pass, band block, and threshold filters.

The three smoothing methods are available from the Analysis:Smoothing menu, or from the Smoothing tool (Tools:Smooth). The smoothed data is placed in a newly created (hidden) worksheet named Smoothedn. The window label reports the type of smoothing that was performed. Additionally, the smoothed data plot is added to the active layer of the graph. The Smoothing tool allows you to replace the original data instead of creating a new worksheet.

Smoothing using Savitzky-Golay Filtering

Smoothing using Adjacent Averaging

FFT Filter Smoothing

Using the Smoothing Tool

Digital Filtering


Smoothing using Savitzky-Golay Filtering

The Savitzky-Golay filter method essentially performs a local polynomial regression to determine the smoothed value for each data point. This method is superior to adjacent averaging because it tends to preserve features of the data such as peak height and width, which are usually ‘washed out’ by adjacent averaging.

To smooth the active data plot using the Savitzky-Golay filter method:

  1. Select Analysis:Smoothing:Savitzky-Golay.

This menu command opens the Smoothing dialog box. The degree of the underlying polynomial has a default value of 2, with an upper limit of 9. This parameter allows you to improve the fitting/differentiation (For an illustration of the effect of this parameter on smoothing, see Numerical Recipes in C by Press et. al., Second Edition, Fig. 14.8.2, page 654).

  2. To alter this value, select the desired value from the drop-down list.

Origin includes a function to calculate a large number of Savitzky-Golay coefficients, allowing you to have large windows ( ~ 100 points). Further, you can make the windows asymmetric about a particular data point. For example, the number of points to the left of the point of interest can be different from the number to the right. Make your selection from the associated drop-down lists.


Smoothing using Adjacent Averaging

To smooth the active data plot by averaging adjacent data points:

  1. Select Analysis:Smoothing:Adjacent Averaging. This menu command opens the Smoothing dialog box.

  2. Specify a number that controls the degree of smoothing.

If you enter an odd number n, then n points are used to calculate each averaged result.

If you enter an even number m, then m+1 points are used to calculate each averaged result.

The smoothed value at index i is the average of the data points in the interval [i-(n-1)/2, i+(n-1)/2], inclusive.


FFT Filter Smoothing

To smooth the active data plot by FFT filtering:

  1. Select Analysis:Smoothing:FFT Filter.

This menu command opens the Smoothing dialog box in which you specify how many data points at a time to be considered by the smoothing routine.

Click here to view a multi-media demonstration

The smoothing is accomplished by removing Fourier components with frequencies higher than:

where n is the number of data points considered at a time, and Dt is the time (or more generally the abscissa) spacing between two adjacent data points.

Note 1: The function used to clip out the high-frequency components is a parabola with its maximum of 1 at zero frequency and falling to zero at the cutoff frequency defined above. The parameters of this parabolic clipping function are determined by the total number of points and the number of points considered at one time. The more points considered at one time, the greater the degree of smoothing. A value of zero for this parameter will leave the data unsmoothed.

Note 2: The various FFT filtering techniques (Low/High Pass, Band Pass, etc.) are not affected by data masking.


Using the Smoothing Tool

The Results Group

The Savitzky-Golay Group

The Average/FFT Text Box

Select the Replace Original radio button to replace the raw data plot with the smoothed data.

Select the Create Worksheet radio button to create a new hidden worksheet containing the smoothed data.

The degree of the underlying polynomial (Polynomial Degree) has a default value of 2, with an upper limit of 9. This parameter allows you to improve the fitting/differentiation. Select the desired value from the associated control. (For an illustration of the effect of this parameter on smoothing, see Numerical Recipes in C by Press et. al., Second Edition, Fig. 14.8.2, page 654.)

Origin includes a function to calculate a large number of Savitzky-Golay coefficients, allowing you to have large windows ( ~ 100 points). Further, you can make the windows asymmetric about a particular data point. For example, the number of points to the left of the point of interest can be different from the number to the right. Make your selection from the Points to the Left (and Right) controls.

For adjacent averaging and FFT filter smoothing, specify the number of data points at a time to be considered by the smoothing routine in the associated text box.

The Savitzky-Golay Button

The Adjacent Averaging Button

The FFT Filtering Button

Click this button to perform Savitzky-Golay filter smoothing calculations on the active data plot. The settings on the Settings tab control the degree of smoothing.

Click this button to smooth the active data plot using Adjacent Averaging. The Number of Points text box value (Settings tab) controls the degree of smoothing.

Click this button to smooth the active data plot using FFT Filter smoothing. The Number of Points text box value (Settings tab) controls the degree of smoothing.

Using the Smoothing Tool

To open the Smoothing tool, make the desired data plot active and select Tools:Smooth.

The Smoothing Tool Dialog Box Controls

The Settings Tab

The Operations Tab


Digital Filtering

Origin provides five filters for digitally filtering data in the Fourier domain: low pass, high pass, band pass, band block, and threshold filters. The low and high pass filters allow you to eliminate noise at high and low frequencies, respectively. The band pass filter allows you to eliminate noise above and below a specified frequency range. The band block filter allows you to eliminate noise within a specified frequency range. The threshold filter allows you to eliminate noise corresponding to frequency components that are below a specified threshold.

Low and High Pass Filters

Band Pass Filter

Band Block Filter

Threshold Filter


Low and High Pass Filters

To apply a low or high pass filter to the active data plot:

  1. Select Analysis:FFT Filter:Low Pass (High Pass).

Both menu commands open the Frequency Cutoff dialog box. Origin calculates a default cutoff frequency (Fc) using the equation Fc=10*(1/period) where period is the X data set range.

  2. Type the desired cutoff frequency in the Fc text box.

  3. Choose a Filtered Curve Color.

  4. To display the high pass filtered data with the DC offset stored in F0, select the Apply F0 Offset check box (High Pass only).

  5. Click Apply or OK.

If you selected Low Pass, Origin filters out frequencies above the cutoff frequency.

If you selected High Pass, Origin filters out frequencies below the cutoff frequency.

Origin creates a new hidden worksheet containing the X and Y components of the filtered data. Origin also displays the filtered data in the graph window.

To learn more about the low pass filter, review the FFT LOW PASS FILTER.OPJ project located in your Origin \SAMPLES\ANALYSIS\FFT folder.

Note: Origin 7 includes a number of the NAG function libraries, including c06 - Fourier Transforms. Reference information is provided on the NAG libraries in the Origin C Reference Help file (Help:Programming:Origin C Reference). Furthermore, when you install Origin, you are provided the option to install the NAG PDF files which document the NAG functions. If you clicked Yes to install these files, a \NAG PDFs folder is created with a subfolder for each library. If you did not install the PDFs, they remain accessible on your installation CD. Furthermore, you can install them at a later date by running the Origin "Add or Remove Files" program.

To help you get started calling NAG functions from Origin C functions, a number of sample Origin projects and associated source files are included in your Origin \SAMPLES\PROGRAMMING subfolders. Those related to FFT include:

\NAG 2D FFT\

\NAG FFT Convolution\

\NAG FFT Lowpass\

\NAG STFT\


Band Pass Filter

To eliminate noise above and below a specified frequency range (band pass filter) in the active data plot:

  1. Select Analysis:FFT Filter:Band Pass.

This menu command opens the Frequency Range dialog box. Origin calculates a default low cutoff frequency (Fl) using the equation Fl=10*(1/period) where period is the X data set range. Origin calculates a default high cutoff frequency (Fh) using the equation Fh=20*(1/period).

  2. Type the desired cutoff frequencies in the Low and High text boxes.

  3. To display the filtered data with the DC offset stored in F0, select the Apply F0 Offset check box.

  4. Choose a Filtered Curve Color.

  5. Click Apply or OK.

Origin filters out frequencies outside of the specified frequency range.

Origin creates a new hidden worksheet containing the X and Y components of the filtered data. Origin also displays the filtered data in the graph window.


Band Block Filter

To eliminate noise within a specified frequency range (band block filter) in the active data plot:

  1. Select Analysis:FFT Filter:Band Block.

This menu command opens the Frequency Range dialog box. Origin calculates a default low cutoff frequency (Fl) using the equation Fl=10*(1/period) where period is the X data set range. Origin calculates a default high cutoff frequency (Fh) using the equation Fh=20*(1/period).

  2. Type the desired cutoff frequencies in the Low and High text boxes.

  3. To display the filtered data with the DC offset stored in F0, select the Apply F0 Offset check box.

  4. Choose a Filtered Curve Color.

  5. Click OK.

Origin filters out frequencies within the specified frequency range.

Origin creates a new hidden worksheet containing the X and Y components of the filtered data. Origin also displays the filtered data in the graph window.


Threshold Filter

To eliminate noise corresponding to frequency components that are below a specified threshold level in the active data plot:

  1. Select Analysis:FFT Filter:Threshold. This menu command first performs a forward FFT on the active data plot, and displays the frequency component spectrum with a moveable threshold level line.

  2. Drag the line to the desired level, or type an amplitude value for the threshold directly in the Threshold text box.

  3. Click the Filter Threshold button to filter out all frequency components below the set threshold level.

Additionally, an inverse FFT is performed on the filtered frequency spectrum to yield a new hidden worksheet containing the original data with the noise removed.

To learn more about the threshold filter, review the FFT THRESHOLD FILTER.OPJ project located in your Origin \SAMPLES\ANALYSIS\FFT folder.


Sharing Origin Project Support Files

This feature allows you to attach any file to an Origin Project file (OPJ). When the Origin Project file is saved, supporting files are appended to and stored inside the OPJ file. When the file is opened, the appended files are extracted and made available to the user.

You can attach any type of file to the OPJ file – you are not restricted to file types recognized by Origin (OTP, OTW, OGS, etc.). You could attach Word Documents, PDFs, image files, etc. Attached Origin C and OGS files are handled in a special way.

Attaching and Retrieving Files

Special Handling of Origin C and OGS files


Attaching and Retrieving Files

Use Code Builder to attach or retrieve files stored with the Origin project file.

To attach files to the OPJ:

  1. Click the Code Builder [image] button on the Standard toolbar.

  2. Right-click on the Project subfolder in the Origin C Workspace tree and choose Add Files.

  3. Browse to and select the file(s) that you want to attach to the OPJ file (Note that you can also drag-and-drop files from the User and Temp folders to the Project folder).

  4. When you save the Origin project file, all files in the Project folder are appended and saved inside the OPJ. The Project folder tracks with the OPJ; the contents of this folder do not change when you change your workspace in Code Builder.

When you open an OPJ file to which files have been attached, support files are extracted and stored in a temporary subfolder. To show the path to that subfolder:

  1. Right-click on the Project folder in Origin C Workspace tree, and select Show Full Path.

The attached files can be opened by double-clicking on the file name.

  • If the file type is recognized by Code Builder (Origin C and OGS files are specially handled), these files are opened in new windows in the Code Builder Multiple Document Interface (MDI).

  • If the file type is not recognized by Code Builder, Origin passes the file to the Windows OS for opening. For instance, if a Microsoft Word file were attached and you were to double-click on this file, the file would open in the Microsoft Word application.

Alternately, you could navigate to the Temporary subfolder and launch the file through Windows Explorer. Note that when the project is closed, this subfolder is removed from the system.


Special Handling of Origin C and OGS files

Special handling of OC and OGS files makes it possible to attach custom code to OPJ files and create custom solutions that are easily delivered to other Origin users.

Origin C files that are attached to the project are compiled and loaded when the project to which they are attached is opened. All functions defined in the OC files are accessible to the user from the Origin interface, upon project opening.

With OGS files, you can access script sections in the attached OPJ from the interface when the project is open. For example, if you had attached a file named MyScripts.OGS, once the OPJ file was opened, you could issue this command from the interface:

Run.section(MyScripts, MySection);

Origin will look to see whether there is a file called MyScripts.OGS that is attached to the open OPJ, then will look to see if MySection exists within the OGS file. If found, this section is run. If no such attached file is found, Origin searches your user-files area, and then finally in the EXE path for the named OGS file.


Sharing Your Custom Tools

You can share your Origin files with other Origin users by simply providing your files. However, if you are distributing custom tools, there is a far better method. This entails creating an Origin Pack or OPK file. The advantage of this method is that when the file is unpacked by the end user, support file folder structure is maintained.

Packing Files

Un-packing Files


Packing Files

To open the Origin Pack dialog box:

  1. Select Tools:Pack/Unpack OPK Files from the Origin menu. This command opens the Origin Pack dialog box (see figure).

To create a new packed file:

  2. Click the Add button to open the Origin Pack Files dialog box.

  3. Add your files in this dialog box. When done, click OK.

  4. To ensure that the files are packed following the original folder structure, select the Save Folder Information check box in the Origin Pack dialog box.

  5. To restrict the type of Origin user who can open your packed file, make a selection from the User Access drop-down list.

  6. To create the packed file, click the Pack button.

Note: The packing of button groups requires that all supporting files be in the Origin folder or in a subfolder of the Origin folder.


Un-packing Files

To unpack a file:

  1. Select Tools:Pack/Unpack OPK Files to re-open the Origin Pack dialog box (see figure).

  2. Click the Open button, then select the desired .OPK file from the Origin Pack Files dialog box.

  3. Click Open.

To extract files:

  4. To maintain the file folder structure of the packed files, select the Use Folder Information check box before extracting the files.

  5. Click the Extract button. (You cannot exclude files from the unpacking process. All files in the .OPK file will be extracted to the appropriate folder. The file list is used for viewing files in the .OPK file and for packing files to a .OPK file. The Delete button has no effect on the files that will be unpacked.)

The Drag and Drop OPK Installation Method

You can also drag a .OPK file from Windows Explorer into your running Origin program window. Alternatively, you can drag the file onto the Origin taskbar button without releasing the mouse button. After a few seconds, the Origin program window will become active and you can then drag the file into the program window. When you use the drag-and-drop method, Origin uses your current "Use Folder Information" setting to determine if the folder structure of the packed files is maintained.


Exchanging Data with Other Applications

There are numerous ways in which you can share data between Origin and other applications. To learn more, see the following Help file topics:

  • Using the Clipboard to exchange data.

  • Importing Data into an Origin worksheet.

  • Creating an ASCII file from worksheet data.

  • Importing Data into an Origin Matrix.

  • Importing Raster Images into an Origin Matrix.

  • Working with Excel in Origin.

  • Sharing Graphs with other applications (MS Word, PowerPoint, etc).

  • Exchange data with MATLAB using the MATLAB Console.

  • Exchange data with LabVIEW using the LabVIEW VI Browser.


Exchanging Data Using the Clipboard

You can exchange various forms of data using the Clipboard:

  • You can exchange worksheet and matrix data using the Clipboard.

  • You can exchange graphics using the Clipboard.

  • You can embed your Origin graph into other applications.


Using the Clipboard to Exchange Data

To copy data between or within a worksheet (or matrix):

  1. Select your data.

  2. Select Edit:Copy.

If you copied a single value to the Clipboard, click on the destination cell and select Edit:Paste. If you copied a range of values to the Clipboard, select the cell that is to be the upper-left corner of the range, then select Edit:Paste.

To transpose the data when pasting into the destination cells (worksheet only):

To learn more about exchanging data using the Clipboard, see Exchanging Worksheet Data Using the Clipboard.


Pasting Graphics from the Clipboard

Graphic elements that are copied to the Clipboard from another Windows application can be pasted into an Origin window. To paste a graphic, click at the desired location and select Edit:Paste or press CTRL+V, or right-click at the desired location and select Paste from the shortcut menu.

Once a graphic element is copied into an Origin window, it becomes an object. The object is selected, moved, and resized like any Origin object. To edit the object, double-click on the object to open the Object Properties dialog box. When editing a pasted object, this dialog box includes an Image tab. You can add a background from this tab. For more information on this dialog box, see Editing Objects.


Exporting

Exporting ASCII Data

Exporting Worksheet Data

Creating an ASCII File for Worksheet Data

Copying Worksheet Data


Exporting Worksheet Data

  1. With the worksheet active, select File:Export ASCII from the Origin menu.

This menu command opens the Export ASCII dialog box. The worksheet name displays in the File Name text box. You can type a new name for the file and choose a new destination folder.

After clicking Save, Origin opens the ASCII Export into File dialog box, allowing you to control the export options.

ASCII Export Into File Dialog Box Controls ( see figure)

The Include Column Names Check Box

The Include Column Labels Check Box

The Export Selection Check Box

The Separator Drop-down List

When this check box is selected, the column names are copied to the first line of the ASCII file, followed by <CR>, and then the data. The separator selected from the Separator drop-down list is used to separate the column names and data.

When this check box is selected (and the Include Column Names check box is selected), the column labels are copied to the second line of the ASCII file, followed by <CR>, and then the data. If the Include Column Names check box is not selected, then the column labels are copied to the first line of the ASCII data file.

The separator selected from the Separator drop-down list is used to separate the column labels and data.

If you want to export a section of the worksheet data, highlight the desired section of data before selecting File:Export ASCII. If a section of worksheet data is selected, the Export Selection check box will be selected by default. Do not clear the check box unless you want to export the entire contents of the worksheet.

If you select Edit:Set As Begin and Edit:Set As End to set the worksheet range, the Export Selection check box will not be selected. Only the displayed worksheet range exports.

Select the desired separator (or delimiter) from the Separator drop-down list for the data and column names/labels (if the Include Column Names/Labels check boxes are selected).

If you want to save a range of worksheet data to an ASCII file, do one of the following before selecting File:Export ASCII.

  • Highlight the desired range of worksheet data.

  • Delete the rows and columns of data that you do not want to export using the Edit:Delete menu command. This results in a permanent alteration of your worksheet.

  • Change the display range of the worksheet before exporting the data. Use the Edit:Set as Begin and Edit:Set as End menu commands to establish the display range for a column or range of columns. After exporting the desired data range, return the worksheet to the full display range by selecting Edit:Reset to Full Range (for more information, see Setting the Worksheet Display Range.

Exporting Worksheet Data

Worksheet data can be exported to another application by:

  • Copying the data to the Clipboard.

  • By creating an export file.

To export data from the worksheet:

To export a portion of the worksheet data:

Note: The settings in the ASCII Export Into dialog box can be saved with the worksheet template.

A Note on Significant Figures in the Worksheet

When you enter a numeric value in a worksheet cell, Origin may round off the displayed value depending on the numeric display settings in

  • the Worksheet Column Format dialog box.

  • the settings on the Numeric Format tab of the Options dialog box.

Origin uses the entered value in calculations. However, only the rounded off value is exported to a file or copied to the Clipboard.


Exporting Matrix Data

  1. With the matrix active, select File:Export ASCII from the Origin menu.

This menu command opens the Export ASCII dialog box. The matrix name displays in the File Name text box. You can type a new name for the file and choose a new destination folder.

After clicking Save, Origin opens the ASCII Export into File dialog box, allowing you to control the export options.

ASCII Export Into File Dialog Box Controls ( see figure)

The Include Column Names Check Box

The Include Column Labels Check Box

The Export Selection Check Box

The Separator Drop-down List

When this check box is selected, the column names are copied to the first line of the ASCII file, followed by <CR>, and then the data. The separator selected from the Separator drop-down list is used to separate the column names and data.

When this check box is selected (and the Include Column Names check box is selected), the column labels are copied to the second line of the ASCII file, followed by <CR>, and then the data. If the Include Column Names check box is not selected, then the column labels are copied to the first line of the ASCII data file.

The separator selected from the Separator drop-down list is used to separate the column labels and data.

If you want to export a section of the worksheet data, highlight the desired section of data before selecting File:Export ASCII. If a section of worksheet data is selected, the Export Selection check box will be selected by default. Do not clear the check box unless you want to export the entire contents of the worksheet.

If you select Edit:Set As Begin and Edit:Set As End to set the worksheet range, the Export Selection check box will not be selected. Only the displayed worksheet range exports.

Select the desired separator (or delimiter) from the Separator drop-down list for the data and column names/labels (if the Include Column Names/Labels check boxes are selected).

If you want to save a range of matrix data to an ASCII file, do one of the following before selecting File:Export ASCII.

  • Highlight the desired range of worksheet data.

  • Delete the rows and columns of data that you do not want to export using the Edit:Delete menu command. This results in a permanent alteration of your matrix.

Exporting Matrix Data

Matrix data can be exported to another application by:

  • Copying the data to the Clipboard.

  • By creating an export file.

To export data from the matrix:

To export a portion of the matrix data:

To export an image from the matrix.

Note 1: The settings in the ASCII Export Into dialog box can be saved with the matrix template.

Note 2: See the note on exporting significant figures at the bottom of this topic: Exporting Worksheet Data .


Sharing Your Origin Graph with Another Application

There are two methods to include Origin graphs in other applications: importing your graph or sharing your graph.

  • When you import your Origin graph into another application, the application displays a picture of your graph. The picture displayed in the application cannot be edited using Origin tools.

  • When you share your Origin graph with another application, the application displays an object which can be edited using Origin tools. The object can also be linked and updated if the source Origin graph changes.

When sharing your Origin graph with another application, Origin acts as an OLE server. The following sections provide guidelines for sharing Origin objects with OLE compatible applications.

Should I Insert My Graph or Create a Link to My Graph?

Controlling the Size of your Linked or Inserted Graph

Inserting Your Graph into Another Application

Editing an Inserted Graph in the Destination Application

Creating a Link to Your Graph in Another Application

Editing a Linked Graph in the Destination Application

Inserting Origin Data Plot Symbols and Lines in Other Applications


Should I Insert My Graph or Create a Link to My Graph?

There are two methods of sharing Origin objects with OLE-compliant applications: inserting your graph or creating a link to your graph. The two are distinguished primarily by the storage location of the graph's supporting data.

  • When you insert your graph into another application, the data are stored in the destination application, not in Origin.

  • When you create a link to your graph in another application, the data are stored in the Origin file, not the destination application. The destination application saves a link to the Origin file, and displays an image of the linked graph. (Note that the destination application is the OLE container application).

To... | Do this...
Minimize the destination document file size. | Link your graph to the destination application file.
Display your graph in multiple destination documents; changes made to the source graph will be reflected in all documents. | Link your graph to the destination application file.
Create a single, self-contained destination document that contains information on your graph. | Insert your graph into the destination application file.


Controlling the Size of your Linked or Inserted Graph

Control the size of an inserted or linked image using the settings on the Page tab of the Options dialog box (Tools:Options). For more information, see the Setting Your Preferences, the Page Tab .


Inserting Your Graph into Another Application

The graph need not be saved to a graph window file or a project file.

To insert the page of the active graph window as an object into another application:

  1. In Origin, select Edit:Copy Page.

  2. In the destination application (such as Microsoft® Word), select Edit:Paste Special. In Word, this menu command opens the Paste Special dialog box.

  3. Select Origin Graph Object from the As list box.

  4. Select the Paste radio button.

  5. Click OK.

Your graph displays as an object in the destination application.

To control the default size of the object in the destination application, edit the Copy Page group on the Page tab of the Options dialog box (Tools:Options).

Note: Pressing CTRL+C = selecting Edit:Copy Page (Origin); CTRL+V = Edit:Paste (destination application).

The graph must already be saved to a graph window file.

To insert the page of an existing *.OGG graph window file as an object into another application:

  1. In the destination application (such as Word), select Insert:Object. In Word, this menu command opens the Object dialog box.

  2. Select the Create from File tab.

  3. Click Browse. This action opens the Browse dialog box.

  4. Select your *.OGG file.

  5. Click OK.

  6. In the Object dialog box, make sure the Link to File check box is cleared.

  7. Click OK.

Your graph displays as an object in the destination application.

To create and insert the page of a graph window as an object in another application:

  1. In the destination application (such as Word), select Insert:Object. In Word, this menu command opens the Object dialog box.

  2. Select the Create New tab.

  3. Select Origin Graph from the Object Type list box.

  4. Click OK. This action creates a new instance of Origin displaying a graph in a Documentn window.

  5. Make this new instance of Origin the active application.

  6. Create your graph (in the new program instance).

  7. With your graph window active, select File:Update Documentn.

  8. Select File:Exit and Return to Documentn. This menu command closes the new instance of Origin and returns activity to the destination application (in this example, Word).

Inserting Your Graph into Another Application

Origin provides three methods to insert your graph into another application.

  • Paste your graph into another application using the Clipboard.

  • Insert your graph window file (*.OGG) into another application.

  • Create (and insert) a new graph in another application.


Editing an Inserted Graph in the Destination Application

  1. Select File:Update DestinationApplication.

  1. Select File:Exit and Return to DestinationApplication.

As an alternative, Origin objects inserted into a destination application can be edited within the window of the destination application. This editing method works by "in-place activation".

To enable in-place activation:

  1. From the Origin menu, select Tools:Options, and choose the Graph tab.

  2. Select the Enable OLE In-place Activation check box.

  3. Click OK to close the dialog box (You are prompted to “Save as Origin’s startup options?”).

  4. You may close Origin.

To edit the graph using in-place activation:

  1. Double-click on the inserted (not linked) Origin graph in the destination application. The Origin graph is activated “in-place” and is ready for editing.

Note: In general, in-place activation is not the recommended method for editing inserted Origin graphs; you do not have access to many useful Origin features - for instance, the worksheet windows that may contain data plotted in the graph.

Editing an Inserted Graph in the Destination Application

Once an Origin object is inserted into a destination application, it is editable using Origin’s tools. In general, to edit the inserted object in Origin:

  1. Double-click the inserted graph.

  2. This opens an instance of Origin; the graph window displays in the workspace and is ready for editing.

  3. Make changes to the graph.

To update the inserted object:

To close the instance of Origin and return to the destination application:

Using In-place Activation to Edit the Inserted Graph


Creating a Link to Your Graph in Another Application

To create a link to a graph in a saved Origin project file:

  1. Open the project that includes your graph window.

  2. With the graph window active, select Edit:Copy Page.

  3. In the destination application (such as Word), select Edit:Paste Special. In Word, this menu command opens the Paste Special dialog box.

  4. Select Origin Graph Object (or Picture) from the As list box.

  5. Select the Paste Link radio button.

  6. Click OK.

Your graph displays as an object in the destination application.

To control the default size of the object in the destination application, edit the Copy Page group on the Page tab of the Options dialog box (Tools:Options).

To create a link to a graph in a saved Origin graph window file:

  1. In the destination application (such as Word), select Insert:Object. In Word, this menu command opens the Object dialog box.

  2. Select the Create from File tab.

  3. Click Browse. This action opens the Browse dialog box.

  4. Select the desired *.OGG file.

  5. Click OK.

  6. In the Object dialog box, select the Link to File check box.

  7. Click OK.

Your graph displays as an object in the destination application.

Creating a Link to Your Graph in Another Application

Two methods exist for creating a link to your graph in another application:

  • Create a link to your graph that is part of a saved Origin project (*.OPJ) file.

  • Create a link to your graph that is saved as a graph window (*.OGG) file.


Editing a Linked Graph in the Destination Application

In a general sense, you initiate the editing process by:

  1. Opening the Origin project or graph window file that contains the source for the linked object.

  2. Edit the graph using Origin’s tools.

Alternatively, you can:

  1. Double-click on the linked object in the destination application. This action opens an instance of Origin displaying the linked graph in a graph window.

  2. Make changes to the graph in this instance of Origin.

After making changes to the graph in Origin:

  1. Select Edit:Update Client from the Origin menu bar.

or

  1. Redirect window activity to the destination application.

  2. Update the link within the destination application. For instructions on updating the link, consult the destination application’s documentation.


Inserting Origin Data Plot Symbols and Lines in Other Applications

Origin installs a True Type font set called Origin into the Windows \FONTS folder. This font set includes the data plot symbols available from the symbol gallery on the Symbol tab of the Plot Details dialog box, and the line styles available from the Style drop-down list on the Line tab of the Plot Details dialog box. Thus, you can now include Origin's symbols and line styles in other applications. For example, when you select Insert:Symbol in Microsoft Word, Origin is now available from the Font drop-down list.


MATLAB Console

Command

Application

gr matName1 matName2 ...

Get real matrices named matName1, matName2, etc. from MATLAB.

New matrix windows of the same name are created in Origin. Existing windows of the same name are overwritten.

gc matName1 matName2 …

Get complex matrices named matName1, matName2, etc. from MATLAB.

New matrix windows, for real and complex components, are created in Origin. Existing windows of the same name are overwritten.

pr matName1 matName2 …

Put real matrices named matName1, matName2 etc. from Origin to MATLAB. Existing windows of the same name are overwritten.

pc matName1 matName2 [matMatlabResult]

Take the Origin matrices matName1 and matName2 and create a complex matrix in MATLAB that combines the two Origin matrices.

The first matrix is used for the real component and second one for the imaginary component.

If the name of the MATLAB matrix is not specified, matName1 will be assigned. Existing windows of the same name are overwritten.

MATLAB Console

This feature allows Origin users to issue MATLAB commands from within the Origin environment, transfer data between the two applications, and open MATLAB workspace files to import data into Origin.

These features require that both Origin and MATLAB to be installed on the same computer.

To start the MATLAB console application:

  1. From the Origin menu, select Tools:MATLAB Console.

This will launch a new instance of the MATLAB application. A MATLAB Command Window opens in the Origin workspace (see figure).

A set of new commands are available to the user in this Console window, which allow easy transfer of real and complex 2-D matrices back and forth from MATLAB (see commands).

The Import Button

The Import button in the top right corner of this dialog brings up the MATLAB Import Dialog. This dialog lists all variables in the current MATLAB workspace. You can select a single variable, or use SHIFT + select to select multiple variables, and import them into Origin. Note that when importing, you can either bring the data into a worksheet, or into a matrix. Check box options allow you to update existing Origin matrices, and to add imported data to existing Origin worksheets.

Note: The Tools:MATLAB Console menu command opens a new instance of the MATLAB application. To share your MATLAB workspace with Origin, you need to (1) launch Origin first, then (2) launch MATLAB using this menu command within Origin. Once you have selected this Origin menu command and an instance of MATLAB is launched, you can go to the MATLAB application and work directly in MATLAB. The workspace can then be accessed from Origin using the Import button on the Origin MATLAB Console window.


LabVIEW VI (Virtual Instrument) Browser

This feature allows Origin users to:

  • Run a LabVIEW Virtual Instrument in the Origin environment.

  • Transfer data between Origin and LabVIEW.

  • Open LabVIEW files to import data into Origin.

In order to utilize this feature, you must have both Origin and LabVIEW installed on your computer.

To import data from a LabVIEW Virtual Instrument (*.VI) file:

  1. From the Origin menu, choose Tools:LabVIEW VI Browser (see Note, below).

If no VI file is open, this menu command will open the Open dialog box, wherein you can browse to your VI file.

  2. Select a VI file and click Open. This opens the LabVIEW VI Import dialog box.

The LabVIEW VI Import dialog box lists all variables in the current LabVIEW workspace. You can select a single variable or hold down the SHIFT key and select multiple variables, and import them into Origin. Note that when importing, you can either import the data into a worksheet or into a matrix.

Note 1: This Origin product is shipped with a collection of building-block VIs that will help you construct custom VIs that communicate with Origin. For instructions on using these building block VIs as well as detailed programming information on LabVIEW/Origin connectivity, see the LabVIEW_Connectivity.pdf in the \Samples\AutomationServer subfolder of your Origin installation.

Note 2: This menu command attempts to use the current instance of LabVIEW to read the chosen workspace file, and then to import the variables into Origin. When the import task is finished, this instance of the LabVIEW application is left running.


The "User Files" Folder

  1. From the Origin menu, select Window:Script Window (or press ALT + 3).

  2. Type this line in the Script Window, just as it appears in the figure:

  3. Press ENTER.

Origin responds with the following attention message:

  4. Click Yes. The next time that you run Origin, the User Files Folder dialog box will open and prompt you for a User Files path.

  1. Run regedit.

  2. Navigate to HKEY_CURRENT_USER->Software->OriginLab->Origin75->English->

  3. Delete the entry named Path.

The next time that you run Origin, the User Files Folder dialog box will open and prompt you for a User Files path.

The "User Files" Folder

The first time that you run Origin, you are presented with this dialog box in which you are asked to specify a default folder for saving your customized files -- the User Files folder. You will always have a chance to save files to a different location, but this folder serves as a convenient place to store custom graph templates, Themes, curve fitting functions, Origin Import Filter (OIF) files, etc.

If you should decide to change the location of your User Files folder, you will need to do one of the following:

  • Enter a LabTalk command in the Script Window (recommended).

  • Edit the Windows Registry.


Starting Origin with a Specific File

To start Origin using a specific window or project file:

  1. Drag a supported file type from Windows Explorer onto your Origin program icon or Origin executable file (the Origin EXE file).

Supported file types include: graph templates (*.OTP), graphs (*.OGG), worksheets (*.OGW), matrices (*.OGM), projects (*.OPJ and *.ORG) and Excel files (*.XLS).

Note: You can also drag ASCII, SigmaPlot, Minitab, and Thermo Galactic SPC data files from Windows Explorer onto your Origin program icon or Origin executable file. Origin then starts with the data imported into a worksheet.


Modifying the Default Origin Project (OPJ) File

A new project is opened each time you start Origin or when you click the New Project button [image] on the Standard toolbar. In either case, the new project contains one worksheet window.

However, you can customize the contents of this newly opened project:

  1. Select Tools:Options to open the Options dialog box.

  2. Select the Open/Close tab and then modify the Start New Project setting.

Select from Origin Worksheet, Excel Workbook, Empty Graph, Matrix, ORIGIN.OPJ, or None.

The ORIGIN.OPJ file includes a worksheet and a graph window. The graph window is configured to display a data plot of column A (X values) and column B (Y values) automatically when data are imported or entered into the worksheet columns. You can customize the ORIGIN.OPJ project file and resave it.


Adjusting How Origin Starts by Modifying the Command Line

When Origin is started, it reads the Command Line or Target text box (depending on your version of Windows) in the Origin program icon's Properties dialog box.

By default, these text boxes start Origin by executing ORIGIN80.EXE - without any switches. Switches can be added to modify Origin's startup sequence.

Note: In general, the initialization switch (-i) should precede other switches if more than one switch is used. However, use of the additional switches can have complex interactions with Origin and their use is intended for advanced users only.

Origin Command Line Switches

Switch | Argument | Function
-i | filename | Specifies an initialization file to use in place of ORIGIN.INI. See, Using a Different Initialization File When Starting Origin.
-l | number | Specifies at which menu level to start the software. See, Specifying a Menu Level When Starting Origin.
-c | filename | Specifies a new configuration file to override the specification in the INI file. See, Adding a New or Additional Configuration File.
-a | filename | Specifies a configuration file to add to the list specified in the INI file. See, Adding a New or Additional Configuration File.
-tw | TemplateName | Specifies the default worksheet template. See, Directing Origin to Start by Opening a Worksheet Based on a Specific Template.


Using a Different Initialization File When Starting Origin

Origin's default initialization file, ORIGIN.INI, presets a number of Origin options that remain active until you close the Origin session. These options include the menu configuration and some display settings. Because Origin automatically uses ORIGIN.INI as the default initialization file, no Command Line or Target text box switch is needed to specify it.

To use an initialization file other than ORIGIN.INI, specify the replacement initialization file by using the -i filename switch. If ORIGIN.INI is not found and no replacement INI file is specified, default values are used for initialization.

The following command line with the -i switch specifies that Origin use the MYINIT.INI file to preset Origin options:

DriveLetter:\Origin80InstallationPath\ORIGIN80.EXE -i MYINIT

Note that the INI file must be in Origin program folder or the User Folder that you specified when you first ran Origin.


Master INI files

The Master INI file

Your Origin installation contains a number of INI files that control the configuration of some Origin feature, on startup. For instance, the Origin default initialization file, ORIGIN.INI, presets a number of Origin options that remain active until you close the Origin session. These options include the menu configuration and some display settings. In a typical server + client installation or on a standalone installation of Origin with multiple users, each client/user will maintain a separate version of the INI file in the User Files folder. This allows each client/user to customize Origin settings without overwriting the settings of other clients/users.

The Master INI file feature is designed to help alleviate some of the problems of maintaining multiple copies of system files for server + client and multi-user workstation installations. The Master INI file works in the following way:

  • The Master INI file name must begin with an "M" (e.g. ORIGIN.INI becomes MORIGIN.INI, NLSF.INI becomes MNLSF.INI, etc.).

  • The Master INI file must be in the Origin root folder (in the folder with the Origin EXE).

Should Origin detect the presence of a Master INI, on startup, it merges the Master INI file with the local INI file. If there is a key in Master INI file and no such key in local INI file, the key is created. If there is key in Master that exists in local, the key in the local is overwritten.

When merging of files is complete, a time stamp with the Master INI's modification time is written to the local INI file. The next time that a client/user is launched, Origin compares the Master modification time with the time stamp written to the local INI file. If the two are equal, no merging of INI files is done. It is, therefore, possible to modify the local INI file to override Master INI settings. If the Master INI is later modified, it is then merged with the local copy on client startup.

Notes on Installing and Making OPK Tools Available to Clients/Users

The systems administrator should run Origin with the Origin root folder named as the User Files folder. When the admin then installs the OPK file, the contents are unpacked beneath the Origin root folder.

When a new toolbar is added by installing an OPK file, an entry is written to the ORIGIN.INI file in the root folder (same as User Files folder, in this case).

For example:

[UserDefinedButtons]

User Defined=Oubtn.ini

Script Toolbar=OSCRIPTTOOLBAR.INI

This admin should add this to entry to MORIGIN.INI, to ensure toolbar access to all clients/users.


Specifying a Menu Level When Starting Origin

The menu level determines which menus are available when Origin is open. To specify the menu level at which Origin starts, use the -l number switch. The number must be valid for the lists of menus contained in the ORIGIN.INI file. If a -l switch is not included in the Command Line or Target text box, then a default menu level of 1 is used unless overridden by assignment within the INI file.

The following command line with the -l switch specifies that Origin use menu level 2 when starting Origin:

DriveLetter:\Origin80InstallationPath\ORIGIN80.EXE -l 2


Adding a New or Additional Configuration File

Configuration files are text files that contain LabTalk script commands. The configuration files define variables, menus, macros, and functions that remain active until you close the Origin session. Configuration files execute when Origin starts as specified by the menu level in the ORIGIN.INI file.

Use the -c filename switch to specify a new configuration file to override the configuration files that are specified by the menu level in the INI file.

Use the -a filename switch to specify a configuration file to add to the list of configuration files that are specified by the menu level in the INI file.

The following command line with the -c switch specifies that Origin use a new configuration file, MYCONFIG.CNF, to override the current configuration files specified in the ORIGIN.INI file:

DriveLetter:\Origin80InstallationPath\ORIGIN80.EXE -c MYCONFIG

Note that the configuration file must be in the Origin program folder or the User Folder that you specified when you first ran Origin.


Directing Origin to Start by Opening a Worksheet Based on a Specific Template

By default, when Origin starts it opens a new project displaying a single worksheet created from the ORIGIN.OTW worksheet template. To start Origin displaying a worksheet created from a different template, use the -tw templateName switch. In addition, templateName will become the default worksheet template used by the New Worksheet button on the Origin Standard toolbar.

For example, to start Origin and create a worksheet based on the CONVANALYSIS.OTW worksheet template, type the following in the Command Line or Target text box:

DriveLetter:\Origin80InstallationPath\ORIGIN80.EXE -tw CONVANALYSIS.OTW

Note that the specified template must be in the Origin program folder or the User Folder that you specified when you first ran Origin.


Network Switches

The -p and -w command line switches tell a client installation of the network version of Origin where to look for client-specific files. These switches are not needed and do not work with non-network versions of Origin. Client-specific files are files that are modified by a particular client for customization purposes. These files contain such things as user preferences, settings, options, and templates. Configuration files (*.CNF), initialization files (*.INI), and template files (*.OTP, *.OTW and *.OTM) are commonly modified by individual users and need to be saved separately from the Origin server and other clients.

Use the -p full path switch to direct a client installation of Origin to look for client-specific files in the folder specified by full path.

Use the -w switch (with no argument) to direct a client installation of Origin to look for client-specific files in the folder specified in the Start In text box of the Origin program icon's Properties dialog box.

Note that the folder specified by full path and the Start In folder are normally the folder in which the client is installed.

The following command line with the -p switch directs Origin to look for client-specific files in the folder C:\ORIGIN70CLIENT\.

\\SERVER\ORIGIN\ORIGIN70.EXE -p C:\ORIGIN70CLIENT\


Directing Origin to Start by Opening a Specific File

To open a graph window template, an Origin window, or a project when starting Origin, you can specify the path and file name of any supported file type in the Command Line or Target text box of the Origin program icon's Properties dialog box. The supported file types include: graph templates (*.OTP), graphs (*.OGG), worksheets (*.OGW), matrices (*.OGM), projects (*.OPJ and *.ORG) and Excel files (*.XLS). No extension to the file name is required if it is a *.OPJ file.

For example, to open a project named MYPROJECTFILE.OPJ that is located in the Origin software folder, type the following in the Command Line or Target text box:

DriveLetter:\Origin80InstallationPath\ORIGIN80.EXE MYPROJECTFILE

To open a graph window named MY GRAPH.OGG that is located in the folder D:\MY OGGs, type the following in the Command Line or Target text box:

DriveLetter:\Origin80InstallationPath\ORIGIN80.EXE "D:\MY OGGs\MY GRAPH.OGG"

Note that, unlike files specified with the command line switches, you can specify files not located in the same directory as the Origin executable file. However, if the specified file is not in the Origin software folder, you must specify the complete path and file name. Long path and file names with spaces must be enclosed in double quotation marks. In general, the file name should be the last command line option listed when using more than one switch.


The Origin Start Up Sequence

When Origin is started by executing text contained in the Command Line text box or the Target text box of the Origin program icon's Properties dialog box, a predictable and orderly sequence of start up events takes place. Changing this sequence by the use of command line switches or by altering the contents of the ORIGIN.INI file can have complex interactions with Origin and is intended for advanced users. This section outlines the default start up sequence followed by Origin.

  1. The command line is read.

  2. The ORIGIN.INI (or replacement INI file) and ORIGIN80.INI files are read. The ORIGIN.INI and ORIGIN80.INI files are self-documented text files that can be opened using any text editor such as NotePad.

  3. If specified, the SYSVAR file is loaded. The SYSVAR file name is specified in the ORIGIN.INI file (or in a replacement INI file) by the line:

SYSVAR = filename

where filename is the name of a text file located in the Origin software folder. The SYSVAR file is a mechanism for providing permanent storage of LabTalk variables whose current values are saved at the close of each project (when selecting File:New:Project, File:Open, or File:Exit). The SYSVAR file is a text file that can be created or opened with any text editor and should consist of lines of the form variable = value.

  4. The files SYSTEM.CNF, OPTION.CNF, and ORGSYS.CNF are executed. Configuration files are text files that contain LabTalk script commands. The files SYSTEM.CNF and OPTION.CNF contain settings for many LabTalk system object properties. The file ORGSYS.CNF contains settings for several object properties and system variables as well as a number of macro definitions.

  5. The file MACROS.CNF and the menu level CNF files (or an overriding CNF file) are executed. The file MACROS.CNF contains definitions for several system macros and should normally be included along with the menu level CNF files. Caution is advised if not including this file.

The menu level can be specified by the -l number command line switch or by the LEVEL = number line in the ORIGIN.INI file (if not specified, it defaults to 1). The menu level CNF files are specified by the line:

File#=Macros filename1 filename2 filename3 etc...

in the ORIGIN.INI file where File is literal, # equals number (the menu level), Macros is literal, and filename1, filename2, filename3, etc... are the menu level CNF files located in the Origin software folder. Menu level CNF files create different Origin menu arrangements depending on the value of the menu level setting. An example taken from the ORIGIN.INI file is:

File1=Macros FullMenu

  6. The additional CNF file is executed. If specified (with the -a command line switch), the additional CNF file is executed.

  7. If a file to be opened is not specified at the end of the command line and the AutoExec macro is defined, then the AutoExec macro is executed. If both conditions are met then Origin is opened with an empty workspace and the AutoExec macro is executed. The AutoExec macro is generally used to override internal default settings. A minimal and commented out definition of the AutoExec macro can be found in the MACROS.CNF file. Not defining this macro is the normal and recommended start up sequence. If the AutoExec macro is not executed then internal defaults are set and the default worksheet template is opened by Origin.

  8. If a graph template (*.OTP), a window (*.OGG, *.OGW, *.OGM), or an Excel file (*.XLS) is specified at the end of the command line, then the template, window, or workbook is opened by Origin. If defined, the macro DocEnd is executed when the newly created project file is closed. Origin creates a new project and opens the specified template, window, or workbook. If defined, Origin executes the DocEnd macro when the new project is closed. A definition statement for the DocEnd macro can be found in the MACROS.CNF file.

  9. If a project file (*.OPJ or *.ORG) is specified at the end of the command line, the file ORGSYS.CNF is executed again and Origin opens the specified project file. If defined, the macros DocBegin, EndOpen, and DocEnd are executed. Origin executes the file ORGSYS.CNF a second time and then opens the specified project file. The DocBegin macro is executed just prior to the project file being opened, the EndOpen macro is executed immediately after the project file is opened, and the DocEnd macro is executed when the project file is closed. A definition statement for the DocBegin macro can be found in the ORGSYS.CNF file. Definition statements for the EndOpen and DocEnd macros can be found in the MACROS.CNF file.

See "Macro Reference" in the LabTalk Language Reference section of the Programming Help file (Help:Programming) for a more complete description of the AutoExec, DocBegin, EndOpen, and DocEnd macros.


Setting Your Preferences with the Options Dialog Box

The options dialog box is used to specify/modify many Origin global settings pertaining to numeric display, file path, text fonts, Excel workbook and Origin program opening and closing behaviors, etc. These settings are modifiable during the Origin session and they can be set for current, and future, Origin sessions.

Opening the Options Dialog Box

Saving the Settings in the Options Dialog Box for Future Origin Sessions


Opening the Options Dialog Box

To open the Options dialog box:

  1. From the menu, select Tools:Options (any Origin window active).

or

  1. From the menu, select Window:Origin Options (Excel workbook window active).


Select the Prompt for Save on Options Dialog Close check box (default).

To save the settings for future Origin sessions (after customizing the settings in the Options dialog box):

  1. Click OK to exit the Options dialog box.

  2. Click Yes at the "Save as Origin's startup options?" prompt.

Select the Save Settings on Close check box (the Prompt for Save on Options Dialog Close check box must be cleared).

To save the settings for future Origin sessions (after customizing the settings in the Options dialog box):

  1. Click OK. Settings are automatically saved for future Origin sessions when you exit Origin.

Saving the Settings in the Options Dialog Box for Future Origin Sessions

To control the way that Origin behaves when you make changes to the Options dialog box,

  1. Open the Options dialog box and select the Open/Close tab.

    • To prompt to save Options settings

    • To save Options settings without prompting

Origin saves the Options dialog box settings by updating the associated parameters in the OPTION.CNF file. This file is read automatically when Origin starts.


Restore the Options dialog box settings to the current settings in the OPTION.CNF file.

Reset returns the Options dialog box settings to the factory default values.

Click OK to close the dialog box and establish the current settings for the current Origin session.

Click Yes at the Save as Origin’s startup options? prompt to save the dialog box settings as the current settings in the OPTION.CNF file. Click No to use the current dialog box settings for the current Origin session only.

Click Cancel to exit the Options dialog box without implementing any changes to the dialog box.

After making changes to the Options dialog box, view the changes in the active window by selecting Window:Refresh.

Reference Section: The Options Dialog Box

The Restore, Reset, OK, and Cancel buttons are located at the bottom of the Options dialog box:

  • Restore Button

  • Reset Button

  • OK Button

  • Cancel Button

The Numeric Format Tab

The File Locations Tab

The Axis Tab

The Graph Tab

The Text Fonts Tab

The Page Tab

The Miscellaneous Tab

The Open/Close Tab

The Excel Tab


The Numeric Format Tab

  • Upper Threshold Power. Type or select the upper threshold for conversion from decimal to scientific notation from the Upper Threshold Power combination box.

  • Lower Threshold Power. Type or select the lower threshold for conversion from decimal to scientific notation from the Lower Threshold Power combination box.

This combination box value controls the number of decimal digits displayed in the cell when Default Decimal Digits is selected from the Numeric Display drop-down list in the Worksheet Column Format dialog box.

However, when Default Decimal Digits is selected and the worksheet cell value exceeds the Upper Threshold Power combination box value (see above), then Origin displays five digits after the decimal place.

Type or select the desired numeric value separator from this drop-down list. Select Windows Settings to use the separator specified in the system’s Regional Settings Properties dialog box (Regional Settings in the Windows Control Panel).

Specify:

  • Radian (default)

  • Degree

  • Gradian

Note 1: The angular unit setting affects all trigonometric functions computed using LabTalk. For example, if Angular Unit is set to Degree, before computing a function such as sin(x), Origin converts x values to radians. This affects calculations performed in OGS files, the Script Window, Worksheet Scripts, Set Column Values and the Label Control dialog box.

Note 2: This setting does not affect computations in Origin C; Origin C always uses radians.

The Numeric Format Tab

These settings control how Origin displays and interprets worksheet data.

The (Options) Numeric Format Tab Controls (see figure)

  • The Convert to Scientific Notation Group

  • The Number of Decimal Digits Combination Box

  • The Separators Drop-down List

  • The Angular Unit Group


The File Locations Tab

By default, Origin will keep track of the file path for Origin projects, data import files, graphic export files, and other supported file types. Thus, each time you open a new project (or export a graph to a file), the path to the last opened project file (or the path to the last graphic export file) will be selected by default in the Open (or Save As) dialog box.

  • To turn off file tracking for all file types,

  • To alter the path tracking behavior for a particular file type:

select the file group from the top list box and then clear the Track File Dialog Changes check box.

  1. Leave the Track File Dialog Changes check box selected.

  2. Select the file group from the top list box.

  3. Click the Edit button (top right corner). This opens the File Extension Group Defaults dialog box for the specific group.

The Open Path controls tracking when opening or importing the particular file group.

User Path: Select this option to go to the same path that you last used to open a file of this group. (Note that User Path is the default setting. Thus, if you have already opened a file of this group, the path will display in the associated text box.) If you want to specify a custom path and retain it each time you open a file of this group, then click the ... button and browse to the desired path. Click OK to close this dialog box. On the File Locations tab, clear the Track File Dialog Changes check box.

Project Path: Select this option to set the default path in the Open dialog box for this file group to the path of the currently open project.

Origin Path: Select this option to set the default path in the Open dialog box for this file group to the Origin installation folder.

The Save Path controls tracking during saving or exporting.

Use Open Path: Select this option to set the default path in the Save As dialog box for this file group to the path that is currently set from the Open Path. Thus, if you usually want to save a project to the same location where you last opened a project, select this option.

User Path: Select this option to go to the same path that you last used to save a file of this group. (Note that User Path is the default setting. Thus, if you have already saved a file of this group, the path will display in the associated text box.)
If you want to specify a custom path and retain it each time you save a file of this group, then click the ... button and browse to the desired path. Click OK to close this dialog box. On the File Locations tab, clear the Track File Dialog Changes check box.

Project Path: Select this option to set the default path in the Save As dialog box for this file group to the path of the currently open project.

Origin Path: Select this option to set the default path in the Save As dialog box for this file group to the Origin installation folder.

Specifying the Default Type For the Open and Save As Dialog Boxes

The File Extension Group Defaults dialog box also provides a Type drop-down list that lists all the file types in the current group. The selection from this drop-down list determines the default type that is listed in the Open and Save As dialog boxes for the particular group. Thus, if the current group is Image and you select Joint Photographic Experts Group (*.JPG) from the Type drop-down list, then when you export a graph by selecting File:Export Page, Joint Photographic Experts Group (*.JPG) will display by default in the Save as Type drop-down list.

This list box displays the ASCII file descriptions that display in the Files of Type drop-down lists when importing and exporting ASCII files, as well as the file extensions that will display in the associated Look In view box.

To add a file type, press Add. This action opens the File Extension Type dialog box. Type a string in the Description text box that will display in the Files of Type drop-down list when importing and exporting ASCII files. In the Specification(s) text box, type the file specifications for the files that will display in the Look In view box when importing and exporting files.

Example:

Suppose you have a third party program that outputs data to an ASCII formatted file. This formatted file is given a name with an extension .XYZ. You can have Origin display only these XYZ files in the import and export ASCII file dialog boxes by adding an ASCII File Type.

In the Description text box, you might type the name of the third party program. You might also type (*.XYZ) after the name to show what file types are associated with this third party program.

In the Specification(s) text box, you would type *.XYZ. Multiple specifications can be specified by separating them with a semicolon. Example: *.XYZ;*.XY;*.ZZ. Also, both wild cards "*" and "?" can be used.

Now when importing or exporting ASCII files, you can select your new file type from the Files of Type drop-down list and see only the files associated with this program in the Look In view box.

The File Locations Tab

Use these controls to specify file extension and "save" and "open" path information.

The (Options) File Locations Tab Controls (see figure).


The Axis Tab

  • The Numeric Scales Combination Box

  • The Text/Date Time Scales Combination Box

The Numeric Scales combination box value determines the maximum number of major ticks that can be displayed in a graph window when Numeric is selected from the Type drop-down list on the Tick Labels tab of the Axis dialog box.

If the # Major Ticks radio button is selected on the Scale tab of the Axis dialog box and the value in the associated text box exceeds the Numeric Scales combination box value, then Origin displays a maximum of six major ticks in the graph window.

The Text/Date Time Scales value determines the maximum number of major ticks that can be displayed in a graph window when Text from Dataset, Time, Date, Month, or Day of Week is selected from the Type drop-down list on the Tick Labels tab of the Axis dialog box.

If the # Major Ticks radio button is selected on the Scale tab of the Axis dialog box and the value in the associated text box exceeds the Text/Date Time Scales combination box value, then Origin displays a maximum of six major ticks in the graph window.

  • The To Inside Ticks Combination Box

  • The To Outside Ticks Combination Box

  • The To Axis Title Combination Box

Type or select the default distance of an “inside tick” from the tick label, in a percentage of the tick length.

Type or select the default distance of an “outside tick” from the tick label, in a percentage of the tick length.

Type or select the default distance of the axis title from the tick label, in a percentage of the tick length.

This check box controls the format of tick labels that use Scientific notation on a logarithmic axis scale.

Clear this check box to display a logarithmic axis scale using Scientific (1E3) format as follows.

Select this check box to display a logarithmic axis scale using Scientific (1E3) format as follows..

The Axis Tab

Settings on this tab control various graph axis format options.

The (Options) Axis Tab Controls ( see figure)

  • The Max. Number of Ticks Group

  • The Distance from Tick Labels (%) Group

  • The Display 1 as 10^0 in Log Scale Check Box


The Graph Tab

  • The Dash Definition Drop-Down List

  • The Use Origin Dashes in Page View Check Box

  • The Scale Dash Pattern by Line Width Check Box

The Dash Definition drop-down list and its associated text box are used to customize the appearance of the line type specified in the Plot Details dialog box for Line, Line + Symbol and Scatter graphs. Configure the default length of the line and the space, and the size of the period, in the associated text box. For example,

select Dash Dot Dot from the Dash Definition drop-down list. The default values of 18 12 5 12 5 12 display in the associated text box. These values specify that the dash is 18 units in length, the following space is 12 units in length, the following dot is 5 units in length, the following space is 12 units in length, etc. (modify these values as needed).

Select Use Origin Dashes in Page View to see the settings in the Dash Definition drop-down list and associated text box for graph windows in Page View mode. If this check box is cleared, Origin uses settings as determined by the device driver (which are not adjustable).

This check box also ensures that dashes display when zooming in Page View mode. Origin overrides Windows' controls, enabling the pixels to redraw as dashes. This does, however, cause a slight increase in the redraw time.

Select Scale Dash Pattern by Line Width to ensure that Origin scales the length and height of a dash proportionally with the space that follows it.

Type or select the desired value from this combination box to determine the gap between a symbol and line in a line+symbol data plot. Enter a value n to set the line and symbol gap to n% of the symbol diameter. Enter 0 to display no gap. The maximum allowable value is 256. (Note that the Gap to Symbol check box on the Line tab of the Plot Details dialog box must be selected to display a line and symbol gap.)

Type or select the desired value from this combination box to determine the border width of hollow or open symbols in a scatter or line+symbol data plot. Enter n to specify the width of the symbol border as n% of the symbol's half diameter.

Select the fill color that displays when Automatic is selected from the Fill Color drop-down list on the Symbol tab of the Plot Details dialog box.

Select the data plot type for drag and drop plotting. Select Current to use the current data plot style holder of the graph layer.

Select this check box to display a line at Y=0 for zero bar (or column) values in a bar (or column) graph.

Select the Log Scale Use 1 as Floor check box to establish Y=1 as the "floor", or Y value which alters the direction of bar (and column) graphs displayed on a logarithmic scale. This option enhances the display of logarithmic values less than one in a bar (and column) graph.

Select this check box to display alphanumeric characters in the symbol gallery on the Symbol tab of the Plot Details dialog box.

If this check box is selected, Origin will perform interpolation for determining percentile values in statistical analyses.

If this check box is cleared, the percentile calculations will be rounded off. The percentile value will be rounded up to the next member of the data set for calculations below the 50 percentile mark, and will be rounded down for calculations above the 50 percentile mark. The percentile value for the 50 percentile mark is rounded down.

The status of this check box will affect the percentile lines drawn on statistical graphs such as box charts, and also the percentile values reported in results of statistical analyses such as Analysis:Statistics on Columns.

Select this check box to activate in-place activation. In-place activation allows you to edit an Origin object that is embedded in a destination application within the window of the destination application. Origin’s tools are available within the destination window.

Note: We do not recommend in-place activation as you do not have access to the worksheets containing the data plots.

You can display bitmaps that you have created in other programs as symbols in your graph. The bitmaps must be less than or equal to 16 x 16 pixels. If a bitmap is larger than this, Origin will display only the upper-left corner of the bitmap. These bitmaps will display in the symbol gallery on the Symbol tab of the Plot Details dialog box. They will also be available from the Show Construction controls on the same tab.

To add a bitmap to the grid:

  1. Copy your bitmap to the Clipboard.

  2. Click with the left mouse button to select a cell in the grid area.

  3. Press CTRL+V to paste the bitmap into the cell.

The Graph Tab

Settings on this tab control various graph format options.

The (Options) Graph Tab Controls ( see figure)

  • The Origin Dash Lines Group

  • The Line Symbol Gap (%) Combination Box

  • The Symbol Border Width (%) Combination Box

  • The Default Symbol Fill Color Drop-down List

  • The Drag and Drop Plot Drop-down List

  • The Bar Graph Show Zero Values Check Box

  • The Log Scale Use 1 as Floor Check Box

  • The Symbol Gallery Displays Characters Check Box

  • The Percentile with Averaging Check Box

  • The Enable OLE In-place Activation Check Box

  • The User-defined Symbols Grid


The Text Fonts Tab

  • The Greek Drop-Down List

  • The Color Drop-Down List

  • The Size Combination Box

Select the default font that displays when you create a text label with the Text [image] tool.

Select the font to be used when you click the Greek [image] button on the Format toolbar or in the Text Control dialog box.

Select the default color that displays when you create a text label with the Text [image] tool.

Select or type the default text point size used when you create a text label with the Text [image] tool.

Select the font to be used when Default is selected from the font drop-down list in the Text Control dialog box.

Note: When you open a co-worker’s project containing text labels created using the "default" font, note that you may see some differences because Origin displays these text labels using your default font.

This check box applies to all text labels using multiple fonts. When this check box is selected, the bottom of the letters and symbols in a line of a text label align horizontally (for most fonts). This is useful when using several different fonts in the same line of a text label, particularly when using Greek symbols.

This check box applies only to text objects that are displayed in the graph window. If selected, Origin uses the device driver to display the text labels in the graph window when Page view is selected (View:Page View). The text labels will be displayed in the graph window exactly as they will appear in the printed graph. The other objects in the graph window are still displayed using the screen driver.

Select this check box to rotate text labels to the horizontal position during in-place editing. Original orientation is restored when text label is de-selected.

Clear the check box to maintain the text label's true orientation while editing.

Select this check box to disable mouse-click access to the rotation and skewing handles of a label.

Select this check box to disable the in-place editing mode. When the in-place editing mode is disabled, double-clicking the label opens the Text Control dialog box.

  • The Line Spacing Combination Box

  • The Subscript and Superscript Size Combination Box

  • The Subscript Offset Combination Box

  • The Superscript Offset Combination Box

This combination box value controls the space between lines in a text label, as (a percentage of the current font size + current font size).

For example, a 20 point font size and 10% Line Spacing, produces a 22 point space between lines of text within a single label.

This combination box value controls the size of a subscript and superscript in a text label, as a percentage of the current font size.

This combination box value controls the offset of a subscript from the baseline of a text label, as a percentage of the current font size. The subscript displays the specified percent below the baseline.

This combination box value controls the offset of a superscript from the top of a text label, as a percentage of the current font size. The superscript displays the specified percent above the top.

The Text Fonts Tab

Use these controls to specify various text label font format options.

The (Options) Text Fonts Tab Controls ( see figure)

  • The Text Tool Group

  • The Default Drop-down List

  • The Align Fonts with Baseline Check Box

  • The WYSIWYG in Page View Mode Check Box

  • The Make Text Horizontal for In-Place Editing Check Box

  • The Simple Selection Mode

  • The Disable In-place Editing Mode

  • The In Percent of Current Font Group


The Page Tab

This group provides controls for copying a graph to the Clipboard and for exporting a graph to a vector image file. Vector image files include: Adobe Illustrator (*.AI), Computer Graphics Metafile (*.CGM), AutoCAD Drawing Interchange (*.DXF), Encapsulated PostScript (*.EPS), Enhanced Metafile (*.EMF), Portable Document Format (*.PDF), and Metafile (*.WMF).

Note: Starting with Origin 7.5, the Margin Control and the Clip Border Width combo box settings do apply to raster images as well as vector and Clipboard images. The Ratio and Simple/Advanced controls do not apply to raster images.

  • The Ratio Combination Box

  • The Margin Control Drop-down List

  • The Clip Border Width Combination Box

  • The Simple and Advanced Controls

Controls the size of the page when pasted into another application, or when exported to a vector graphic file. The units are as a percent of the Origin page size (set to 100 for 100%, etc.)

This drop-down list value controls the amount of the page in the graph window that is copied when selecting Edit:Copy Page, as well as when exporting to a vector graphic file. The “bounding box” used in the Border and Tight modes is page specific. The bounding box is determined by the smallest rectangular box required to completely encompass all objects on the graph page.

Select Border to copy the page (or export the graph) within the bounding box plus add the border that is specified in the Clip Border Width combination box.

Select Tight to copy the page (or export the graph) within the bounding box.

Select Page to copy the entire page (or export the graph) in the graph window.

Note 1: “Page” is defined as the area within the white (default) background behind your Origin graph(s). The dimensions of this area are defined by your printer’s “printable area.” Occasionally, upon exporting your graph (either by selecting Edit:Copy Page, or using one of Origin’s vector formats), you will see that your graph has unexpectedly shrunk to a fraction of its anticipated size.

Note 2: On occasion, an object exists somewhere outside the graph page (for example, a text object that has been created, dragged off the page, and forgotten). When Margin Control is set to Border or Tight, Origin draws the bounding box around all objects on the graph, including unseen objects that may be located outside the page. This has the effect of shrinking the exported graph. In such cases, set the Margin Control to Page and only objects that lie within the page – that is, within the white background behind your Origin graph – will be exported.

This combination box is only available if Border is selected from the Margin Control drop-down list. This value determines the border that is included when selecting Edit:Copy Page, or when exporting to a vector graphic file. The value is in percentage of the width of the bounding box.

Graphs exported to a vector file or copied in Origin 6.0 and Origin 6.0 SR1 sometimes exhibited skewed or stretched symbols, improperly sized columns or bars, and text label spacing problems when inserted into a receiving application such as Microsoft Word. The Simple and Advanced radio buttons (and related controls) are provided to fix these problems.

Note that the default settings (Advanced, Set Resolution = 300) will correct most export and copy problems experienced in the earlier versions.

The Simple mode provides output that most resembles Origin version 5.0. However, it does NOT support the following:

  • Hatching of a nonrectangular area (for example, the use of a fill pattern), as can be found in fill area, contour, and 3D XYY plots.

  • Fill Area Exclusive Broken by Missing Values mode.

The Advanced mode should not have the sizing, spacing, and skewing problems described previously when working in NT 4.0 and Windows 2000. However, in Windows 98 and Windows 95, the nonrectangular hatching may still fail, although it may also depend on the container.

The best technical quality is achieved with the Set Resolution mode set between 300 and 600 DPI. This Set Resolution setting does not affect the physical dimensions of most vector files, EMF being the exception.

When exporting EMF files, the real size of the picture will be approximately the desired size multiplied by the ratio between this Set Resolution setting and the screen resolution (see Note). This enlarged size will not be reported by containers (receiving applications) such as Microsoft Word or CorelDraw 9 if you paste the picture, but it will be reported if the graph is exported to a file and then inserted into these applications. It turns out, though, that Microsoft Word automatically resizes the inserted picture to a reasonable size. However, CorelDraw seems to be less predictable. If necessary, manually resize the inserted picture in CorelDraw.

The Keep Size radio button in the Advanced mode provides output that most resembles Origin version 6.0 and Origin 6.0 SR1. Selecting this radio button will ensure that the size is in exact proportion to the page settings (Format:Page) as defined by the Copy Page Ratio combination box value on this Options dialog box tab. Unfortunately, selecting the Keep Size radio button yields the worst technical quality, particularly for small Copy Page Ratio settings.

In general, it is best to use the Advanced mode and select a Set Resolution setting between 300 and 600 DPI. While you can expect that higher resolutions will produce a sharper image, there is a limit beyond which there will be no noticeable effect.

If, for instance, an EMF is generated with a resolution of 900 and rendered on a printer with a dpi (resolution) of only 300, the EMF will contain more information than can be used by the printer. Even in cases where the printer does support higher resolutions (say 1200 dpi), there will be little visible improvement from 600 dpi to 1200 dpi.

If you find that some devices or containers (receiving applications) do not reproduce the graph correctly, try adjusting the Page tab settings based on the information provided here.

Note: To determine Screen Resolution, right-click on your desktop and select Properties. Select the Settings tab (or a similar tab) and look for the Font DPI setting.

  • The Axis Combination Box

  • The Object Combination Box

Type or select the desired value from this combination box to set the spacing of the axis grid lines in pixels.

Note: To view the grid lines, select View:Show:Grid Type.

Type or select the desired value from this combination box to set the spacing of the object grid lines in pixels.

The Page Tab

These settings control the page size of exported graphs and axis and object grid spacing.

The (Options) Page Tab Controls (see figure)


The (Options) Miscellaneous Tab

  • X Scale Factor

  • Y Scale Factor

This combination box value determines the X scale adjustment for printing. Modify the default value if your printer does not produce a graph with the width specified in the Width text box on the Size/Speed tab of the layer's Plot Details dialog box. For example, if you specify a width of 6 inches in the Width text box, but your graph prints 6.0625 inches wide, set the X Scale Factor combination box value to 1010, because (6.0625*1000)/6=1010.

This combination box value determines the Y scale adjustment for printing. Modify the default value if your printer does not produce a graph with the height specified in the Height text box on the Size/Speed tab of the layer's Plot Details dialog box.

This group allows you to define your own custom date formats. These custom date formats will display in the Display drop-down list when Date is selected from the Format drop-down list in the Worksheet Column Format dialog box.

When you specify a custom date format, there should be no more than 60 characters in the custom date string. "Sandwich" format strings such as TIME-DATE-TIME or DATE-TIME-DATE are not allowed.

Use the following elements to construct a custom date string:

Type this...

To signify...

What displays in Origin

M

Month

M = number of month (for example, January = 1). Separators (enclosed in single quotes) must follow this element.

MM = 2 digit number of month (for example, January = 01).

MMM = three letter abbreviation (for example, Jan).

MMMM = full month name (for example, January). Separators (enclosed in single quotes) must follow this element.

d

Day

d = day of month (for example, 1). Separators (enclosed in single quotes) must follow this element.

dd = two digit day of the month (for example, 01).

ddd = three letter abbreviation of day (for example, Mon).

dddd = full day name (for example, Monday). Separators (enclosed in single quotes) must follow this element.

y

Year

y = last 1 or 2 digits of year (for example, 1901 = 1). Separators (enclosed in single quotes) must follow this element.

yy = last 2 digits of year (for example, 1901 = 01).

yyyy = full year (for example, 1901 = 1901).

h

Hour

h = hours with no leading zero for single-digit hours; 12-hour clock. Separators (enclosed in single quotes) must follow this element.

hh = hours with leading zero for single-digit hours; 12-hour clock.

H

Hour

H = hours with no leading zero for single-digit hours; 24-hour clock. Separators (enclosed in single quotes) must follow this element.

HH = hours with leading zero for single-digit hours; 24-hour clock.

m

Minute

m = minutes with no leading zero for single-digit minutes. Separators (enclosed in single quotes) must follow this element.

mm = minutes with leading zero for single-digit minutes.

s

Seconds

s = seconds with no leading zero for single-digit minutes. Separators (enclosed in single quotes) must follow this element.

ss = seconds with leading zero for single-digit seconds.

#

Decimal after seconds

# = one digit after the decimal point for seconds.

## = two digits after the decimal point for seconds.

### = three digits after the decimal point for seconds.

#### = four digits after the decimal point for seconds.

t

Time marker

t = one character time marker string, such as A or P.

tt = multi-character time marker string, such as AM or PM.

Examples

To create a custom 1 date selection that displays the format:

Saturday, September 5, 1998

type:

dddd', 'MMM' 'd', 'yyyy

The elements in the custom date string must be in uppercase or lowercase (for example, "MM" not "mm" for months). Elements in the custom date string may be separated by any alphanumeric character not listed above. If an element does not clearly specify how many characters should be expected on input, it must be followed by a separator enclosed in single quotes. If the element is last in the format string, the separator does not have to be in single quotes. Separators will appear in the same location in the worksheet display. However, the single quotes will not be displayed. You can not have two separators in single quotes adjacent to each other. For example, "ddd '|' '-'MMM" is forbidden.

When a space is enclosed in single quotes, it is used as a parser. This means that the data that is put in the cell must have the same number of characters between data values as are enclosed in the single quotes. If you want to add space to data that does not already have it, use unquoted separators in the custom date string. These spaces, however, will be used only for display purposes, not for parsing an input date/time string. See the following table for examples.

Custom Date | Input | Output | Notes
MM dd | 0416 | 04 16 | The unquoted space was ignored by the parser. Therefore, the input was strictly according to the format.
MM' 'dd | 02 12 | 02 12 | The format expected just one space separator, but it is acceptable to have extra spaces in the string.
MM' 'dd | 0212 | - | A space separator was expected, so the parser failed.

  • The No Redraw (% Covered) combination box value controls the redrawing of windows. Origin will not redraw a window if that portion of the window that is covered by another window exceeds this value.

  • The Bisection Search Points combination box value speeds up the search process when using the Data Reader tool or when double-clicking on a data plot. When you click on a data plot using the Data Reader tool, Origin begins searching for the nearest point using a sequential or bisection search. If the number of data points is less than the bisection search value, then sequential search is used. If the number of points is greater than the bisection search value, then bisection search is used. (Note that the bisection search requires a sorted X data set.)

  • The Delete Empty Columns After Worksheet Transpose combination box controls whether or not Origin deletes empty columns after transposing worksheet columns and rows.

  • The Default Multi-ASCII Import Template drop-down list controls the default worksheet template used when importing multiple ASCII files into multiple worksheets.

  • The Default Multi-ASCII Import Plot XY drop-down list controls the default setting in the Plot Designation Column list of the Import Multiple ASCII dialog box.

Option | Result
XY1 | Origin will import all the columns. Origin assumes the first column contains X values and all remaining columns contain Y values. In this case, the "1" indicates that the last character "Y" is repeated for all remaining columns.
DXY1 | Origin will import all the columns. Origin assumes the first column contains values that should be disregarded. Origin assumes the second column contains X values and the remaining columns contain Y values. "1" indicates that the last character "Y" is repeated for all remaining columns.
XY | Origin will import the first and second columns as X and Y values respectively.
XY2 | Origin will import all the columns. However, in this case Origin assumes the first column contains X1 values, the second column contains Y1 values, the third column contains X2 values, the fourth column contains Y2 values, and so on. In this case, the "2" indicates that the last two characters "X" and "Y" are repeated for all remaining columns.
XYE | Origin will import the first, second, and third columns as X, Y, and Y error values respectively.
XYZ | Origin will import the first, second, and third columns as X, Y, and Z values respectively.

  • The Use Numeric as Preferred Column Type check box controls whether all columns in all new worksheets are of Numeric or of Text & Numeric type (default). If you are planning on sharing your Origin project with a colleague who has Origin 4.1, you should select this check box. Failing to do this could cause a loss in data when the project is opened in Origin 4.1.

  • Select the Use Toolbar Spacer check box to display a toolbar spacer below the menu bar. The toolbar spacer ensures that the toolbar area remains at a fixed width when changing the active window. The height of the toolbar spacer is determined by the maximum height required to display all the selected toolbars for any of the windows in the project.

(To hide the toolbar spacer, right-click in the toolbar spacer region and select Hide Toolbar Spacer from the shortcut menu.)

  • The Display Bitmaps in Menus check box controls whether or not bitmaps display next to menu commands. Menu commands that have toolbar button access have bitmaps that display to the left of the command.

The Miscellaneous Tab

The (Options) Miscellaneous Tab Controls (see figure)

  • The Printing Options Group

  • The Custom Date Formats Group

  • Additional Controls


The Open/Close Tab

Opt to Hide or Delete a child window without incurring an attention message confirming your action (i.e. to hide a window instead of deleting it, select Hide Only from the drop-down list). Prompt is the default behavior.

Select this check box to display a prompt when closing the Script window (if the contents have been modified). This prompt also displays when exiting Origin if the Script window contents have been modified.

  • Start New Project Drop-Down List

  • Backup Project Before Saving Check Box

  • When Opening Minimized Windows Drop-Down List

  • Prompt for Save on Options Dialog Close Check Box

  • Save Settings on Close Check Box

This drop-down list allows you to select the window or project you want to have displayed when you open a new project. You can select from worksheet, Excel workbook, empty graph, matrix, ORIGIN.OPJ, or none. The ORIGIN.OPJ file includes a worksheet and a graph window. The layer contents of the graph window is configured to display the column B data set.

Select this check box to automatically create a backup of the currently saved file before re-saving. Origin renames the saved file BACKUP.OPJ, and then saves the altered file using the specified file name.

This drop-down list allows you to select how windows that are saved as minimized in pre-version 6 projects open in Origin 6. Opening minimized windows as hidden windows improves the loading time of your project. Hidden windows can be accessed from the Project Explorer.

Select this check box to open an attention dialog box after the Options dialog box is closed, asking if you want to save the changes as Origin's startup options.

When Prompt for Save on Options Dialog Close is cleared, then the Save Settings on Close check box is available.

Select this check box to automatically save the changes to the Options dialog box as Origin's startup options.

Clear the check box to restore the default options when you exit Origin.

The Open/Close Tab

Controls for opening and closing behaviors of Origin child windows and projects.

The (Options) Open/Close Tab Controls (see figure)

  • The Window Closing Options Group

  • Additional Controls


The Excel Tab

  • The Scan Data for Legend Check Box

  • The Plot Into Drop-down List

Select this check box to plot by highlighting the workbook data and assuming column designations appropriate to a selected graph type. If no workbook data is highlighted when the graph type is selected, Origin opens the Select Data for Plotting dialog box.

Select this check box to create a graph legend by automatically searching the associated workbook for text. For each data plot, Origin begins searching for legend text in the cell immediately above the cell that contains the first Y data values. Origin continues to search upward in the column until it finds text values.

When selecting multiple data sets for plotting, control the display of the data plots from this drop-down list.

Select Single Layer to plot the selected data sets into a single layer in a graph window.

Select Multiple Layers to plot each selected data set into its own layer. All layers display in the same graph window.

Select Multiple Pages to plot each selected data set into its own layer. Each layer displays in its own graph window.

  • The Opening Excel Files Check Box

  • The Saving Excel Workbooks Drop-down List

Select this check box to show a dialog box that allows the user to choose how Excel files are opened in Origin.

When this check box is selected, the Open Excel dialog box opens when you select File:Open Excel, or when you click the Open Excel button on the Standard toolbar (and select a file and click Open). The Open Excel dialog box provides the option of opening the Excel file as an Excel workbook or as an Origin worksheet(s).

When this check box is cleared, Origin opens the Excel file as an Excel workbook.

This drop-down list controls the display of a dialog box that determines how internal and external Excel workbooks are saved when you save a project that contains the workbook.

Select Never to prevent Origin from opening the Save Excel Workbooks dialog box under all circumstances. By default, external Excel workbooks are automatically updated when the project that includes the workbook is saved.

Select Before Saving to direct Origin to open the Save Excel Workbooks dialog box whenever you select File:Save Project (or whenever you click the Save button on the Standard toolbar), assuming the project includes an Excel workbook. The Save Excel Workbooks dialog box allows you to determine which (external) Excel workbook files to update when the project is saved. By default, all external Excel workbooks are updated.

Select Before Saving Project As to direct Origin to open the Save Excel Workbooks dialog box whenever you select File:Save Project As, assuming the project includes an Excel workbook. (See the Before Saving option.)

The Excel Tab

The (Options) Excel Tab Controls (see figure)

  • The Plotting Selection Group

  • The Prompt Before Group


The Customize Toolbar Dialog Box

The Toolbars tab includes controls to:

  • Turn toolbars on and off.

  • Restore built-in toolbar configurations.

  • Create or delete user-defined toolbars.

Dialog Box Controls ( see figure)

The Toolbars List Box

The Toolbar Name Text Box

The Show Tooltips Check Box

The Flat Toolbars Check Box

The New Button

The Reset/Delete Button

The Reinitialize Button

Select or clear check boxes to turn toolbars on and off.

Edit names of user-defined toolbars.

Enables/disables the floating text that appears when you mouse over a toolbar button.

Toggle between flat or 3D toolbar button bitmaps.

Opens the New Toolbar dialog box. Enter the name of your user-defined toolbar.

Restores the default button group for a built-in toolbar.

Deletes a user-defined toolbar.

Returns all built-in toolbars to the default configuration at the time of installation. Changes take effect when Origin is restarted.

The Button Groups tab includes controls to:

  • Add (or remove) buttons to a toolbar.

  • Create new button groups (new toolbars).

  • Link a toolbar button with an OGS (script) file.

Dialog Box Controls ( see figure)

The Groups List Box

The Buttons Group

Button Group: Add or Delete Buttons

The Settings Button

The Button Group Group

Lists all built-in and user-defined button groups. Select a group to see the member buttons.

Lists the buttons in the highlighted Groups button group.

Add buttons to, or delete buttons from, a user-defined Button group.

The New Button

The Add Button

The Delete Button

The Export Button

The Customize Toolbar Dialog Box

The Customize Toolbar dialog box provides interface control over Origin’s built-in toolbars and toolbar buttons. There are two tabs in the dialog box:

The Toolbars Tab

The Button Groups tab

Click here to view a multi-media demonstration


Programming a Button on the User-Defined Toolbar to Perform a Task

The Button Settings Dialog Box ( see figure).

The File Name Text Box

The Section Name Text Box

The Argument List Text Box

The Tool Tip Text and Status Bar Text Boxes

The Context Group

Specify the LabTalk script file that contains the script for this button. You can specify a built-in script file or a custom script file that you or another Origin user created. Script files have the file name extension .OGS.

The script file is a text file that is organized in sections. Each of these sections is identified by the name of the section, surrounded by square brackets. This is a section from one of the .OGS files that is installed with your Origin software.

Note: To view an example LabTalk script file:

1) Select File:Open.
2) Select LabTalk Script (*.OGS) from the Files of Type drop-down list.
3) Select a script file.
4) Click Open.

For example, select ARROW.OGS. The script file opens in a LabTalk Editor window.

For more information on LabTalk, see the LabTalk Language Reference section of the Programming Help file (Help:Programming=>LabTalk Language Reference).

Specify the script file section that contains the script for this button in the Section Name text box.

In the script file, section names are enclosed in brackets. For example:

[SectionName]

To pass the script file section an argument (or arguments), type the argument(s) in the Argument List text box.

Specify the ToolTip and status bar messages for the button in the respective text boxes.

You can restrict the button's availability to instances when a window created from a particular template is active, or when a specific window type is active. Furthermore, you can restrict the button's availability based on the value of a specified variable. To restrict a button's availability based on a variable value, type the variable name or a test condition in the Variable text box (see the following example).

To determine the button's availability, Origin first checks the template and window type restrictions. If the button passes this criteria, Origin then checks to see if a variable (or object property) has been associated with the button.

If you entered a variable name in the Variable text box, Origin then checks the current numeric value of the variable. If the current variable value is zero, Origin disables the button. Otherwise, Origin enables the button. For example, if you enter wks.sel in the Variable text box, then whenever there is a selection in the worksheet, wks.sel would be non-zero, and the button would be enabled.

If you entered a test condition in the Variable text box, Origin then checks to see if the test condition is False (zero) or True (non-zero). If the test condition is False, Origin disables the button. If the test condition is True, Origin enables the button. For example, if you entered ...

wks.sel == 8

... then whenever a range of data is selected in the worksheet, this condition would be True and the button would be enabled.

Programming a Button on the User-Defined Toolbar to Perform a Task

The User-Defined button group includes 10 non-preprogrammed toolbar buttons that can be associated with, and used to run, your custom tasks.

To associate a User-Defined group button with a custom task:

  1. Open the Customize Toolbar dialog box (View:Toolbars) and select the Button Groups tab.

  2. Select the User Defined button group from the Groups list.

  3. Select a button in the Buttons group.

  4. Click on the Settings button in the Button group. This opens the Button Settings dialog box.

  5. Edit the Button Settings dialog box and click OK to complete the programming of your custom button.

Click here to view a multi-media demonstration


Creating a Group of Buttons that Perform Custom Tasks

To create a new custom button group:

  1. Click the New button in the Button Group group. This opens the Create Button Group dialog box (see figure).

Specify...

  • the button Group Name.

If you enter the name of an existing button group, Origin will prompt you to Rename, Merge, or Replace the existing button group.

  • the Number of Buttons in the group (maximum number of buttons for a group is 50).

  • the Bitmap file for the button(s).

The bitmap must be a 16 color bitmap. Additionally, the bitmap should consist of a 16 pixel by 16 pixel segment for each button in your custom button group. So, for instance, if you wished to create a 5 button group, your bitmap would have to measure 16 pixels by 80 pixels. Origin will parse the bitmap using the Number of Buttons specification.

  2. Click OK.

If all of the information that you provided was valid, Origin opens the Save As dialog box. By default, the Group Name displays in the File Name text box.

  3. Click Save to save your new group settings to the specified initialization file.

After completing these steps, your new button group displays in the Groups list box (on the Button Groups tab of the Customize Toolbars dialog box). You can now customize the button settings for the buttons in your group as per the procedure outlined in Programming a Button on the User-Defined Toolbar to Perform a Task .

  • Rename changes the new button group name.

  • Merge combines both button groups.

  • Replace deletes the existing button group and installs the new group.

Creating a Group of Buttons that Perform Custom Tasks

In addition to programming buttons in the User Defined button group, you can add new groups of custom buttons to Origin.

There are three ways that you can do this:

  • Create a new button group.

  • Copy another Origin user's custom button group to your Origin program folder.

  • Install button groups that have been exported to a .OPK file.


The initialization file is created when you click the New button in the Button Group group and then edit the Create Button Group and the Save As dialog boxes.

The bitmap file is specified in the Create Button Group dialog box. This information is then added to the button group's initialization file.

The LabTalk script files are specified for each button in the group in the respective Button Settings dialog box. This information is then added to the button group's initialization file.

Copying a Custom Button Group from Another Location

A custom button group (including the User Defined group) has:

  • An associated initialization (.INI) file.

  • A bitmap file.

  • At least one LabTalk script file.

If another Origin user (for example, a user on your network) has a custom button group that you want access to:

  1. Copy the user's custom .INI file, bitmap file, and LabTalk script file to your Origin folder.

  2. Run your copy of Origin(Pro).

  3. From the menu, select View:Toolbars and select the Button Groups tab.

  4. In the Button Group group, click Add. This opens the Add Button Group dialog box.

  5. Specify the path to the .INI file for the button group and then click the OK button. The new button group now displays in the Groups list.

Note: The preferred way to exchange button groups is to create an .OPK file. For more information, see Exporting Button Groups .


Modifying Custom Button Groups

Controls on the Button Groups tab of the Customize Toolbar dialog box (View:Toolbars) allow you to remove or modify the bitmap for custom button groups, and to remove and add buttons to custom button groups.

Deleting a Custom Button Group

Modifying the Bitmap for a Custom Button Group

Removing a Button from a Custom Button Group

Adding a Button to a Custom Button Group


Deleting a Custom Button Group

To remove a custom button group:

  1. Select the button group that you want to remove from the Groups list box.

  2. Click the Delete button in the Button Group group.

An attention prompt asks for verification before removing the group.

  1. If you click Yes, Origin removes the custom button group from the Groups list box. If any buttons from this (removed) group are placed on toolbars, those buttons will no longer function after you remove the group.

Note: You cannot remove built-in button groups.


Modifying the Bitmap for a Custom Button Group

Once you have added a new button group, you can modify the bitmap for the group:

  1. Select the desired group from the Groups list box.

  2. Type the new path and file name in the Bitmap text box, or click the Browse button to locate the new bitmap file.

Note: You can also modify the bitmap for the User Defined button group.


Removing a Button from a Custom Button Group

To remove a button from a custom button group (including the User Defined button group):

  1. Select the button that you want to delete.

  2. Click the Delete button in the Button group.


Adding a Button to a Custom Button Group

To add a button to a custom button group (including the User Defined button group):

  1. Select the button group to which you want to add the button.

  2. Click the Add button in the Button group.

The Add Button dialog box opens.

  3. Select or enter the index number that corresponds to the button image in the bitmap file.

  4. Click OK. The button is added to the custom button group.


Exporting Button Groups

When you create a custom button group, you can easily share your custom button group with another Origin user. This exchange is accomplished by exporting your custom files to a special file with a .OPK extension, and then sending that file to the intended Origin user (Note that you cannot install OPK files on Origin versions prior to 6.1). For example, if you were to use OriginPro to create a Dialog Builder wizard and a button from a custom button group to open this wizard in Origin, you could then share the button group and associated files with any other Origin user.

Installation of the OPK file is simple: the Origin user simply drags the .OPK file onto their Origin program button on the taskbar or onto their Origin program window (or they can double-click on the OPK file), and the your custom files are automatically unpacked to the correct location.

To learn more, see...

Creating the Export (.OPK) File

Installing the .OPK File


Creating the Export (.OPK) File

  1. From the menu, choose View:Toolbars to open the Customize Toolbar dialog box.

  2. Select the Button Groups tab.

  3. Select your custom button group from the Groups list box.

  4. Click the Export button in the Button Group group. This opens the Export Button Group dialog box.

The upper view box lists the files that will be exported to the .OPK file when you click Export. By default, this view box lists the initialization file and the bitmap file for the custom button group, and the LabTalk script files associated with the buttons in the group.

To add files to the list:

  5. Click the Add File button. This opens the Open dialog box.

  6. Select additional files. Additional files are displayed in the Additional Files view box. Note that you can only include files that are located in the Origin folder or one of its subfolders.

  7. To remove an additional file, select the file you want to remove, then click the Remove File button.

The For Use By drop-down list allows you to restrict installation of your .OPK file:

To complete the creation of your .OPK file:

  8. Click the Export button. This opens the Save As dialog box. By default, Origin lists the custom button group name in the File Name text box.

  9. Edit the file name and path, as needed*.

  10. Click Save to create the .OPK file.

*Note: The file name extension must be .OPK. You do not need to enter this extension as Origin will add it automatically. If you enter an extension other than .OPK, .OPK will be appended on the file name.

See Installing the .OPK File for installation information.

  • All Users allows anyone who receives your .OPK file to install your custom button group to their Origin folder (user must have version 6.1 or later).

  • Licensed Users allows only users of Origin 6.1 or later to install your custom button group (excludes Evaluation software users).

  • Registered Users allows only users who have registered and entered their Registration ID in their Origin software to install your custom button group.

Creating the Export (.OPK) File

When creating a custom button group for export to a .OPK file, consider saving your button group's initialization file, bitmap file(s), script file(s), and any other support files to a user-created subfolder in the Origin program folder. When another Origin user installs your .OPK file, your custom subfolder will automatically be created in the user's Origin folder, and this subfolder will contain the files for the custom button group. This allows you to keep your custom files separate from the other Origin files. This is particularly helpful if your end user happens to install multiple .OPK files. Do not save your button group's files to a folder outside of the Origin program folder.

To export your custom button group (or the User Defined button group) to a .OPK file:


Installing the .OPK File

Successful OPK file installation may depend on your ability to meet the file creator’s For Use By restrictions for the .OPK file. Access restrictions -- if any exist -- are set in the Export Button Group dialog box. This dialog box is opened by clicking the Export button on the Button Groups tab of the Customize Toolbar dialog box.

To install the .OPK file, do one of the following:

  • Double-click on the .OPK file.

  • Drag the .OPK file onto the Origin program workspace.

  • Hold down the left mouse button and drag the .OPK file onto the Origin program button on the taskbar (Origin is minimized). When the Origin workspace is restored, drag the .OPK file to the Origin workspace and release the mouse button.

When you perform one of these three operations, the .OPK file will install into the specified installation of Origin. If you double-clicked on the .OPK file, the .OPK file will install into the most recently run installation of Origin (if you have multiple installations).

During the .OPK installation, two things happen:

  • The custom button group is added to the Groups list box on the Button Groups tab of the Customize Toolbar dialog box (View:Toolbars=>Button Groups tab).

  • A toolbar containing the buttons from the custom button group is automatically created in the Origin workspace.

Note: When you install the .OPK file, Origin will save the custom files so that it maintains the folder structure that existed when the .OPK file was created. For example, if the custom button group's initialization file, bitmap file, script files, and other support files were saved in a \CUSTOM subfolder of the Origin program folder when the .OPK file was created, this \CUSTOM subfolder will be created in the "target's" Origin program folder. The custom button group's files will also be saved to this \CUSTOM subfolder.


Customizing the Color Palette

  1. Select Format:Color Palette.

This opens the Color Palette dialog box.

  1. Select a color.

  2. Click Move Color Up [image] or Move Color Down [image].

  1. Click on a color in the Color Palette dialog box. This opens the Color dialog box.

  2. Select a color from the Basic Colors gallery or click Define Custom Colors to define a custom color.

  3. Make your changes then click OK to close the Color dialog box.

Your custom color displays at the same location in the palette. To associate a custom name with this color, double-click on the text in the Name column and name your new color.

  1. Click the New Color [image] button in the Color Palette dialog box. This action opens the Color dialog box.

  2. Define your new color in this dialog box and click OK.

Your new color displays at the bottom of the color palette with the name New Color. Double-click on New Color to give a name to the color.

  1. Select the color.

  2. Click the Delete Color [image] button.

All the colors below this color move up one index level in the palette.

  1. Click the Load Default button in the Color Palette dialog box.

Customizing the Color Palette

Color options are generally available from either:

  • buttons. The color buttons provide a number of color control options, including selecting a color from the color palette, or incrementing through the colors in the color palette (see, Customizing the Colors in Your Data Plot).

  • drop-down lists. The color drop-down lists display the colors from Origin's color palette.

The Origin color palette ships with 24 pre-defined colors. You can add up to 16 colors to the palette (for a total of 40 colors).

To customize the colors in the color palette:

To change the order of colors in the color palette:

To customize a color in the color palette:

To add a color to the color palette:

To delete a color from the color palette:

To reset the color palette to the default settings:

Note: There are a couple of colors in this palette that are used globally by Origin to do such things as set background or default text colors (specifically, black and white). Changing the index numbers (1 and 18, respectively) of these two colors in not advisable.


Adding New Color Palettes to Origin

You can add new image palettes that are in Microsoft binary or JASC ASCII format and that are 256 color.

To do this:

  1. Copy the file to the Origin \Palettes subfolder.

The next time you start Origin, these new palettes will display in the Image:Palette submenu.

You can create new palettes using any external application that writes the palette out in the Microsoft .PAL format. This is the only format that is recognized by Origin.

Additionally, Origin provides a palette editor project file located in the Origin subfolder:

\SAMPLES\PROGRAMMING\PALETTE EDITOR\PALEDIT.OPJ


Creating an ASCII file for a Range of Data

If you want to save a range of worksheet data to an ASCII file, perform one of the following procedures before selecting File:Export ASCII.

  • Highlight the desired range of worksheet data.

  • Delete the rows and columns of data that you do not want to export using the Edit:Delete menu command. This results in a permanent alteration of your worksheet.

  • Change the display range of the worksheet before exporting the data. Use the Edit:Set as Begin and Edit:Set as End menu commands to establish the display range for a column or range of columns. After exporting the desired data range, return the worksheet to the full display range by selecting Edit:Reset to Full Range.


Creating an ASCII File for Worksheet Data

To save worksheet data to an ASCII file, select File:Export ASCII when the worksheet is active. This menu command opens the Export ASCII dialog box. The contents of the active worksheet is saved into a tab-delimited (by default) ASCII file.

After you click Save in the Export ASCII dialog box, the ASCII Export Into dialog box opens.

The ASCII Export Into Dialog Box

The Include Column Names Check Box

When this check box is selected, the column names are copied to the first line of the ASCII file, followed by <CR>, and then the data. The separator selected from the Separator drop-down list is used to separate the column names and data.

The Include Column Labels Check Box

When this check box is selected (and the Include Column Names check box is selected), the column labels are copied to the second line of the ASCII file, followed by <CR>, and then the data. If the Include Column Names check box is not selected, then the column labels are copied to the first line of the ASCII data file.

The separator selected from the Separator drop-down list is used to separate the column labels and data.

The Export Selection Check Box

If you want to export a section of the worksheet data, highlight the desired section of data before selecting File:Export ASCII. If a section of worksheet data is selected, the Export Selection check box will be selected by default. Do not clear the check box unless you want to export the entire contents of the worksheet.

If you select Edit:Set As Begin and Edit:Set As End to set the worksheet range, the Export Selection check box will not be selected. Only the displayed worksheet range exports.

The Separator Drop-down List

Select the desired separator (or delimiter) from the Separator drop-down list for the data and column names/labels (if the Include Column Names/Labels check boxes are selected).

Creating an ASCII File from a Range of Data


Exchanging Data through the Clipboard

In addition to adding data to a worksheet by importing a data file, you can paste or paste link data from another application into an Origin worksheet using the Clipboard. Furthermore, you can exchange data between Origin worksheets or within a single worksheet.

Using the Clipboard to Exchange Data

Pasting Graphics from the Clipboard