Getting Started With OriginPro 8 Part 1

  • Upload
    awulu1

  • View
    75

  • Download
    0

Embed Size (px)

Citation preview

Information Systems Services

TUT 77 Getting Started with OriginPro 8 (Part 1)An introduction to OriginPro, a scientific charting package.

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

ContentsIntroduction Task 1 Task 2 Task 3 Task 4 Task 5 Task 6 Task 7 Task 8 Running OriginPro Creating a simple graph Editing graphic elements Saving your work Obtaining printed output Exporting to an image file Importing data files Multiple graphs on the same page 3 4 6 11 18 19 21 23 25

Format Conventions In this document the following format conventions are used: Commands that you must type in are shown in a bold, Courier font. Menu items are given in a bold, Arial font. Keys that you press are given in a bold, Arial font, enclosed in angle brackets. WIN31Windows Applications

Feedback If you notice any mistakes in this document please contact the Information Officer. Email should be sent to the address [email protected]

Copyright This document is Copyright University of Leeds. Permission to use material in this document should be obtained from the Information Officer (email should be sent to the address [email protected]).

Print Record This document was printed on 17-Nov-09.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 2 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

IntroductionOriginPro is a scientific charting and data analysis package. It is fast, powerful, easy to use and ideal for anyone who needs advanced graph plotting, data handling and analysis. OriginPro provides a graphing environment where you can enter your data, or import data files from other applications, to create professional looking graphs which can then be output in a variety of ways. This document describes the basic features available in OriginPro and gives a series of exercises in its use. For more information about OriginPro see http://www.originlab.com, OriginLab Corporations homepage. OriginPro is available on the ISS Cluster Desktop and ISS Desktop Anywhere. The University has a site licence for OriginPro which is distributed through the ISS IT Shop (Room 10.02b, Red Route, [email protected], 0113 34 35360). This licence covers both campus and home use for staff and students.

PrerequisitesIt is assumed that you are running OriginPro from the ISS Cluster Desktop and are familiar with Microsoft Windows XP. No prior knowledge of OriginPro is assumed. Users of OriginPro elsewhere should be able to follow the instructions though please bear in mind that some parts, such as accessing the software and printing, may differ.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 3 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Task 1 Running OriginProObjective To run OriginPro.

Activity 1.1

To run OriginPro: Click on Start > Programs > Graphics > OriginPro 8 (see Figure 1).

Figure 1. Finding OriginPro 8 on the ISS Cluster Desktop The screen shown in Figure 2 should be displayed.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 4 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Figure 2. The OriginPro screen

Activity 1.2

To ensure that all menu options are available for the session: Select Full Menus from the Format > Menu menu, as shown in Figure 3.

When this is selected, there is a bullet against it, as shown.

Figure 3. Menu selection

Information Systems Services Anna Clough 3.2 (November 2009)

Page 5 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Task 2 Creating a simple graphObjective To create a simple graph. Instructions You will enter data into a worksheet and create a graph.

Activity 2.1

By default, OriginPro opens displaying a workbook window. This workbook contains a single worksheet with two columns. In this example we require three columns of data. To add another column to the worksheet: Click on the Column menu and choose the Add New Columns option. Click OK to add the default number of columns, 1. (Alternatively you could have clicked on the Add New Columns button on the Standard toolbar, An extra column named C(Y) is added. .)

Activity 2.2

Change the association of column C: Click on the column C(Y) heading. Select the Column menu and then the Set as Y Error option.

Column C will now show the heading C(yEr). Now enter some data into the worksheet as shown in Figure 4.

Figure 4. Entering data

Activity 2.3

To create a Line + Symbol graph: Click on the Plot menu and choose the Line + Symbol > Line + Symbol graph.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 6 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

The Plot Setup dialog box opens showing the Plot Type section in which you can select the data you want to plot. Select column A for the X data and column B for the Y data, as shown in Figure 5. Click on the OK button when you have finished.

Figure 5. Selecting data to plot

Activity 2.4

A graph window appears showing column B plotted against column A onto a default set of axes. A legend automatically appears at the upper right corner of the window showing the dataset name and plot type (see Figure 6). The dataset name in this example is B as that is the current column heading. This can be changed to something more descriptive by changing the legend entry in the graph window.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 7 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Figure 6. A Line + Symbol plot

Activity 2.5

To change the legend entry in the graph window: Double-click on the text, i.e. the B, in the legend.

The legend should now look like this:

Figure 7. Entering legend text The characters indicate what will be displayed in the legend. In this example, %(1) means that the column heading for the first plotted dataset will be displayed. To change the text: Delete %(1) and enter the required text as shown in Figure 8.

Figure 8. The revised legend text

Activity 2.6

Plotting error bars is very simple. You could have done it when you created the Line + Symbol plot by selecting column C for the yEr data in the Plot Setup dialog box. Alternatively, as in this example, you may add error bars once you have created the Line + Symbol plot. Either select Plot Setup from the Graph menu or double click on the layer button in the graph window, (note that, if you do the latter, you will need to select one of the No options in the resulting Attention! dialog box as otherwise this will open the Layer Contents dialog box which is described at the end of Activity 3.7).

Information Systems Services Anna Clough 3.2 (November 2009)

Page 8 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

The Plot Setup dialog box opens, this time showing the Plot List section which tells you which data is in Layer 1 (see Figure 9).

Figure 9. The Plot Setup dialog box layer contents section Click on the [Book1]Sheet1! A(X), B(Y) row and then click on the Show Plot Designations button, .

This will open up the Plot Type section where you can select the data to plot. Select column C for the yEr data and then click on Replace and then OK.

The graph is now redrawn with error bars, as shown in Figure 10.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 9 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Figure 10. A Line + Symbol plot with error bars It is also possible to add error bars that you wish to be computed as a percentage or the standard deviation of the data. This is done by selecting the Add Error Bars option from the Graph menu. To zoom in and out of the graph, use the zoom buttons on the Graph toolbar, Choose View > Whole Page to return the graph to its original size and position. .

To switch the display of the project details (the file manager structure at the left of the OriginPro screen) on and off, click on the Project Explorer button, .

Information Systems Services Anna Clough 3.2 (November 2009)

Page 10 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Task 3 Editing graphic elementsObjective To edit the graphic elements of a graph. Instructions You will edit the style and colour of a graph and use the Tools toolbar to add a text label.

Activity 3.1

Editing graphs in OriginPro is straightforward. Each graph is composed of a variety of graphic elements. To change any element, you must position the mouse on that element and double-click the left mouse button. Figure 11 shows most of the graphic elements that can be edited by double-clicking.

L a y e r b u tto n

Legend

P lo tte d d a ta

E rro r b a rs Y a x is A x is title Tic k la b e ls

X a x is

Figure 11. Editing graphic elements

Activity 3.2

To edit your graph: Double-click on one of the data points on the graph.

The dialog box that appears (Figure 12) enables you to change the graph type, colour, line style, shape of data points etc.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 11 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Figure 12. The Plot Details dialog box Click on the Line tab and change the type of line to a spline and make it a dotted violet line with no gap between the line and each data point. Press OK.

This will produce a curve which passes through the data points. Most elements on the graph are grouped with other similar elements - for example if you double-click on one of the data points and change its colour, all the other data points for that dataset will also change. If you want to override this grouping, hold down the key when you double-click over the point and any changes that you then make will affect only the selected point. Activity 3.3 To change the display of a single data point: Hold down the key and double-click over the third data point. On the Symbol tab of the Plot Details dialog box, change the symbol colour to red and click on OK.

The selected point should be the only one that changes colour. This is a good way to highlight individual points. Note: There is a bug in this functionality which is fixed in the later service releases to version 8. If you find it difficult to select an individual point, try hiding the error bars (you can do this by deselecting Show in the Plot List section of the Plot Setup dialog box). Activity 3.4 Data points can also have their attributes (e.g. colour, shape or size) selected automatically by using column values. Add a fourth column to the worksheet as in Activity 2.1, following values into it: 4, 2, 4, 2, 4. , and enter the

Highlight the first three columns and select Plot > Line + Symbol > Line + Symbol this is a quicker way to produce a graph than in Activity 2.3. Double-click on one of the data points in the new graph and select the Symbol tab in the Plot Details dialog box which opens.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 12 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

From the Symbol Color list choose Indexing and then Col(D). Tick the Show Construction box and from the Shape drop-down menu choose Col(D). Press OK.

The resulting graph should show some points as blue triangles and others as red circles. Activity 3.5 To add text to your graph, for example a title, it is necessary to use the Tools toolbar (see Figure 13). If the Tools toolbar is not available it may have been switched off. To open this toolbar: Click on the View > Toolbars menu option and select Tools from the Customize Toolbar dialog box and then click on Close.

It should now be displayed. Note that, by default, this toolbar is displayed down the lefthand side of the OriginPro screen.

Figure 13. The Tools toolbar The tools occupying the first nine places are used mainly for working with data in graph windows. The tools occupying the next four are used to add labels to a graph or to a worksheet. Note that a down arrow next to a tool indicates that there is more than one tool which occupies this space on the Tools toolbar. To add a title to your first graph: Click on the Text tool and position the cursor as desired in the graph window.

Click again and type your desired text.

OriginPro provides the following formatting for text: bold, italic, underline, superscript, subscript, and Greek (see Figure 14).

Figure 14. The Format toolbar Special characters such as and can be inserted by typing ****, where **** is the ANSI code for the required symbol. Note - the ANSI code must be typed on the number pad of the keyboard whilst holding down the key, e.g. 0174 gives the symbol . It is possible to find the ANSI codes for other symbols using the Character Map (see Start > Programs > Utilities > Character Map). It is also possible to copy and paste characters with an ANSI code from the Character Map into text fields in OriginPro but remember that you will also need to change the font. Activity 3.6 Items in columns can also be used for labels:

Information Systems Services Anna Clough 3.2 (November 2009)

Page 13 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Highlight column A in the worksheet and select Column > Set as Label. Enter labels into column A overwriting the numbers, e.g. sample 1, sample 2, sample 3, sample 4 and sample 5.

If you click on your first graph window you will notice that the graph disappears. Column A of the worksheet no longer represents the x data so you will now tell OriginPro to use the row numbers of the worksheet as x data instead. To do this: Open the Plot Setup dialog box as before and select [Book1]Sheet1! A(X), B(Y) in the Plot List section. In the Plot Type section, select column , then click on Replace and then OK.

To use the labels in column A of the worksheet as x-axis tick labels in the graph: In the graph window, double-click on one of the numbers under the x axis. In the dialog box which appears, choose the Tick Labels tab and select Text from dataset as the tick label type and then [Book1]Sheet1!A as the dataset. Choose the Scale tab and set the increment to 1. Click OK and the graph should now look like:

Figure 15. The graph with the x axis labelled To add more data points to a graph, you can simply type in more data into columns that are already plotted the graph should automatically redraw when you click on it. Activity 3.7 To add a new dataset to your first graph: First add a new worksheet to the workbook by right-clicking on the Sheet1 worksheet tab of the workbook and choosing Add. Then type in the following data:

Information Systems Services Anna Clough 3.2 (November 2009)

Page 14 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Figure 16. Entering data into a second worksheet Open the Plot Setup dialog box as before and expand it to show the Available Data section (click on the Show Available Data button in the Plot Type section, ). With the Layer 1 row selected in the Plot List section, choose Line + Symbol in the Plot Type section and worksheet Sheet2 in the Available Data section. Select column A for the X data and column B for the Y data (see Figure 17).

Information Systems Services Anna Clough 3.2 (November 2009)

Page 15 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Figure 17. Selecting data to plot Click on Add to add the plot to the contents of Layer 1. Click on OK to close the Plot Setup dialog box.

The new data should now appear on the graph alongside the first dataset, as in Figure 18, and can be edited in the same way.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 16 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Figure 18. The graph showing the new dataset To update the legend: Select Graph > New Legend and then alter the legend text as shown previously.

If you wish to delete a dataset from the graph, open the Plot Setup dialog box, right-click on the dataset in the plot list and select Remove. Click on OK or Apply to update the graph window. Datasets can also be added to or deleted from graphs by using the and buttons in the Layer Contents dialog box (see Figure 19). The Layer Contents dialog box can be accessed by right-clicking on the layer icon and selecting Layer Contents.

Figure 19. The Layer Contents dialog box

Information Systems Services Anna Clough 3.2 (November 2009)

Page 17 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Task 4 Saving your workObjective To save your work. Instructions You will use the Save Project option from the File menu.

Activity 4.1

To save your work: Select the Save Project option from the File menu.

This saves a copy of all the windows which have been created in OriginPro. Alternatively you could have clicked on the Save Project button on the Standard toolbar, practice to regularly save your project whilst working. . It is good

This project can then be reopened at a later date by selecting File > Open or by pressing the Open button on the Standard toolbar, .

It is also possible to save individual windows that you are interested in for inclusion into another project. To do this select the window you wish to save and then click on File > Save Window As.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 18 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Task 5 Obtaining printed outputObjective To obtain a printed copy of a graph. Instructions You will use the Print option from the File menu.

Activity 5.1

To print a copy of one of your graphs: Select one of your graphs windows and choose File > Print.

The Print dialog box will appear, see Figure 20.

Figure 20. The Print dialog box Before you print your graph you must make sure that you are connected to the correct printer. (You will normally find that each printer is labelled with its name.) Click on the drop-down menu by Name and select a printer.

You can set your paper size, orientation and other settings using the Printer Properties dialog box: Activity 5.2 Click on the Properties button to access the Printer Properties dialog box. Choose the settings you want. When you are finished click on OK and then OK again to print.

To print several graphs on the same page:

Information Systems Services Anna Clough 3.2 (November 2009)

Page 19 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Click on File > New and then select Layout or alternatively click on the New Layout button, .

A new window should appear with a blank page on it. Use the Layout > Add Graph and Add Worksheet options to position graphs and tables on the blank page for printing. Resize the graphs and worksheets on the layout page and arrange them using the tools on the Object Edit toolbar (see Figure 21). (Note that most of the tools become active once two or more objects have been selected.) When you are finished, select File > Print to print.

Figure 21. The Object Edit toolbar

Information Systems Services Anna Clough 3.2 (November 2009)

Page 20 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Task 6 Exporting to an image fileObjective To export a graph to an image file. Instructions You will use the Export Graphs option from the File menu.

In OriginPro it is possible to export a finished graph or layout page to an image file. Image files can be displayed/included in many different software packages, e.g. Word, LaTeX, PowerPoint. OriginPro supports the following image formats: AI; BMP; CGM; DXF; EMF; EPS; GIF; JPG; PCX; PDF; PNG; PSD; TGA; TIF; and WMF. For this example we will export a graph to an EMF (Enhanced MetaFile) and insert it in a Microsoft Word document. Activity 6.1 To export a graph to an image file: Make a graph window active by clicking on it and then select File > Export Graphs.

The dialog box which appears lets you choose where to export an image of the graph to and what image type to export it as.

Figure 22. Exporting to an image file Activity 6.2 Set the image type to Enhanced MetaFile (*.emf) and set the path to where you want to export the image file to, e.g. M:\originpro85. Choose a name for the file and select Auto Preview to preview the image which will be exported. Click on OK to export to the image file.

To insert an image file in a Microsoft Word document: Open Microsoft Word which can be found under Start > Programs > Microsoft Office 2003.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 21 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Click on Insert > Picture > From File and navigate to the folder where you exported your image file to. Select the image file and click on Insert.

A picture of the graph should now be included in the Microsoft Word document. Note: Generally, raster image formats (e.g. BMP, GIF, JPG, PCX, PNG, PSD, TGA, and TIF) suit images which are detailed and contain many colours, and which are not going to be rescaled in another package. Vector (or more accurately meta) image formats (e.g. AI, CGM, DXF, EMF, EPS, PDF, and WMF) suit images which are not detailed and contain few colours, or images which are going to be rescaled in another package. Always remember that the quality of inserting/opening image files in a package and exporting/saving image files from a package is only as good as the import and export filters which have been written for that particular package. Most of the time these will do a good job. When things do go wrong, typical problems include impaired clarity for raster image formats and loss of information for vector image formats. So, always check that the image in your finished article looks the same as the one you originally created.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 22 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Task 7 Importing data filesObjective To import data from another format. Instructions You will use the Import > Single ASCII option from the File menu.

In OriginPro it is possible to import data from other formats. Under File > Import there is an Import Wizard which imports ASCII, simple binary, and user-defined files. There are also specific options for importing: Single ASCII; Multiple ASCII; Comma Delimited; Excel; Sound; DIAdem; NI TDM; HEKA; pCLAMP; JCAMP-DX; Thermo; Princeton Instruments; Data Translation; Famos; ETAS INCA MDF; Somat SIE; EarthProbe; NetCDF; IgorPro; SigmaPlot; KaleidaGraph; Matlab; and Minitab files. Excel files can also be opened by the File > Open Excel option. Data can be imported from a database using the File > Database Import query options and the tools on the Database Access toolbar:

Figure 23. The Database Access toolbar For this example you will import a single ASCII file. Activity 7.1 To import data into a new workbook: Click on File > New and then select Workbook (alternatively you could have clicked on the New Workbook button on the Standard toolbar, ).

Click on the File menu and then choose the Import > Single ASCII option.

The ASCII dialog box should appear listing files with a .dat extension. Navigate to Q:\origin8.v01\Samples\Import and Export (see Figure 24).

Information Systems Services Anna Clough 3.2 (November 2009)

Page 23 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Figure 24. The ASCII dialog box Select S15-125-03.dat and then click on Open.

The ASCII file S15-125-03 is now open in OriginPro. Note that sparklines have been added by default a sparkline is a thumbnail size graph which displays the profile of the data in a column. Choosing the Show Options Dialog when you opened the file would have given you access to the file import customisation options. You might also use Cut/Copy/Paste or DDE (Dynamic Data Exchange) with OriginPro. DDE is a Windows feature that enables communication between applications that run under Windows. DDE allows a graph in OriginPro to be dynamically linked to data in another application that supports DDE, such as Excel. When you alter the data in Excel, the graph in OriginPro is automatically updated to reflect the changes. You can also use DDE to paste OriginPro graphs into a word processing package such as Microsoft Word. The Paste Link command in the Edit menu is used to create DDE links.

Information Systems Services Anna Clough 3.2 (November 2009)

Page 24 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Task 8 Multiple graphs on the same pageObjective To merge two different graphs into one graph window. Instructions You will use the Merge Graph Windows option from the Graph menu.

Activity 8.1

In the previous task you imported S15-125-03.dat into OriginPro. Highlight column C by clicking on the C(Y) heading. Choose the Line option from the Plot > Line menu to create a line graph of column C from this dataset.

Activity 8.2

You will now import a second dataset: Add a new worksheet to the workbook (as in Activity 3.7) and import the ASCII data file S21-235-07.dat (as in Activity 7.1). Create a line graph of column C from this second dataset (as in the previous activity).

Activity 8.3

To merge the two graphs you have just created: Minimise all graph windows except for the two concerned. Select one of the open graph windows and choose the Merge Graph Windows option from the Graph menu.

The Graph Manipulation dialog box appears which lets you control how you merge your graphs. Select All in Active Folder (Open) from the Merge drop-down menu.

The two open graphs will appear in the Preview tab, the first graph below the second. Click on the + symbol next to Spacing (in % of Page Dimension) and change the vertical gap from 5 to 10 to add a little more vertical space between the graphs. Click on OK.

The following graph window containing two layers should appear:

Information Systems Services Anna Clough 3.2 (November 2009)

Page 25 of 26 TUT77-8-Part1.doc

TUT 77 Getting Started with OriginPro 8 (Part 1) An introduction to OriginPro, a scientific charting package.

Figure 25. Two graphs on the same page If you wish to make further changes to the layer arrangement, select the Layer Management option from the Graph menu. This document continues in Getting Started with OriginPro 8 (Part 2).

Information Systems Services Anna Clough 3.2 (November 2009)

Page 26 of 26 TUT77-8-Part1.doc