Class 3 – Make a list and plot it

Today we are going to
1.  learn more about lists and plot them.  Today’s files are in https://github.com/bmaillou/BigDataPython/tree/master/03-Lists

 

Here is a reading on lists.  http://www.tutorialspoint.com/python/python_lists.htm

VIDEO

QUIZ After Video-Take the quiz on courseworks.

HOMEWORK

Homework 2 Due beginning of next class (Monday February 3, 2025).

  1. Code.org intro course through stage 15
  2. Make plots Like below.
  3. Remember to start your notebook with a nice header in Markdown with your name, homework number etc.
  4. Hand in your notebook.  It ends in .ipynb.  this lets me run your notebook if there are any issues.

Make 2 lists

x=np.array([1,2,3,4,5,6])
y=np.array([6,5,4,3,2,1])

plot x versus y.

  1. use the ax.plot nomenclature to make a plot.
  2. choose your favorite shape
  3. choose your favorite color
  4. choose your favorite linestyle.
  5. choose something else to change (e.g. linewidth…)
  6. Put your name in the axis labels
  7. Add a title with your hometown in the title
  8. Use Markdown after the graph to add a figure caption.  It can be brief but get in the habit.

This is my example but it is not perfect!!!!!  something similar will get you a 50.  You need to add the missing parts.

hw2-picture
Final 10%:  To get the final 10% of the HW credit can you make a second plot with a slope of 2 and an intercept of 2?  Remember all the parts of the first graph.  Also, remember copy and paste are your friends……  Also remember what slope and intercept are!