Sunday, July 23, 2017

Present your data in a scatter chart or a line chart

Present your data in a scatter chart or a line chart

Scatter charts and line charts look very similar, especially when a scatter chart is displayed with connecting lines. However, there is a big difference in the way each of these chart types plots data along the horizontal axis (which is also known as the x-axis) and the vertical axis (which is also known as the y-axis).

Formatted scatter chart
This formatted scatter chart displays numerical values along the horizontal and the vertical axis, combining these values into single data points that are displayed in uneven intervals.
Formatted line chart
This formatted line chart distributes category data (in this case, a time interval) evenly along a horizontal axis and all numerical value data evenly along a vertical axis.

Before you choose either of these chart types, you may want to learn more about the differences and find out when it is better to use a scatter chart instead of a line chart, or the other way around.

In this article

Learn about the differences between scatter and line charts

Know when to use a scatter or line chart

Explore scatter and line chart types

Create a scatter chart

Create a line chart

Save a chart as a template

Learn about the differences between scatter and line charts

The main difference between scatter and line charts is the way that they plot data on the horizontal axis. For example, when you use the following worksheet data to create a scatter chart and a line chart, you can see that the data is distributed differently.

Picture of daily rainfall worksheet data

In a scatter chart, the daily rainfall values from column A are displayed as x values on the horizontal (x) axis, and the particulate values from column B are displayed as values on the vertical (y) axis. Often referred to as an xy chart, a scatter chart never displays categories on the horizontal axis.

Picture of a scatter chart

A scatter chart always has two value axes to show one set of numerical data along a horizontal (value) axis and another set of numerical values along a vertical (value) axis. The chart displays points at the intersection of an x and y numerical value, combining these values into single data points. These data points may be distributed evenly or unevenly across the horizontal axis, depending on the data.

The first data point to appear in the scatter chart represents both a y value of 137 (particulate) and an x value of 1.9 (daily rainfall). These numbers represent the values in cell A9 and B9 on the worksheet.

In a line chart, however, the same daily rainfall and particulate values are displayed as two separate data points, which are evenly distributed along the horizontal axis. This is because a line chart only has one value axis (the vertical axis). The horizontal axis of a line chart only shows evenly spaced groupings (categories) of data. Because categories were not provided in the data, they were automatically generated, for example, 1, 2, 3, and so on.

This is a good example of when not to use a line chart.

Picture of a line chart

A line chart distributes category data evenly along a horizontal (category) axis , and distributes all numerical value data along a vertical (value) axis.

The particulate y value of 137 (cell B9) and the daily rainfall x value of 1.9 (cell A9) are displayed as separate data points in the line chart. Neither of these data points is the first data point displayed in the chart — instead, the first data point for each of the data series refers to the values in the first data row on the worksheet (cell A2 and B2).

Axis type and scaling differences

Because the horizontal axis of a scatter chart is always a value axis, it can display numeric values or date values (such as days or hours) that are represented as numerical values. To display the numeric values along the horizontal axis with greater flexibility, you can change the scaling options on this axis the same way that you can change the scaling options of a vertical axis.

Because the horizontal axis of a line chart is a category axis, it can be only a text axis or a date axis. A text axis displays text only (non-numerical data or numerical categories that are not values) at evenly spaced intervals. A date axis displays dates in chronological order at specific intervals or base units, such as the number of days, months, or years, even if the dates on the worksheet are not in order or in the same base units.

The scaling options of a category axis are limited compared with the scaling options of a value axis. The available scaling options also depend on the type of axis that you use.

Top of Page

Know when to use a scatter or line chart

Scatter charts are commonly used for displaying and comparing numeric values, such as scientific, statistical, and engineering data. These charts are useful to show the relationships among the numeric values in several data series, and they can plot two groups of numbers as one series of xy coordinates.

Line charts can display continuous data over time, set against a common scale, and are therefore ideal for showing trends in data at equal intervals or over time. In a line chart, category data is distributed evenly along the horizontal axis, and all value data is distributed evenly along the vertical axis. As a general rule, use a line chart if your data has non-numeric x values — for numeric x values, it is usually better to use a scatter chart.

Consider using a scatter chart instead of a line chart if you want to:

  • Change the scale of the horizontal axis    Because the horizontal axis of a scatter chart is a value axis, more scaling options are available.

  • Use a logarithmic scale on the horizontal axis    You can turn the horizontal axis into a logarithmic scale.

  • Display worksheet data that includes pairs or grouped sets of values    In a scatter chart, you can adjust the independent scales of the axes to reveal more information about the grouped values.

  • Show patterns in large sets of data    Scatter charts are useful for illustrating the patterns in the data, for example by showing linear or non-linear trends, clusters, and outliers.

  • Compare large numbers of data points without regard to time    The more data that you include in a scatter chart, the better the comparisons that you can make.

Consider using a line chart instead of a scatter chart if you want to:

  • Use text labels along the horizontal axis    These text labels can represent evenly spaced values such as months, quarters, or fiscal years.

  • Use a small number of numerical labels along the horizontal axis    If you use a few, evenly spaced numerical labels that represent a time interval, such as years, you can use a line chart.

  • Use a time scale along the horizontal axis    If you want to display dates in chronological order at specific intervals or base units, such as the number of days, months, or years, even if the dates on the worksheet are not in order or in the same base units, use a line chart.

Top of Page

Explore scatter and line chart types

Scatter charts can use the following chart subtypes.

  • Scatter with only markers    This type of chart compares pairs of values. Use a scatter chart with data markers but without lines when you use many data points and connecting lines would make the data harder to read. You can also use this chart type when there is no need to show connectivity of the data points.

    Scatter with Only Markers chart

  • Scatter with smooth lines and scatter with smooth lines and markers    This type of chart displays a smooth curve that connects the data points. Smooth lines can be displayed with or without markers. Use a smooth line without markers if there are many data points.

    Scatter with smooth lines and scatter with smooth lines and markers chart

  • Scatter with straight lines and scatter with straight lines and markers    This type of chart displays straight connecting lines between data points. Straight lines can be displayed with or without markers.

    Scatter with straight lines and scatter with straight lines and markers chart

Line charts can use the following chart subtypes.

  • Line and line with markers    Displayed with markers to indicate individual data values, or without, line charts are useful to show trends over time or ordered categories, especially when there are many data points and the order in which they are presented is important. If there are many categories or the values are approximate, use a line chart without markers.

    Line and line with markers chart

  • Stacked line and stacked line with markers    Displayed with markers to indicate individual data values, or without, stacked line charts can be used to show the trend of the contribution of each value over time or ordered categories, but because it is not easy to see that the lines are stacked, consider using a different line chart type or a stacked area chart instead.

    Stacked line and stacked line with markers chart

  • 100% stacked line and 100% stacked line with markers    Displayed with markers to indicate individual data values, or without, 100% stacked line charts are useful to show the trend of the percentage each value contributes over time or ordered categories. If there are many categories or the values are approximate, use a 100% stacked line chart without markers.

    Tip: For a better presentation of this type of data, consider using a 100% stacked area chart instead.

    100% stacked line and 100% stacked line with markers chart

  • 3-D line    3-D line charts show each row or column of data as a 3-D ribbon. A 3-D line chart has horizontal, vertical, and depth axes that you can modify.

    3-D line chart

Top of Page

Create a scatter chart

Formatted scatter chart

So, how did we create this scatter chart? The following procedure will help you create a scatter chart with similar results. For this chart, we used the example worksheet data. You can copy this data to your worksheet, or you can use your own data.

  1. Copy the example worksheet data into a blank worksheet, or open the worksheet that contains the data that you want to plot into a scatter chart.

    How to copy the example worksheet data

    1. Create a blank workbook or worksheet.

    2. Select the example in the Help topic.

      Note: Do not select the row or column headers.

      Selecting an example from Help
      Selecting an example from Help
    3. Press CTRL+C.

    4. In the worksheet, select cell A1, and press CTRL+V.

1

2

3

4

5

6

7

8

9

10

A

B

Daily Rainfal l

Particulat e

4.1

122

4.3

117

5.7

112

5.4

114

5.9

110

5.0

114

3.6

128

1.9

137

7.3

104

  1. Select the data that you want to plot in the scatter chart.

  2. On the Insert tab, in the Charts group, click Scatter.

    Excel Ribbon Image

  3. Click Scatter with only Markers.

    Tip: You can rest the mouse on any chart type to see its name.

  4. Click the chart area of the chart.

    This displays the Chart Tools, adding the Design, Layout, and Format tabs.

  5. On the Design tab, in the Chart Styles group, click the chart style that you want to use.

    Chart Styles on Excel Ribbon

    For our scatter chart, we used Style 26.

  6. Click the chart title, and then type the text that you want.

    For our scatter chart, we typed Particulate Levels in Rainfall.

  7. To reduce the size of the chart title, right-click the title, and then enter the size that you want in the Font Size box on the shortcut menu.

    For our scatter chart, we used 14.

  8. Click the chart area of the chart.

  9. On the Layout tab, in the Labels group, click Axis Titles, and then do the following:

    1. To add a horizontal axis title, click Primary Horizontal Axis Title, and then click Title Below Axis.

    2. To add a vertical axis title, click Primary Vertical Axis Title, and then click the type of vertical axis title that you want.

      For our scatter chart, we used Rotated Title.

      Excel Ribbon Image

    3. Click each title, type the text that you want, and then press ENTER.

      For our scatter chart, we typed Daily Rainfall in the horizontal axis title, and Particulate level in the vertical axis title.

  10. Click the plot area of the chart, or select Plot Area from a list of chart elements (Layout tab, Current Selection group, Chart Elements box).

  11. On the Format tab, in the Shape Styles group, click the More button Button image , and then click the effect that you want to use.

    For our scatter chart, we used the Subtle Effect - Accent 3.

    Shape Styles group on Excel Ribbon

  12. Click the chart area of the chart.

  13. On the Format tab, in the Shape Styles group, click the More button Button image , and then click the effect that you want to use.

    For our scatter chart, we used the Subtle Effect - Accent 1.

  14. If you want to use theme colors different from the default theme that is applied to your workbook, do the following:

    1. On the Page Layout tab, in the Themes group, click Themes.

      Excel Ribbon Image

    2. Under Built-in, click the theme that you want to use.

      For our line chart, we used the Office theme.

Top of Page

Create a line chart

Formatted line chart

So, how did we create this line chart? The following procedure will help you create a line chart with similar results. For this chart, we used the example worksheet data. You can copy this data to your worksheet, or you can use your own data.

  1. Copy the example worksheet data into a blank worksheet, or open the worksheet that contains the data that you want to plot into a line chart.

    How to copy the example worksheet data

    1. Create a blank workbook or worksheet.

    2. Select the example in the Help topic.

      Note: Do not select the row or column headers.

      Selecting an example from Help
      Selecting an example from Help
    3. Press CTRL+C.

    4. In the worksheet, select cell A1, and press CTRL+V.

1

2

3

4

5

6

7

8

9

10

A

B

C

Date

Daily Rainfal l

Particulat e

1/1/07

4.1

122

1/2/07

4.3

117

1/3/07

5.7

112

1/4/07

5.4

114

1/5/07

5.9

110

1/6/07

5.0

114

1/7/07

3.6

128

1/8/07

1.9

137

1/9/07

7.3

104

  1. Select the data that you want to plot in the line chart.

  2. On the Insert tab, in the Charts group, click Line.

    Excel Ribbon Image

  3. Click Line with Markers.

  4. Click the chart area of the chart.

    This displays the Chart Tools, adding the Design, Layout, and Format tabs.

  5. On the Design tab, in the Chart Styles group, click the chart style that you want to use.

    Chart Styles on Excel Ribbon

    For our line chart, we used Style 2.

  6. On the Layout tab, in the Labels group, click Chart Title, and then click Above Chart.

    Excel Ribbon Image

  7. Click the chart title, and then type the text that you want.

    For our line chart, we typed Particulate Levels in Rainfall.

  8. To reduce the size of the chart title, right-click the title, and then enter the size that you want in the Size box on the shortcut menu.

    For our line chart, we used 14.

  9. On the chart, click the legend, or select it from a list of chart elements (Layout tab, Current Selection group, Chart Elements box).

  10. On the Layout tab, in the Labels group, click Legend, and then click the position that you want.

    For our line chart, we used Show Legend at Top.

  11. To plot one of the data series along a secondary vertical axis, click the data series for Rainfall, or select it from a list of chart elements (Layout tab, Current Selection group, Chart Elements box).

  12. On the Layout tab, in the Current Selection group, click Format Selection.

    Current Selection group on Excel Ribbon

  13. Under Series Options, select Secondary Axis, and then click Close.

  14. On the Layout tab, in the Labels group, click Axis Titles, and then do the following:

    1. To add a primary vertical axis title, click Primary Vertical Axis Title, and then click the type of vertical axis title that you want.

      For our line chart, we used Rotated Title.

    2. To add a secondary vertical axis title, click Secondary Vertical Axis Title, and then click the type of vertical axis title that you want.

      For our line chart, we used Rotated Title.

    3. Click each title, type the text that you want, and then press ENTER.

      For our line chart, we typed Particulate level in the primary vertical axis title, and Daily Rainfall in the secondary vertical axis title.

  15. Click the plot area of the chart, or select it from a list of chart elements (Layout tab, Current Selection group, Chart Elements box).

  16. On the Format tab, in the Shape Styles group, click the More button Button image , and then click the effect that you want to use.

    For our line chart, we used the Subtle Effect - Dark 1.

    Shape Styles group on Excel Ribbon

  17. Click the chart area of the chart.

  18. On the Format tab, in the Shape Styles group, click the More button Button image , and then click the effect that you want to use.

    For our line chart, we used the Subtle Effect - Accent 3.

  19. If you want to use theme colors different from the default theme that is applied to your workbook, do the following:

    1. On the Page Layout tab, in the Themes group, click Themes.

      Excel Ribbon Image

    2. Under Built-in, click the theme that you want to use.

      For our line chart, we used the Office theme.

Top of Page

Save a chart as a template

If you want to create another chart like the one that you just created, you can save the chart as a template that you can use as the basis for other similar charts.

  1. Click the chart that you want to save as a template.

  2. On the Design tab, in the Type group, click Save as Template.

    Excel Ribbon Image

  3. In the File name box, type a name for the template.

    Tip: Unless you specify a different folder, the template file (.crtx) will be saved in the Charts folder, and the template becomes available under Templates in both the Insert Chart dialog box (Insert tab, Charts group, Dialog Box Launcher Button image ) and the Change Chart Type dialog box (Design tab, Type group, Change Chart Type).

    For more information about how to apply a chart template, see Reuse a favorite chart by using a chart template.

Note: A chart template contains chart formatting and stores the colors that are in use when you save the chart as a template. When you use a chart template to create a chart in another workbook, the new chart uses the colors of the chart template — not the colors of the document theme that is currently applied to the workbook. To use the document theme colors instead of the chart template colors, right-click the chart area, and then click Reset to Match Style on the shortcut menu.

Top of Page

1 comment:

  1. A scatter plot called a scatter chart or scatter graph is a simple yet powerful data visualization tool that compares two data sets to find a relationship between them.

    Read More: https://blog.zumvu.com/scatter-plot-for-data-visualization

    ReplyDelete