Graphing Standards

download Graphing Standards

of 20

Transcript of Graphing Standards

  • 7/25/2019 Graphing Standards

    1/20

    1 General

    1.1 Graphs must be plotted on proper graph paper or on plain white paper if done on the computer.

    Special graph paper for grading curves and liquid limit flow curve are supplied on the instructor's

    website. It is recommended that these be used to plot the data manually. For manual plots on linear,

    scaled axes proper graph paper, available in any stationery or drafting supply store, MUST be used.

    1.2 Each graph must have a unique title that states the variables plotted or type of graph and the material(s)

    tested.

    1.3 When the graph is to be included as part of a technical report, it is necessary and desirable toannotate the graph as a Figure (eg., Figure 1, Figure 2, etc.). This makes it easier to discuss the

    graph in the text of the report (eg., "... the effect of increasing the water-cement ratio is to decrease

    the compressive strength of the concrete as illustrated in Figure 1 ...").

    2 Reasons for Graphing

    2.1 Some apparati require calibration graphically (eg. Pycnometers, hydrometers). In these instances it is

    desirable to use Excel's plotting capabilities to determine a calibration equationby fitting a

    trendline to the calibration data.

    2.2 Some test procedures require graphical solutions to determine or illustrate material properties.

    For example, the Liquid Limit of clay is determined by plotting a Flow Curve (water content versus

    the logarithm of the number of drops) or the grain size distribution of coarse aggregate which is

    obtained by plotting percent passing versus the logarithm of particle diameter.

    2.3 Many of the graphs plotted are to illustrate relationships between the dependent and independent

    variable. In these cases is is highly desirable to use Excel's plotting capabilities to determine an

    equation for the relationship by fitting a trendline to the plotted data.

    3 Creating Excel Graphs

    3.1 The vast majority of graphs plotted for marterials and geotechnical labs are scatter plots. These are

    launched in Excel by clicking on the chart icon ( ) or choosing "Chart" from the "Insert"

    pulldown menu:

    W. Kirk Smeaton 1 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    2/20

    3.1 Continued

    Next, the chart type is selected:

    Select only the chart sub-type shown.

    3.2 When "Next" is selected, the next window is used to specify the ranges of columns within the

    spreadsheet containing the independent variable (x) and the dependent variable (y).

    W. Kirk Smeaton 2 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    3/20

    3.3 To illustrate the remaining steps, the following sample data will be used:A B C D E F G H I

    12 Diameter Series # %Passing

    13 0.074 0%

    14 CA FA MF 0.074 #200 100%

    15 " 19.1 100.0% 100.0% 100.0% 0.149 0%

    16 " 12.7 99.9% 100.0% 100.0% 0.149 #100 100%

    17 " 9.52 91.8% 100.0% 100.0% 0.297 0%

    18 #4 4.76 12.8% 97.2% 100.0% 0.297 #50 100%

    19 #8 2.38 6.4% 91.0% 100.0% 0.59 0%

    20 #16 1.19 5.0% 82.5% 100.0% 0.59 #30 100%

    21 #30 0.59 4.2% 65.4% 100.0% 1.19 0%22 #50 0.297 3.4% 33.4% 90.5% 1.19 #16 100%

    23 #100 0.149 2.7% 11.6% 69.0% 2.38 0%

    24 #200 0.074 2.4% 5.8% 43.0% 2.38 #8 100%

    25 Series #: CA FA MF 4.76 0%

    26 4.76 #4 100%

    27 9.52 0%

    28 9.52 " 100%

    29 12.7 0%

    30 12.7 " 100%

    31 19.1 0%

    32 19.1 " 100%

    3.4 Select "Add". Specify "Name:" as the series

    name or label. Place cursor into "Name:" window,

    click on the specify icon ( ) and then place

    cursor in cell D15 on spreadsheet (where series

    label resides) and then click on select icon ( ).

    Repeat process for "X Values:" and "Y Values:",

    specifying the ranges explicitly.

    W. Kirk Smeaton 3 of 20

    Sieve

    Designation

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

    Diameter

    (mm)

    %Passing

  • 7/25/2019 Graphing Standards

    4/20

    3.5 Select "Add" again and repeat for FA and MF. Add series for the vertical lines that mark thesieves in the series.

    You think this looks crazy ...

    wait 'til you see it with titles and labels!

    3.6 Choose "Next" and the preliminary formatting is done: Titles, Axes, Gridlines, Legend and Data Labels.

    First add the Graph Title and Axis

    Titles.

    Most of the time you can skip Axes.

    W. Kirk Smeaton 4 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    5/20

    3.7 Then specify major AND minorgridlines for both axes. This is notcarved in stone!

    Since there are three different aggregates

    each with its own curve, the reader

    (and you) needs to be able to distinguish

    among them so specify to "Show legend".

    To begin with, place it along the

    bottom (again, this can be changed).

    For data labels, we need to label the

    sieve designation and actual size of

    opening, so select "Series name" and

    "X Value". The default location for labels

    is to appear to the right of the

    plotted point.

    3.8 Finally, select "Next" and the last chart building window appears.

    W. Kirk Smeaton 5 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    6/20

    3.8 Continued

    It is recommended that you

    always select that the

    new chart be embedded

    as an object in the

    spreadsheet.

    3.9 VIOLA! Your chart! Yes, I know it looks ridiculous. So read on!

    4 Editing Excel Graphs

    4.1 As you can see, Excel doesn't understand what we want aesthetically in a graph. In fact, Excel'sgraphing capabilities seem to have been developed for Business and Marketing applications as

    oppposed to engineering and science. To make the graph recognizable to a technoperson like yourself,

    you need to first right-click just above the legend, on the blank area (if you hit an element of the graph,

    like an axis title, a box will appear around it and an element-specific menu will pop up). The menu

    you want to see is called the "Format Chart Area" popup menu shown on the next page.

    W. Kirk Smeaton 6 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    7/20

    4.2 The "Format Chart Area" menu allows you to change any of the settings

    you chose in creating the chart that you now don't like.

    4.3 The size of the lettering that Excel uses as default may be a tad overstated,

    as if the words are the most important feature on the plot! If you right-click

    on the title, you can change the fonts, size and styles.

    If you left click on the title, you can edit the text, and if you select it you can

    change style and font over specific ranges. I have reduced the size to 12 point,

    (was 16) changed the style to regular (was Bold) and underlined it.

    4.4 The % Passing scale is shown from 0 to 150% but the data ends at 100%. The

    numbers also have one decimal place and the size of the numbers is too big...

    all these things take up space! By double left-clicking on any number in the vertical

    scale, you can make some serious changes from this popup menu:

    4.5 The axis lines and ticks are not at issue so we start with

    "Scale":

    If we change the "maximum" value to 1, then the "Major Unit" (posted numerical interval) changes to 0.2

    and the "Minor Unit" (horizontal gridline interval) changes to 0.04. This means the numbers displayed

    will be the 0%, 20%, 40%, 60%, 80% and 100% and the interval between gridlines will be 4%. This is too

    small so let's change it to 10%.

    Selecting "Font" we can change the size from 12 point to 9 point and the style from Bold to Regular.

    Selecting "Number" we can change the precision to 0 decimal places.

    4.6 The "Alignment" is fine as it is (Excel got somethingright!)

    W. Kirk Smeaton 7 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    8/20

  • 7/25/2019 Graphing Standards

    9/20

    4.8 Well, its starting to look a bit better but does that grey fill in the plot area enhance our

    understanding of the graph? Does it make it any clearer? Obviously not and this is why graphs

    produced for engineering and technical purposes should NOT use fill. To remove the fill and change

    the border to black, right click in a cell on the graph, taking care not to touch a gridline or plot element.

    Choose "Format Plot Area"

    Change "Area" to "None".

    Change "Color" to "Automatic" (which is black).

    4.9 All those data labels are now whats giving us grief. Let's reposition them so that they appear above

    the plotted points. To do this, right click on one of the MF labels and a Data Labels menu pops up:

    W. Kirk Smeaton 9 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    10/20

    4.9 Continued

    All the data labels for the MF data series are highlighted, which allows you to make the change to

    all of them at once. Choosing "Format Data Labels", another menu appears which allows you to

    modify the label's "Patterns" (border and

    background), the "Font", the "Number" format and

    the "Alignment". The default settings are fine for

    patterns (no border, no background) but choosing

    "Font", we can set the size to 8 point and choosing

    "Number", change to "General". Choosing

    "Alignment" as shown we select "Above".

    This is repeated for each data series (yes, it

    takes a while).

    4.10 Next we can edit the individual data series by right-clicking on any plot symbol in a series.

    For example, the right-clicking on MF series produces this popup:

    Choosing "Format Data Series", the Marker Background colour is

    first set to "No Color" as shown below:

    W. Kirk Smeaton 10 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    11/20

    4.10 Continued

    Next, the highly ambiguous marker ( ) is

    converted to a more precise marker, by

    changing the "Foreground" colour to black

    and then selecting , or . The size

    of the markers is also augmented to 7 for

    better visibility.

    The line is changed from "None" to a

    continuous line with a slightly heavier

    weight, colour is set to black.

    This is repeated for the CA and FA series

    only using a line style of short dashes for

    the FA and long dashes for the CA.

    The result is the graph shown below, now its starting to actually look like a graph. However, the labels

    that remain have too much information in them. The intention was to have the sieve designation above

    the series and the sieve opening (mm) below. Hence, by right-clicking on each label, the unwanted

    information can be eliminated and the label positioned explicitly.

    W. Kirk Smeaton 11 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    12/20

    4.11 Now the remaining data series are edited,

    again by right-clicking on one of the two

    markers in each series and first setting

    the "Marker" to "None", then changing the

    style of the "Line" to short dashes,

    the colour to dark blue and the weight

    increased slightly. In this way a vertical line

    is plotted for each sieve size.

    There should only be 3 series in the legend:

    CA, FA and MF. By left-clicking on the

    legend label (not the line or marker) the

    entire legend entry is framed. Then by

    right-clicking on the framed entry, the

    following menu pops up:

    Choosing "Clear" as shown will eliminate the entry from the legend. If you framed only the marked and

    line of the entry you may find that the labels for that line also disappears from the plot so it's a good

    idea to check this with every entry cleared. The text size for the remaining entries is then reduced

    by left-clicking on the legend box and using the format legend popup menu. The legend now is small

    enough to reposition as shown below:

    W. Kirk Smeaton 12 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    13/20

    4.12 As an alternative to using a legend, the drawing toolbar can be used to label the curves explicitly:

    First, select the entire graph, click on the textbox icon ( ) and then draw a text box somewhere

    on the graph. If there is a border and/or background in the textbox you can remove these by using

    the format textbox menu that is activated by left-clicking in the textbox and then right-clicking

    on the highlighted border. The text can be entered as soon as the textbox is created.

    Leader lines could then be drawn using the arrow icon ( ). These are illustrated on the final

    plot of this example graph on the next page.

    4.13 The graph created, embedded in the spreadsheet, can be presented as part of the spreadsheet

    printout or it can be printed separately. The embedded graph is in portrait orientation unless

    changed in the print preview to landscape. All the example plots shown so far are in portrait.

    The elements of the graph can be moved around explicitly as can the plot dimensions.

    Some plots should be plotted in portrait using as much of the vertical space on the page as possible,

    especially when the plotted data is then used manually for a graphical solution.

    When a chart is plotted in isolation from the spreadsheet, the chart is selected first by left-clicking

    near a corner of the chart and then selecting print preview ( ). The chart is then shown in

    landscape orientation as shown on the next page. Choosing print will then send the chart to the printer

    and it will print in landscape orientation.

    5 Fitting Curves to Data

    5.1 There are many times when mathematical models are required of the data plotted. Excel has the

    capability of performing "best fit" analysis of the data plotted to produce an equation that can be

    used to estimate the y-axis variable for given values of the x-axis variable. Excel calls these

    "Trendlines". Several types of mathematical models are available (linear, logarithmic, polynomials,

    power functions, exponentials and moving average) and the equations and R2statistic* can be

    displayed.

    The problem is that Excel doesn't distinguish between "good" data and "outliers". Quite often,

    especially when using the data from and entire class, there are one or two points that are so wrongthat they totally distort the mathematical model produced by the "Trendline" feature.

    (*) An R2value of 100% or 1.0 means that the data matches the mathematical model perfectly. As the scatter of

    the data around the model increases, the R2value decreases.

    W. Kirk Smeaton 13 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    14/20

    W. Kirk Smeaton 14 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    15/20

    5.2 To illustrate the points discussed in section 5.1, another example is used.

    A B C D E F G H

    7 % AC Gmm Gmb Stability Pa VMA Flow

    8 4.5 2.484 2.339 3.733 5.86 14.30 16.2

    9 5.0 2.469 2.349 4.029 4.86 14.40 20.2

    10 5.5 2.448 2.377 3.284 2.90 13.80 30.8

    11 6.0 2.427 2.375 3.714 2.15 14.30 30.2

    12 6.5 2.412 2.363 3.663 2.04 15.20 35.7

    13 7.0 2.395 2.359 3.088 1.50 15.80 48.0

    Using %AC (Percent Asphalt Cement) as the independent variable (x-axis), each of the other

    variables is plotted as the dependent variables (y-axes) using the steps and conventions illustrated

    in the previous example. These graphs are used to determine an optimum % AC and so it is more

    useful to display them all on one page as shown on the following page.

    Each graph can be positioned accucately within the page by holding down the ALT key while moving it

    or resizing; this technique makes graph borders coincide with cell boundaries within the spreadsheet.

    5.3 To illustrate the fitting of mathematical models to the plotted data, we will focus on the middle

    two plots (Stability versus %AC and Percent Air Voids versus %AC).

    Right-clicking on the 6.5% AC The "Add Trendline - Type" menu then appears. One

    point generates the popup menu of the six options is selected. This defines the form

    shown. of the mathematical model to be used to fit to the data.

    Choose "Add Trendline". A parabola (2ndOrder Polynomial) is selected. Before

    selecting "OK" however, the "Options" menu should be

    selected to specify display of the equation and R2.

    W. Kirk Smeaton 15 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    16/20

    5.2 Continued

    W. Kirk Smeaton 16 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    17/20

    5.3 Continued

    The "Options" menu allows you to specify that

    the equation of the trendline and its R2value

    should be printed on the graph.

    Another very useful option is to set the intercept

    to 0 for functions that should logically pass

    through the origin.

    The graph will then look like this.

    The title and equation can be explicitly repositionedto improve the readability.

    5.4 The R2value is only 42% and the reason should be obvious: the 5.5% AC point is way too low.

    This could be due to the testing conditions, if for example the specimens spent too much time

    in the water bath, thus making them too weak. The Flow plot on the previous page reinforces the

    "too soft" theory as the 5.5% point appears to be too high. This is an instance where an outlier in the

    data is distorting the results. The solution is to separated the outlier from the rest of the data but

    still plot it on the graph by creating a series of its own. J K

    7 % AC Stability

    Some adjustments are required to the data. 8 4.5 3.733

    The data is copied into two new columns (J and K) but the 5.5% 9 5.0 4.029

    data is extracted and moved to the bottom as shown. 10 6.0 3.714

    The old graph is copied (right-click in a blank portion of the graph) 11 6.5 3.663

    and the new graph is edited by redefining the source data and 12 7.0 3.088

    trendline. 13 5.5 3.284

    W. Kirk Smeaton 17 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    18/20

    5.4 Continued

    Redefined Source data for Stability Series Source data for Outlier Series

    5.5 The resulting graph shows the new trendline with

    an R2of 92%. That sure beats 42%! Note that

    although the important thing may seem to be the

    trendline, we also need to see the data points plotted

    to have an idea of how much scatter there was in it.

    The outlier should appear to be markedly different

    than the rest of the data so to show that it was

    excluded from the data used to develop the trendline.

    A linear model was used for the % Air Voids.

    Even though a better fitting model, such as a parabola

    (R2= 97%), logarithmic (R2= 93%), power function

    (R2= 97%) or exponential (R2= 96%), could have been

    selected, the linear model is simpler and would be

    easier to use and an R2of 90% is quite acceptable.

    If, for example, it was desired to know what value of

    %AC would produce 4% air voids, the manipulation of a

    line equation is trivial compared to the solution of a

    quadratic equation (the answer is 5.3% by the way).

    W. Kirk Smeaton 18 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

  • 7/25/2019 Graphing Standards

    19/20

    5.6 One advantage of knowing the equations of the trendlines is when it is required to find the values

    of x and y when the function maximizes or minimizes. The first derivative of a parabolic function

    is the function of the slope of the curve as x varies. Parabolic curves maximize or minimize at points

    where a tangent to the curve (its slope) is a horizontal line. In such cases the slope has a value of 0.

    The function of the Stability in kN versus %AC was: y = -0.3091x2+ 3.2933x - 4.7908

    The first derivative of this function is: y' = -0.6182x + 3.2933

    Setting y' (the slope) equal to 0 and solving for x, Stability maximizes at a %AC = 5.33%

    Therefore, the value of the maximum Stability (for the curve) = -0.3091(5.33)2+ 3.2933(5.33) - 4.7908

    or 3.981 kN.

    5.7 The equation coefficients that were obtained in the example had 4 and 5 significant digits which is

    desireable. However, sometimes the scale of the data or the units in which they're expressed can

    conspire to rob us of this required precision.

    For example, the units of measurement for Stability was Newtons and the %AC was actually the fraction

    of AC multiplied by 100. If the %AC had been entered as the fraction of AC with a percentage format

    and the Stability in Newtons were used, then the graph looks pretty much the same, but the equation

    coefficients are in a different time zone (and precision):

    The coefficient of the quadratic (x2) term is too big

    to fit in the equation display so it is reported as

    -3E+06 (Engineering Notation) which translates to

    -3,000,000 which has but ONE significant digit!

    As you can see, the farther away from 1.000 thedata gets, the harder it is to maintain the required

    precision. It is sometimes necessary to artificially

    scale the data to get reasonably precise coefficients.

    To convert to an equation that produces stability in

    Newtons given fraction of AC, the quadratic

    coefficient of the original equation should be

    multiplied by 107, the linear coefficient should be multiplied by 105and the constant term should be

    multiplied by 103: Stability (N) = -3091000x2+ 329334x - 4790.8 where x is the fraction of AC.

    Notice that the linear coefficient was actually more precise (6 significant digits) in the rescaled

    example above. That's because there was no need to take up space with a decimal point so one moredigit was printable.

    6 Graphing Equations

    6.1 Sometimes it is required to graph a given equation or function. In these instances Excel is used to

    generate data for plotting, however there are some minor formatting differences.

    Let's say it is required to plot the equation: Nq= etan()tan2(45 + /2)

    W. Kirk Smeaton 19 of 20

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports

    Note: When you copy a chart, any drawing elements such as text boxes and arrows are not included

  • 7/25/2019 Graphing Standards

    20/20

    6.2 First, set up a column of "x" values (i.e., ). Since the tan(90) =, we can't get too carried away.Since (angle of internal friction for a soil) is rarely above 45, 0 - 50 should suffice for a range.

    A B C

    Then input the equation: Nq

    =EXP(PI()*TAN(B6*PI()/180))*(TAN((45+B6/2)*PI()/180))^2 6 0 1in the second column and copy over the row range. 7 5 1.567698

    8 10 2.471436

    9 15 3.941147

    10 20 6.399394

    11 25 10.66214

    12 30 18.40112

    13 35 33.29609

    14 40 64.19521

    15 45 134.8738

    16 50 319.0573

    6.3 Then generate the graph using the scatter style as before. The y-axis is logarithmic and there is no

    need to fit a trendline since it really isn't data, after all! The point markers are also suppressed

    and only straight lines are used to join the points. The more points included in the graph, the

    smoother the curve will appear. As a rule of thumb, if you can visually tell that the curve is a series

    of straight lines, then you need to generate more points to plot.

    Remember, when you're plotting a known mathematical relation and plotting "data" that has been

    calculatedrather than measured, no individual points should be visible, only the curve.

    Incidently, if anyone knows why my y-axis labels keep getting truncated or how I can fix this, I

    would be most grateful for the information (I have been known to be generous with bonus marks!).

    Building and Construction Sciences Department

    Graphing Standards for Laboratory Reports