<<

Creating and Graphs

Title: Creating Charts and Graphs Version: 1.0 First edition: December 2004 First English edition: December 2004

Contents

Overview...... ii Copyright and trademark information...... ii Feedback...... ii Acknowledgments...... ii Modifications and updates...... ii Inserting charts...... 1 Using the AutoPilot...... 2 Choosing the chart type...... 5 Editing the chart...... 10 Moving and resizing a chart...... 11 Graphics and color...... 12 Applying a background to a ...... 12 Graphics in the background of cells...... 12

Creating Charts and Graphs i Overview

Overview

OpenOffice.org Calc lets you present graphically in a chart, so that you can visually compare data series and view trends in the data.

Copyright and trademark information The contents of this Documentation are subject to the Public Documentation License, Version 1.0 (the "License"); you may only use this Documentation if you comply with the terms of this License. A copy of the License is available at: http://www.openoffice.org/licenses/PDL.rtf. The Original Documentation is Creating Charts and Graphs. The Initial Writer(s) of the Original Documentation is/are Linda Worthington © 2004. All Rights Reserved. (Initial Writer contact(s): [email protected]. The Initial Writer contact(s) is to report errors in the documentation. For questions regarding how to use the software, subscribe to the Users Mail List and post your question there: http://support.openoffice.org/index.html.) All trademarks within this guide belong to legitimate owners.

Feedback Please direct any comments or suggestions about this document to: [email protected].

Acknowledgments Thanks to Peter Kupfer for his review of this chapter.

Modifications and updates

Version Date Description of Change 1.0 24 December 2004 First published version.

Creating Charts and Graphs ii Inserting charts

Inserting charts

OpenOffice.org Calc offers a variety of different ways to chart or graph your Calc data. Any time a chart is created, the chart AutoPilot is invoked. Open the spreadsheet and highlight (select) the data to be included in the chart. There are two ways to proceed after you have selected your data. The first method (see Figure 1) is Insert > Chart:

Figure 1. Selecting Insert Chart

The second method (see Figure 2) is to long-click (that is, hold down the left mouse button for 1 second) on Insert Object to display the floating toolbar, then click on the Insert Chart button:

Creating Charts and Graphs 1 Inserting charts

Figure 2. Using the Insert Chart button

Using the Chart AutoPilot Once Insert Chart is selected, the chart AutoPilot menu appears. (See Figure 3.) The first dialog is used to define the data range, the labels, and the target sheet for the chart.

Figure 3. Create a Chart AutoPilot

Data Range The data range selected should contain both the labels and the data. (See Figure 4.) If the data range is selected when the AutoPilot is started, it will automatically be inserted in the Range input field. If the AutoPilot is started without a selected data range, a range can be selected by clicking on the range selection icon to the Range input field.

Creating Charts and Graphs 2 Inserting charts

Figure 4. Highlighted Data Range

First Row/Column as Label First Row as Label: Uses the entries in the top row of the selection as labels for the data range. This setting is useful if there are several columns of data that need to be displayed in the same chart. (See Figure 5.)

1st Row as Label 10

9

8

7

6 Time (s) 5 Speed (m/s)

4

3

2

1

0 Row 2 Row 3 Row 4 Row 5 Row 6 Figure 5. Example using first row as label

Creating Charts and Graphs 3 Inserting charts

First Column as Label: Uses the entries in the leftmost column of the selection as labels for the data range. (See Figure 6.) 1st Column as Label 10

9

8

7

6 Column B 5

4

3

2

1

0 Time (s) 1 2 3 4 5 Figure 6. Example using first column as label

First Column & First Row as Label: Both checkboxes can be selected as well. This provides a combination of both options. This sets the first row as the labels and the first column as the x-axis values. (See Figure 7.)

1st Column & 1st Row as Label 10

9

8

7

6 Speed (m/s) 5

4

3

2

1

0 1 2 3 4 5 Figure 7. Example using first column and first row as labels

Chart Results Output This dropdown box specifies which sheet the chart will output to. By default the current sheet is selected, but any sheet, or a new sheet, can also be selected. However, a chart can not be set to be its own sheet; it must be an object in a normal sheet. Once the correct options have been input, either click Create to create the chart, or click Next to proceed to the next dialog to choose the chart type.

Creating Charts and Graphs 4 Inserting charts

Choosing the chart type On the next page of the AutoPilot (see Figure 8), the chart type can be chosen and a preview of the chart output can be seen. Click Create from here, or click Next for more options.

Figure 8. Choosing a chart type (format)

OpenOffice.org Calc offers several different chart types. Most chart types come in both a 2- dimensional and a 3-dimensional style. Below is the list of available styles with examples. Lines (2D & 3D) – Provides a standard line graph that is useful for displaying changing data over a period of time.

Running Distances Running Distances 600 550 500 600 450 550 400 500 Jenny's Distance Jenny's Dis- 350 (m) 450 tance (m) 300 Marc's Distance 400 (m) Marc's Distance (m) 250 Sarah's Distance 350 (m) Sarah's Dis-

Distance (M) 300 200 tance (m) 250 150 Y axisY title 200 100 150 50 100 Sarah's Distance (m) 0 50 Marc's Distance (m) 10 20 30 40 50 60 0 10 20 30 40 Jenny's Distance (m) Time (s) 50 60 Z axis title X axis title Figure 9. 2D Line Graph: Normal Figure 10. 3D Line Graph: Deep

Creating Charts and Graphs 5 Inserting charts

Areas (2D & 3D) – Creates graphs that are similar to line graphs but with the area under the line shaded in. Running Distances Running Distances 1400 1300 600 1200 550 1100 500 1000 450 900 Sarah's Dis- 400 Jenny's Dis- 800 tance (m) tance (m) 350 700 Marc's Distance Marc's Distance (m) 300 (m) 600 Jenny's Dis- 250 Sarah's Dis- 500 tance (m) tance (m) Distance (m) 200 400 150 300 (m) Distance 100 200 50 100 0 0 10 20 Marc's Distance (m) 30 40 10 20 30 40 50 60 50 60 Jenny's Distance (m) Time (s) Time (s) Figure 11. 2D Area: Stacked Figure 12. 3D Area: Deep

Columns (2D & 3D) – Creates vertical columns to represent data. The columns can be normal, stacked, or by percent. In 3D mode the data can also be represented by cylinders and cones. # of Calls # of Calls by Week 200 180 190 160 170 140 150 120 130 100 Week 1 110 Week 1 80 Week 2 90 Week 2 # of Calls Week 3 70 Week 3 60 50 # of Calls 40 30 20 0 Sunday 0 Week 3 Tuesday Sun Mon Tues Wed Thur Fri Sat Week 2 day day day nes sday day ur- Thursday day day Day of Week Friday Week 1 Day of the Week Saturday Figure 13. 2D Column: Normal Figure 14. 3D Columns: Cones, deep

Creating Charts and Graphs 6 Inserting charts

Bars (2D & 3D) – Provides the same features as columns, but they are horizontal. # of Calls # of Calls by Week

Sun day Mon Saturday day Friday Tues day Thursday Wed Week 3 Week 1 nes Week 2 Week 2 Wednesday day Week 1 Week 3 Thur sday Tuesday Day of the WeekDay

Fri Day of Week Monday day Sat Sunday ur- 0 50 day 100 150 0 100 200 300 400 500 600 200 # of Calls # of Calls Figure 15. 2D Bar: Stacked Figure 16. 3D Bars: Normal

Pies (2D & 3D) – Graphs that are useful for showing the parts of a whole. The pie chart can be separated or keep as a solid circle.

Gases in the Atmosphere Gases in the Atmosphere

Nitrogen Nitrogen Oxygen Oxygen Carbon Dioxide Carbon Dioxide Argon Argon Water Vapor Water Vapor Other Gases Other Gases

Figure 17. 2D Pie: Offset 2 Figure 18. 3D Pie: Normal

Creating Charts and Graphs 7 Inserting charts

XY Chart – This graph is similar to a scatter plot. It can be used to show several trials of experiments with two variables. Acceleration of Different Masses with a Given Force 0.400

0.350

0.300 Acceleration o f10kg mass(m/s2) 0.250 Acceleration of 20kg mass(m/s2) 0.200 Acceleration of 0.150 35kg mass(m/s2)

0.100 Acceleration (m/s^2) Acceleration 0.050

0.000 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 Force (N) Figure 19. XY Chart: Lines with Symbols

Net – Provides a circular graph with a separate Y axis for each item on the X axis. Points within a data series are connected with a polygon. Main Title

Sunday

200

Monday Saturday

Week 1 Week 2 Week 3 0

Tuesday Friday

Wednesday Thursday

Figure 20. Net Chart: Normal

Creating Charts and Graphs 8 Inserting charts

Stock Chart – Shows change from one data series to the next for each X value. My Stocks $70.00 $67.50 $65.00 $62.50 $60.00 $57.50 $55.00 WMT $52.50 MSFT $50.00 OOo Value (USD) $47.50 $45.00 $42.50 $40.00 $37.50 2 2 2 2 2 2 2 2 3 3 3 4 5 6 7 1 1 1 1 1 1 1 1 2 2 0 1 2 3 4 7 8 9 0 1 0 1 2 3 4 7 8 9 0 1 Date Figure 21. Stock: Stock Chart 2

The next page of the AutoPilot (see Figure 22) provides options for fine-tuning the chart selection. There are several variants that can be chosen for each graph type. In the example charts above, the variants come after the colon. Again, the chart can be created from this screen, or titles and labels can be added by clicking Next.

Figure 22. Choosing a variant

Creating Charts and Graphs 9 Inserting charts

On the last page of the AutoPilot (see Figure 23), a title and labels for the axes can be added.

Figure 23. Adding text

Editing the chart

Once the chart is created, further edits can be made. To edit a chart: 1) Select the chart (left-click). 2) Right-click and select Edit. Alternatively, the chart can be double-clicked. This will activate a new toolbar on the left side of the screen (see Figure 24) used for editing different aspects of the chart.

Creating Charts and Graphs 10 Editing the chart

Figure 24. Edit Chart toolbar

Moving and resizing a chart Once the chart has been created, it can be moved or scaled. To move the chart: 1) Click on the chart to select it. 2) Click and hold down the left mouse button to drag the chart across the window. To resize the chart: 1) Click on the chart to select it. 2) Click on one of the green handle bars (see Figure 25) and move the mouse.

Creating Charts and Graphs 11 Editing the chart

Figure 25. Resizing chart handles

Graphics and color

Applying a background to a spreadsheet 1) Select the cells. 2) Choose Format > Cells (or right-click on the chart and choose Format Cells from the context menu). 3) On the Background tab page, select the background color.

Graphics in the background of cells 1) Choose Insert > Graphics > From File. 2) Select the graphic and click Open. 3) The graphic is inserted and anchored to the current cell. To make the inserted graphic part of the background: 1) Select it. 2) Right click and select Arrange > To Background.

Creating Charts and Graphs 12 Graphics and color

Note: To remove a graphic from the background, use the Navigator. Press F5, select the graphic from the navigator. Double-click on the appropriate graphic, and then right-click on it and change the arrangement.

Creating Charts and Graphs 13