Minor edits to Day1 Session1.
authorPuneeth Chaganti <punchagan@fossee.in>
Fri, 23 Oct 2009 11:08:45 +0530
changeset 143 5d0444e9788a
parent 142 57e0f0fd3317
child 145 9d815e9e553a
child 147 6874a667dc4e
Minor edits to Day1 Session1.
day1/session1.tex
--- a/day1/session1.tex	Fri Oct 23 10:25:14 2009 +0530
+++ b/day1/session1.tex	Fri Oct 23 11:08:45 2009 +0530
@@ -150,6 +150,9 @@
     ...:     
   Hello, World!
   Hello, World!^C(Ctrl-C)
+  ------------------------------------
+  KeyboardInterrupt                   
+
 \end{lstlisting}
 \end{frame}
 
@@ -159,12 +162,12 @@
     \column{0.25\textwidth}
     \hspace*{-0.5in}
   \includegraphics[height=2in, interpolate=true]{data/firstplot}  
-    \column{0.7\textwidth}
-    \begin{block}{Code}
+    \column{0.8\textwidth}
+    \begin{block}{}
     \small
 \begin{lstlisting}
-In []: x=linspace(0,2*pi,51)
-In []: plot(x,sin(x))
+In []: x = linspace(0, 2*pi, 51)
+In []: plot(x, sin(x))
 \end{lstlisting}
     \small
     \end{block}
@@ -242,9 +245,9 @@
 \frametitle{Changing Legend Placement}
 \vspace*{-0.1in}
 \begin{lstlisting}
-In []: legend(['sin(2y)'], loc=(0.75,0.1)) 
+In []: legend(['sin(2y)'], loc=(.8,.1)) 
 #(x,y) is position of lower-left 
-#corner of legend.
+#corner of legend box.
 \end{lstlisting}
 %\vspace*{-0.2in}
 \begin{center}
@@ -298,11 +301,13 @@
 \frametitle{Multiple Figures}
 \begin{lstlisting}
 In []: figure(1)
-In []: plot(x, sin(x))
+In []: plot(y, sin(y))
 In []: figure(2)
-In []: plot(x, cos(x))
+In []: plot(y, cos(y))
 In []: figure(1)
-In []: title('sin(x)')
+In []: title('sin(y)')
+In []: close()
+In []: close()
 \end{lstlisting}
 \end{frame}
 
@@ -311,14 +316,13 @@
 \vspace{-0.15in}
 \begin{lstlisting}
 In []: plot(y, sin(y), 'g')
-# plots the curve using green color
 
+In []: clf()
 In []: plot(y, sin(y), linewidth=2)
-# sets the linewidth to 2  
 \end{lstlisting}
 \vspace*{-0.2in}
 \begin{center}
-  \includegraphics[height=2in, interpolate=true]{data/green}  
+  \includegraphics[height=2.2in, interpolate=true]{data/green}  
 \end{center}
 \end{frame}
 
@@ -327,8 +331,8 @@
 \vspace*{-0.15in}
 \begin{lstlisting}
 In []: annotate('local max', 
-       xy=(2, 1), 
-       xytext=(3, 1.5),
+       xy=(1.5, 1), 
+       xytext=(2.5, .8),
        arrowprops=dict(
        shrink=0.05),)
 \end{lstlisting}
@@ -345,6 +349,7 @@
 In []: xmin, xmax = xlim() 
 In []: ymin, ymax = ylim() 
 
+In []: xmax = 2*pi
 #Set the axes limits
 In []: xlim(xmin, xmax) 
 In []: ylim(ymin, ymax)