3.6 Adding Data To Charts: Expand/collapse Button
3.6 Adding Data To Charts: Expand/collapse Button
3.6 Adding Data To Charts: Expand/collapse Button
b. Select the replacement data cells to be added as described in Section 3.4. These
replacement cells may be chosen to include or omit the old data cells. To add a
data series while retaining the old data, see Section 3.6.
4. Click the collapse (expand) button again and the Select Data Source dialog box
will reappear.
5. Click OK, which will redraw the chart with the new replacement data.
6. Make cosmetic and other adjustments to the chart as needed.
1. Activate the chart. The Chart Tools menu options will appear on the Ribbon Bar.
2. Click CHART TOOLS/DESIGN/DATA/Select Data. A Select Data Source popup
window will appear as in Figure 3.3. The lower left area of the Select Data Source
popup window is where you will click Add to add another data series using the
Edit Series dialog box that appears as shown in Figure 3.4.
3. In the Edit Series dialog box, select a name for the data series. Use the collapse/
expand button if needed.
4. After selecting a name for the data series, select the Series X and Y values, again,
using the collapse/expand button as needed.
Expand/collapse button
FIGURE 3.4
32 What Every Engineer Should Know About Excel
FIGURE 3.5
5. After completing the selections, click OK. The Select Data Source popup will reap-
pear with the additional data series listed, and the chart will be updated with the
additional data series plotted in the chart as shown in Figure 3.5.
6. Make cosmetic and other adjustments to the chart as needed.
are two choices: Display Equation on chart and Display R-squared value on chart. Select
from those two choices to display the items. See Sections 3.9 and 3.10 for speci c examples.
R2 is called the coef cient of determination, whereas R is called the correlation coef cient.
This equation expresses what is called the Pearson correlation coef cient, which is demon-
strated by the PEARSON worksheet function. A calculation of R2 separate from the trend
line determinations may also be obtained by calling either the worksheet function RSQ
or PEARSON. Use the Excel Help facility for the proper syntax of these functions. The R2
displayed with the graphical trend line is expressed as follows:
SSE
R2 = 1 −
SST
where SSE is the sum of the squares of the error from the correlating trend line, or
SSE = ∑(y i − y ic )2
and SST is the sum of squares of deviations from the arithmetic mean, ymean = (∑yi)/n, and
may be expressed in the form:
2
SST = ∑ y 2i − ∑ y i /n
where yic represents the value of y on the linear trend line t. For a perfect match between
the data points yi and the trend line, R2 = 1.0. For exponential, power, and polynomial
trend lines, Excel uses a transformed regression model. Note that these calculations are
equivalent to using a population standard deviation instead of a sample standard devia-
tion. Still, a perfect t will be obtained when yi = yic. SST may also be calculated in terms of
the population standard deviation function STDEVP through the relation:
Nu = C(GrPr)m
for free convection heat transfer. The general power law relation has the form
y = ax b (3.2)
which is a linear relation between log y and log x. When x and y are plotted on a log–log
graph, b will be the slope of the line and log a will be the intercept at x = 1.0 (see Section
3.10). When trying to t the experimental data with the power law relation, scatter in the
data will normally occur and a least-squares analysis should be employed to determine
the best t. A correlation coef cient may also be calculated to indicate the goodness of t.
Excel may be used to (1) display the data on a log–log plot, (2) calculate the values of the
constants a and b using a least-squares analysis, (3) display the resultant correlation trend
line, and (4) display the correlation equations on the plot.
Performing these steps in Excel, the procedure is as follows:
1. List the data in two columns. Label columns as appropriate. Consider discarding
any data points that appear to be in gross error. This step may be deferred until
after the data plot is obtained. See step 7.
2. Select the data to be plotted.
3. Click INSERT/CHARTS/Scatter and select the scatter chart without connecting the
line segments (type 1 chart).
4. Click the chart to be edited. Double click either the x- or y-value axis—a FORMAT
AXIS window will appear on the right side of the Excel worksheet. Under AXIS
OPTIONS, select the upper and lower bounds for the axis as well as the major and
minor units on the axis scale. Click Logarithmic Scale and the desired base (10
is default). Repeat for the other value axis. If desired, expand the TICK MARKS,
LABELS, and NUMBER options and select the desired options for each axis.
5. Once step 4 is completed, click the chart again. Then, click CHART TOOLS/
DESIGN/CHART LAYOUTS/Add Chart Element/Trendline/More Trendline
Options. Under Trendline Options, select Power, and click Display Equation on
the chart and Display R-squared value on the chart. The chart will automatically
update with the trend line, the equation, and the R2 value.
6. Inspect the nal graph. Does the trend line appear to represent the data? If not, the
power relation may not be correct for the physical application. This step is important!
A correlation equation should NEVER be accepted without visual con rmation of agree-
ment with the experimental data points. The computer will perform the trend line anal-
ysis as instructed, but it cannot assure that the functional form selected is correct.
7. Examine the individual data points in the nal plot. If some points appear to be
widely scattered from the main body of data, consult the original data sheets for
possible errors or erratic behavior in the experiment. Consider eliminating suspi-
cious points.
Charts and Graphs 35
Two examples of power law correlation plots are shown in Figure 3.6. One has a rather
good t, whereas the other has a lot of scatter. In the latter case, one should suspect that
either the data are bad or that a power law relation does not t the physical situation.
FIGURE 3.6
36 What Every Engineer Should Know About Excel
(a)
FIGURE 3.7
(Continued)