76 \title[Plotting with Python]{Python for Science and Engg: Plotting experimental data} |
76 \title[Plotting with Python]{Python for Science and Engg: Plotting experimental data} |
77 |
77 |
78 \author[FOSSEE] {FOSSEE} |
78 \author[FOSSEE] {FOSSEE} |
79 |
79 |
80 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} |
80 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} |
81 \date[] {31, October 2009\\Day 1, Session 2} |
81 \date[] {31 October, 2009\\Day 1, Session 2} |
82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
83 |
83 |
84 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo} |
84 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo} |
85 %\logo{\pgfuseimage{iitmlogo}} |
85 %\logo{\pgfuseimage{iitmlogo}} |
86 |
86 |
121 \frametitle{Outline} |
121 \frametitle{Outline} |
122 \tableofcontents |
122 \tableofcontents |
123 % You might wish to add the option [pausesections] |
123 % You might wish to add the option [pausesections] |
124 \end{frame} |
124 \end{frame} |
125 |
125 |
126 \begin{frame} |
|
127 \frametitle{Why we didn't close IPython?} |
|
128 IPython provides a convenient feature to go back, edit, and re-run commands.\\ |
|
129 \alert{But when you close, all this is lost.} |
|
130 \end{frame} |
|
131 |
|
132 \begin{frame} |
|
133 \frametitle{But its impractical..} |
|
134 \begin{itemize} |
|
135 \item We can't keep running IPython for days |
|
136 \item And its a pain to go back and edit |
|
137 \end{itemize} |
|
138 And the solution is..\\ |
|
139 \begin{center} |
|
140 \alert {\typ{Scripts!!}} |
|
141 \end{center} |
|
142 \end{frame} |
|
143 |
|
144 \section{Scripts} |
126 \section{Scripts} |
|
127 |
145 \begin{frame}[fragile] |
128 \begin{frame}[fragile] |
146 \frametitle{Python Scripts} |
129 \frametitle{Python Scripts} |
147 \begin{itemize} |
|
148 \item Put commands used in review problem into file. |
|
149 \item use hist command of IPython. |
|
150 \end{itemize} |
|
151 \begin{lstlisting} |
|
152 In []: %hist |
|
153 In []: %hist -n |
|
154 \end{lstlisting} |
|
155 \end{frame} |
|
156 |
|
157 \begin{frame} |
|
158 \frametitle{Python Scripts\ldots} |
|
159 \begin{itemize} |
130 \begin{itemize} |
160 \item Open a new file in an \alert{editor} |
131 \item four\_plot.py is called a Python Script |
161 \item Copy and paste from the output of \typ{\%hist -n} |
132 \item run the file in IPython using \typ{\%run -i four_plot.py} |
162 \item Save the file as \typ{sine_plot.py} |
|
163 \end{itemize} |
|
164 \begin{itemize} |
|
165 \item run the file in IPython using \typ{\%run -i sine_plot.py}\\ |
|
166 \end{itemize} |
133 \end{itemize} |
167 \end{frame} |
134 \end{frame} |
168 |
135 |
169 \begin{frame}[fragile] |
136 \begin{frame}[fragile] |
170 \frametitle{Why would I plot f(x)?} |
137 \frametitle{Why would I plot f(x)?} |