# HG changeset patch # User Puneeth Chaganti # Date 1256276325 -19800 # Node ID 5d0444e9788a09e630a85ac1f543b93194d6a6db # Parent 57e0f0fd3317639afa09ac37613e72270d61d649 Minor edits to Day1 Session1. diff -r 57e0f0fd3317 -r 5d0444e9788a 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)