Читать книгу Statistical Analysis with Excel For Dummies - Joseph Schmuller - Страница 47
Drawing the Line
ОглавлениеIn the preceding example, I focus on one column of data from Table 3-1. In this example, I focus on one row. The idea is to trace the progress of one space related industry across the years 1990–94. In this example, I graph the revenues from Satellite Services. The final product, shown on its own sheet, is shown in Figure 3-12.
FIGURE 3-12: A line chart of the second row of data in Table 3-1.
A line chart is a good way to show change over time, when you aren't dealing with many data series. If you try to graph all six industries on one line chart, it begins to look like spaghetti.
How do you create a chart like Figure 3-12? Follow along:
1 Enter your data into a worksheet.Once again, it’s already done.
2 Select the data that go into the chart.For this example, that’s cells A3 through F3. Yes, I include the label.Whoa! Did I forget something? What about that little trick I showed you earlier, where you hold down the Ctrl key and select additional cells? Couldn’t I do that and select the top row of years for the x-axis?Nope. Not this time. If I do that, Excel thinks 1990, 1991, 1992, 1993, and 1994 are just another series of data points to plot on the graph. I show you another way to put those years on the x-axis.
3 Choose Insert | Recommended Charts from the main menu and select a chart type.This time, I select the All Charts tab, pick Line in the left column, and choose Line with Markers from the options. Figure 3-13 shows the result.
4 Modify the chart.The line on the chart might be a little hard to see. Clicking the line and then choosing Chart Design | Change Colors from the menu that appears gives a set of colors for the line. I chose black.Next, I added the titles for the chart and for the axes. The easiest way to change the title (which starts out as the label I selected along with the data) is to click the title and type the change.To add the axis titles, I clicked the Chart Elements button (labeled with a plus sign) and selected the check box next to Axis Titles on the pop-up menu. (Refer to Figure 3-7.) I then clicked an axis title, highlighted the text, and typed the new title.I still have to put the years on the x-axis. To do this, I right-clicked inside the chart to open the pop-up menu shown in Figure 3-14.FIGURE 3-13: The result of choosing Line with Markers from the All Charts tab.FIGURE 3-14: Right-clicking inside the chart opens this menu.Choosing Select Data from this menu opens the Select Data Source dialog box. (See Figure 3-15.) In the box labeled Horizontal (Category) Axis Labels, clicking the Edit button opens the Axis Labels dialog box. (See Figure 3-16.) A blinking cursor in the Axis Label Range box shows it’s ready for business. Selecting cells B1 through F1 and clicking OK sets the range and closes this dialog box. Clicking OK closes the Select Data Source dialog box and puts the years on the x-axis.
FIGURE 3-15: The Select Data Source dialog box.
FIGURE 3-16: The Axis Labels dialog box.