# 1.5: Plotting, Part II

- Page ID
- 6987

\( \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}}\)

\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)

\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)

\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vectorC}[1]{\textbf{#1}} \)

\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Now that you have identified the software you want to use to create plots of datasets, I want you to reproduce three plots and submit these to me for review.

This activity will be graded based on * participation only* (either you made three plots or you didn't). I will provide constructive feedback to you about the way your plots look. Even though I will not grade this particular exercise for accuracy, the rest of the lessons in this course (as well many lessons in other courses in the program) will require you to make some plots. Your grades on those activities

*in part depend on your ability to produce a clear and satisfactory plot, so consider this exercise free practice.*

*will*## Reproduce 3 Plots

#### Directions

- Below is the first plot you have to reproduce. Graph the functions y = x
^{2}and y = 2x on the same set of axes. The satisfactory plot will include a title, labeled axes, axes' tick marks and labels, two different line styles (doesn't have to be color) to differentiate the functions, and a correct legend identifying the two functions. All fonts should be large enough to be legible. You may choose the range of your axes, the aspect ratio of your plot, and the line style of each function.

E. Richardson, created with MATLAB

2. Next shown is the second plot you have to reproduce. Penn State's Beaver Stadium is second only to Michigan Stadium in Ann Arbor ("The Big House") in terms of attendance capacity. The official capacity of Michigan Stadium, after recent renovations, is 109,901. The plot below shows a scenario in which Michigan Stadium is filled to capacity at the start of a hypothetical football game between PSU and Michigan, but each time PSU scores a touchdown, half the fans leave. You must envision PSU scoring touchdowns until only one fan is left in the stadium. Generate such a dataset (a table of x and y values) and make a plot from it showing the number of touchdowns vs. the number of fans at Michigan Stadium. Remember, no fractional people! Always round down to the nearest whole number for your y values. I have made a sample table of values and filled in the first few for you. Continue your own table until there is just one fan left.

**Table of values for Exercise 2**

Number of PSU touchdowns |
Number of fans at the Big House |

0 | 109,901 |

1 | 54,950 |

2 | 27,475 |

3 | ? |

4 | ? |

5 | ? |

This plot should be made on linear axes. The satisfactory plot will include a title, labeled axes, axes' tick marks, and labels. Since you are plotting discrete data points that are part of a time series, please plot them with a symbol and connect the symbols with a line. All fonts should be large enough to be legible. You may choose the aspect ratio of your plot and what kind of symbol and line style to use.

E. Richardson, created with MATLAB

3. For your third plot, use the table of values you generated in Exercise 2 to make the same plot, but using a logarithmic y-axis. The satisfactory plot will include a title, labeled axes, axes' tick marks, and labels. Since you are plotting discrete data points that are part of a time series, please plot them with a symbol and connect the symbols with a line. All fonts should be large enough to be legible. You may choose the aspect ratio of your plot and what kind of symbol and line style to use. *Alternative: If you have trouble making log axes, you may instead take the log (base 10) of each y-value in your table and plot the resulting dataset instead. Your plot should still look like the plot below, but if you choose this option, you must label your y-axis accordingly.

E. Richardson, created with MATLAB

Submitting your work

You may choose to submit these plots one of two ways: you may save them as graphics files (.jpg, .pdf or .tiff) or, if you use a web plotting program that allows you to save your plot as a link, then you may submit the links to the plots.

Save your three plots in the following format:

L1_plot1_AccessAccountID_LastName.jpg (or .png or .pdf or .tiff).

For example, Cardinals outfielder Marcell Ozuna's file would be named "L1_plot1_mio13_ozuna.jpg"

Submit your three plots to the Canvas assignment in Preinstructional Activities called "Three Plots." Try to get this done by **the due date listed on the first page of this lesson.**

## Grading criteria

As I mentioned at the top of the page, this activity will be graded based on * participation only* (either you made three plots or you didn't). However, I will provide constructive feedback to you about your plots.