# HG changeset patch # User Puneeth Chaganti # Date 1256280052 -19800 # Node ID fdfcfa44f90bef5a6f40039243ea5c14fa68606b # Parent 70fe6973176179b1f52709e14c1bd938b4882867# Parent 9d815e9e553aca94968691bd935bee3f31687dab Merged heads. diff -r 9d815e9e553a -r fdfcfa44f90b day1/session1.tex --- a/day1/session1.tex Fri Oct 23 11:48:55 2009 +0530 +++ b/day1/session1.tex Fri Oct 23 12:10:52 2009 +0530 @@ -357,6 +357,43 @@ \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}} diff -r 9d815e9e553a -r fdfcfa44f90b day1/session3.tex --- a/day1/session3.tex Fri Oct 23 11:48:55 2009 +0530 +++ b/day1/session3.tex Fri Oct 23 12:10:52 2009 +0530 @@ -158,8 +158,8 @@ In []: L = [] In []: T = [] In []: for line in open('pendulum.txt'): - .... len, t = line.split() - .... L.append(float(len)) + .... ln, t = line.split() + .... L.append(float(ln)) .... T.append(float(t)) \end{lstlisting} We now have two lists L and T