# Quizzes

Return Quiz 3

## Quiz 4

Show your mayfly model summary diagram

# Social

Meet someone new (oops, forgot to do this).

## %matplotlib inline

For future reports, use this instead of

%matplotlib notebook

because with the latter, plot is not included in notebook - have to rerun everyone's computation!

## Miscellaneous

In general, try to avoid repetition of a code block in your reports, possibly by wrapping it in a function.

Math equations and formulas are part of your sentence. These sentences should be properly punctuated - have periods at the end, etc.

Don't conclude something that's in conflict with what you're showing.

# Numpy, and vectorizing computations

the substrate of all scientific computing in Python

arrays

constructors

arithmetic

Numpy introduction notebook

Enhancement: code for double-axis plot (courtesy Chris and Google)

%matplotlib inline

fig, ax1 = plt.subplots()
ax2 = ax1.twinx()

ln1 = ax1.plot(data[:,0]+data[:,1]/60,data[:,5],color='r')
ln2 = ax2.plot(data[:,0]+data[:,1]/60,data[:,4],color='b')

legend = ln1 +ln2

ax1.legend(legend,['Temperature','Pressure'])

plt.title("Temperature and Pressure vs Time")
ax1.set_xlabel('Time (min)')
ax1.set_ylabel('Temperature ($^\circ$ Celsius)')
ax2.set_ylabel('Pressure (hPA)')

plt.show()


## Still to do:

vectorize creation of mayfly diagram (hint)