Skip to main content
Engineering LibreTexts

15.1: Graphing

  • Page ID
    15006
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Graphing is a great way for interpreting technical and scientific data. Two areas will be discussed: 1) graphical presentation of data, 2) graphical analysis.

    Mathcad provides several graphing options.

    The easiest way to begin a plot is to use the graphing toolbox.
    OR
    Use the menu options Insert/Graph/X-Y Plot
    OR
    Shortcut [Shift + 2]
    The toolbar looks like

    clipboard_ed55f2fba4f6086d65926232f9df45ba8.png

    and clicking on the first button creates a blank plot

    clipboard_e124dab383959e61f48f662c8a4fa5ada.png

    There are six place holders in the empty graph. The centered place holders are used for x-coordinate and y-coordinate data and the other four are for the x and y bounds.

    Example 15.1.1

    An engineer is testing a new material to find its modulus of elasticity, defined as the stress over the strain (or N/m). Plot the data given F vs. δ.

    Solution

    \[F:=\begin{pmatrix}
    2\\
    4\\
    6\\
    8\\
    10\\
    12\\
    14\\
    16\\
    18\\
    20
    \end{pmatrix}.kN\nonumber\]

    \[δ:=\begin{pmatrix}
    0.82\\
    1.47\\
    2.05\\
    3.37\\
    3.75\\
    4.17\\
    5.25\\
    5.44\\
    6.62\\
    7.97
    \end{pmatrix}.mm\nonumber\]

    clipboard_eb35aaeb28573fd415e5671b8fcb2848f.png

    If you wish to make any plot bigger, click on the plot. Grab the bottom right hand handle with the mouse and drag it to make it larger. If you want to reposition a plot, click on the plot, point to the outside edge of the area until you see the hand, hold the mouse button down and drag the plot to a new location.

    Note

    Mathcad always plots in base units. So the plot in example 47 is in bNewtons for the F and in meters for the δ. Here we show the enlarged plot with the units removed. As you see the plot now shows the values in the above tables with a unit on the axis. The center place holders have the data value divided by the unit F/kN and δ/mm.

    clipboard_ec9cce21b242d71337eaf2ca64dc9279e.png

    However, in example 47 suppose we really want to see just the data points, not the connecting lines. To do this, double click the graph to bring up the formatting dialog box.

    clipboard_e42259fe3abd1efdf0b80fa7cf09824be.png

    Go to the TRACES tab to add a symbol and remove the line. As you can see from the other tabs in this dialog box, you make many changes to the way the graph is formatted. A possible, reformatted graph appears below.

    clipboard_ed99bb079b971a4f771b03a4a27095da5.png

    How about plotting multiple curves on the same plot? We demonstrate this in the following example.

    Example 15.1.2

    Begin by entering the data for the variables Time, Distance1 and Distance2.

    \[Time:=\begin{pmatrix}
    0\\
    1\\
    2\\
    3\\
    4\\
    5\\
    6
    \end{pmatrix}\nonumber\]

    \[Distance1:=\begin{pmatrix}
    0\\
    4.9\\
    19.6\\
    44.1\\
    78.4\\
    122.5\\
    176.4
    \end{pmatrix}\nonumber\]

    \[Distance2:=\begin{pmatrix}
    5\\
    19.8\\
    76.8\\
    153.3\\
    256.2\\
    394.5\\
    559.2
    \end{pmatrix}\nonumber\]

    Open a new plot and put Time in the x-axis. For the y-axis, enter Distance1 and then type a comma (important!!). This will move you to a new line where you can type Distance2. When you are done, click outside the graph to see the plot. To customize the plot, double click the plot and use the Formatting dialog box. See if you can match the plot below:

    clipboard_ef223d84695046451068b83103663f765.png

    If you want to see a plot of a predefined function, you can use a Quickplot.

    Example 15.1.3

    Simply open a new plot, enter the variable x on the x-axis and a function, say sin(x) on the y-axis. The default plot has x from -10 to 10.

    clipboard_edcf4210ca998395822437aa547de8eb9.png

    In example 15.1.3 if you want to change the x values, first single click on the plot. The numbers -10 and 10 appear at the bottom. One at a time simply click on them and type in the new values 0 and 2π (using the Greek toolbar).

    clipboard_eea89dfa6ff10636178884a01f30201c1.png

    Now for a more advanced example...

    Example 15.1.4

    Here is the vibration response of a damped signal of freedom system to a step input.

    clipboard_e47b369fedec5854f1cb9c0687b726a76.png

    with resulting plot:

    clipboard_e328462010b4c93e3c58f23571e66ffac.png

    The last example may be difficult to reproduce. Mastering how to input all of these parts into Mathcad takes time. Be patient.


    This page titled 15.1: Graphing is shared under a CC BY-NC 3.0 license and was authored, remixed, and/or curated by Troy Siemers (APEX Calculus) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.