diff options
author | Puneeth Chaganti | 2009-10-23 11:08:45 +0530 |
---|---|---|
committer | Puneeth Chaganti | 2009-10-23 11:08:45 +0530 |
commit | 99116fc300db484c24df43b26227baf215fbb880 (patch) | |
tree | f678f81e45c869a135e1167fde7b1be703efab5f /day1/session1.tex | |
parent | 4c937a4fbbb056933caf441925dd4887dd2e481f (diff) | |
download | workshops-99116fc300db484c24df43b26227baf215fbb880.tar.gz workshops-99116fc300db484c24df43b26227baf215fbb880.tar.bz2 workshops-99116fc300db484c24df43b26227baf215fbb880.zip |
Minor edits to Day1 Session1.
Diffstat (limited to 'day1/session1.tex')
-rw-r--r-- | day1/session1.tex | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/day1/session1.tex b/day1/session1.tex index af07d99..880e8b2 100644 --- a/day1/session1.tex +++ b/day1/session1.tex @@ -150,6 +150,9 @@ Breaking out of loops ...: Hello, World! Hello, World!^C(Ctrl-C) + ------------------------------------ + KeyboardInterrupt + \end{lstlisting} \end{frame} @@ -159,12 +162,12 @@ Breaking out of loops \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 @@ In []: legend(['sin(2y)']) \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 @@ In []: close() \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 @@ In []: title('sin(x)') \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 @@ In []: plot(y, sin(y), linewidth=2) \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 []: annotate('local max', In []: xmin, xmax = xlim() In []: ymin, ymax = ylim() +In []: xmax = 2*pi #Set the axes limits In []: xlim(xmin, xmax) In []: ylim(ymin, ymax) |