diff options
author | Puneeth Chaganti | 2009-10-23 11:57:16 +0530 |
---|---|---|
committer | Puneeth Chaganti | 2009-10-23 11:57:16 +0530 |
commit | c574884ef07ff28dfd226e10a9da26968d62f899 (patch) | |
tree | 5aa3607e606b27b4685475b7a998e3444b440e4f /day1 | |
parent | 99116fc300db484c24df43b26227baf215fbb880 (diff) | |
download | workshops-c574884ef07ff28dfd226e10a9da26968d62f899.tar.gz workshops-c574884ef07ff28dfd226e10a9da26968d62f899.tar.bz2 workshops-c574884ef07ff28dfd226e10a9da26968d62f899.zip |
Added review at end of session1.
Diffstat (limited to 'day1')
-rw-r--r-- | day1/session1.tex | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/day1/session1.tex b/day1/session1.tex index 880e8b2..3e12da9 100644 --- a/day1/session1.tex +++ b/day1/session1.tex @@ -357,6 +357,43 @@ In []: ylim(ymin, ymax) \end{frame} \begin{frame}[fragile] +\frametitle{Review Problem} +\begin{enumerate} +\item Plot x, -x, sin(x), xsin(x) in the range $-5\pi$ to $5\pi$ +\item Add a legend +\item Annotate the origin +\item Set axis limits to the range of x +\end{enumerate} +\begin{lstlisting} +In []: x=linspace(-5*pi, 5*pi, 501) +In []: plot(x, x, 'b') +In []: plot(x, -x, 'b') +\end{lstlisting} +$\vdots$ +\end{frame} + +\begin{frame}[fragile] +\frametitle{Review Problem \ldots} +\small{ +\begin{lstlisting} +In []: plot(x, sin(x), 'g', linewidth=2) +In []: plot(x, x*sin(x), 'r', linewidth=3) +\end{lstlisting} + +\begin{lstlisting} +In []: legend(['x', '-x', 'sin(x)', 'xsin(x)']) +In []: annotate('origin', + xy=(0, 0), + xytext=(0, -7), + arrowprops=dict( + shrink=0.05)) +In []: xlim(5*pi, 5*pi) +In []: ylim(5*pi, 5*pi) +\end{lstlisting} +} +\end{frame} + +\begin{frame}[fragile] \begin{center} End of Session-1\\ \alert{Don't Close \typ{IPython}} |