Excel Lab 2: Plots of Data Sets Excel makes it very easy for the scientist to visualize a data set. In this assignment, we learn how to produce various plots of data sets. Open a new Excel workbook, and perform the steps in this tutorial as we go. We will describe everything in this demonstration within the context of one example data set: x y 0.5 0.4 1.3 1.8 2 2.1 3 2.5 We begin by entering this data set into our Excel spreadsheet. (If you don t remember how to do this, please refer to the on-line Getting Started with Microsoft Excel tutorial, accessible from Dr. Caudill s teaching webpage.) Our spreadsheet now looks like this: Scatter Plots: This is the simplest type of data plot, because all you do is plot the points in the data set. Specifically, we view each pair of data points (i.e. each row in the data table) as determining the coordinates of a point in the xy-plane. We simply draw in the point in the plane that corresponds to each data point in the table, and your scatter plot is done. To do this in Excel, first use the cursor to select the entire data table, including the labels at the top of each column. Then, on the menu at the top of the Excel window, click Insert, then Chart. You will get a window that looks like this:
Locate the Chart type called XY (Scatter), and click on it. You will then see this: On the right-half of this window, we see five Chart sub-types, which give us a choice of five different ways to display our data. The default selection (shown with the black background) is the basic scatter plot. The one immediately below the basic scatter plot is a scatter plot with the dots connected with smooth curves. Below this is a scatter plot with the dots connected with line segments. In the second column are similar choices, but without the data points marked. Let s choose the basic scatter plot. Now click Next, then click it again, and again, until Excel finally gives you a chart in your workbook, like this:
The chart can be moved to a different location in the spreadsheet by placing the cursor on it, holding down the left mouse button, and dragging the chart to where you want it. Note that, when you click on the chart, you have selected it, as indicated by the small black boxes that appear in the corners and midpoints of each side of the chart. To make this (and the little chart toolbar) go away, just click somewhere in the spreadsheet outside the chart. You should see something like this: Some details about the chart itself: Each data point from the table is represented by a blue diamond on the chart. For example, the first blue diamond has coordinates (0.5,0.4), from the first row of the data table.
The points are plotted with the first data column on the horizontal axis and the second data column on the vertical axis. Therefore, it makes sense for us to try, when possible, to always write our data tables so that the independent variable is in the first column. The plot is labeled with the same label that appears at the head of the second data column ( y in this case). Locate the little box, containing a single blue diamond and a y, on the righthand side of the chart. This is the legend, and tells us what the blue diamonds stand for. Editing your Scatter Plot. If you decide you would rather have the dots connected, you can change the format of the plot by placing the cursor on any of the blue diamonds, then right-clicking and selecting Format Data Series You will get a window like this: The left-hand part concerns the curves in the chart, and the right-hand part concerns the plotted points. Note that, currently, the Line side has the None radio button selected, which is why there is no curve in our plot. On the Marker side, Automatic is selected, which is why the individual data points are marked on our plot. Let s see what happens if we select the Automatic radio button on the Line side. (Also check the Smoothed line box.) After making these selections and clicking OK, our chart looks like this:
Now we have a blue (smooth) curve connecting the diamonds. Now, if we want to omit the blue diamonds altogether, and just keep the curve, we go back to Format Data Series (as we did above), and select the None radio button on the Marker side of the window. This gives us a chart that looks like this: Exercises.
1. Here is a data set resulting from measuring the size of a bacterial population every half-hour: t P 0.0 1.0000 0.5 1.4142 1.0 2.0000 1.5 2.8284 2.0 4.0000 2.5 5.6569 3.0 8.0000 Here, t is time (in hours) since the start of the experiment, and P is the population size (in millions) at time t. Enter this data set into an Excel workbook, then produce a scatter plot of the data, with the data points connected by line segments. 2. Create a scatter plot of the population data given on the first day of class. 3. Print your Excel worksheet, put your name on it, and turn it in on the due date. (NOTE: You do NOT need to print this Word document and turn it in.)