diff options
Diffstat (limited to 'day1/session2.tex')
-rw-r--r-- | day1/session2.tex | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/day1/session2.tex b/day1/session2.tex index 9bdd379..60273ef 100644 --- a/day1/session2.tex +++ b/day1/session2.tex @@ -73,7 +73,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Title page -\title[Plotting using Python]{Plotting experimental data\\} +\title[Plotting using Python]{Python for Science and Egg. Plotting experimental data} \author[FOSSEE] {FOSSEE} @@ -126,16 +126,17 @@ \begin{frame} \frametitle{Why we didn't close the IPython??} \begin{itemize} - \item Because all the command history is lost - \item We can go back, edit, and re-execute our commands + \item IPython provides a convenient feature + \item To go back, edit, and re-run commands + \item But when you close, this is lost \end{itemize} \end{frame} \begin{frame} \frametitle{But its impractical..} \begin{itemize} - \item Because we can't always keep running the IPython shell for days - \item And lets admit it, its a pain to go back and edit + \item We can't keep running IPython for days + \item And its a pain to go back and edit \end{itemize} And the solution is..\\ \begin{center} @@ -143,12 +144,12 @@ And the solution is..\\ \end{center} \end{frame} -\section{Creating and running scripts} +\section{Scripts} \begin{frame}[fragile] \frametitle{Python Scripts} \begin{itemize} -\item Let us now put all the commands used in the review problem into a file. -\item The following commands of IPython help us do this. +\item Put all commands used in review problem into a file. +\item use hist command of IPython. \end{itemize} \begin{lstlisting} In []: %hist @@ -169,9 +170,8 @@ And the solution is..\\ \end{frame} \begin{frame}[fragile] -\frametitle{How often do we plot analytical functions?} -Plotting experimental data is done more often and also more useful.\\ -Let us look at a small example: +\frametitle{Why would I plot f(x)?} +How often do we plot analytical functions?\\We plot experimental data more. \begin{lstlisting} In []: x = [0, 1, 2, 3] @@ -183,9 +183,15 @@ Out[]: [<matplotlib.lines.Line2D object at 0xa73aa8c>] \end{frame} \begin{frame}[fragile] +\begin{figure} +\includegraphics[width=3.5in]{data/straightline.png} +\end{figure} +\end{frame} + +\begin{frame}[fragile] \frametitle{Plotting points} \begin{itemize} -\item What if we want to plot points! +\item What if we want to plot the points! \end{itemize} \begin{lstlisting} In []: clf() @@ -211,7 +217,7 @@ Out[]: [<matplotlib.lines.Line2D object at 0xa73aa8c>] \section{Lists} \begin{frame}[fragile] - \frametitle{How to create?} + \frametitle{How to create the data?} What are \typ{x} and \typ{y} here??\\ \begin{center} \alert{\typ{lists!!}} @@ -233,6 +239,9 @@ Out[]: 8 \begin{frame}[fragile] \frametitle{List: Slicing} + \begin{block}{Remember\ldots} + \kwrd{In []: lst = [1,2,3,4,5]} + \end{block} \alert{\typ{list[initial:final:step]}} \begin{lstlisting} In []: lst[1:3] # A slice. @@ -244,7 +253,7 @@ Out[]: [2, 3] \end{frame} \begin{frame}[fragile] - \frametitle{List concatenation and list methods} + \frametitle{List operations} \begin{lstlisting} In []: anthrlst = [6,7,8,9] In []: lnglst = lst + anthrlst @@ -318,7 +327,7 @@ This gives the list \kwrd{TSq} which is the list of squares of T values. \end{frame} \begin{frame}[fragile] -\frametitle{\texttt{for}} +\frametitle{More of \texttt{for}} \begin{itemize} \item Used to iterate over lists \item Let us look at another example. |