presentations/basic-plot.tex
author amit@thunder
Tue, 06 Apr 2010 17:02:41 +0530
changeset 20 571226041e79
child 21 cc33c97ed034
permissions -rw-r--r--
Adding presentations henceforth to be used for presentations for spoken tutorial
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
     1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
     2
%Tutorial slides on Python.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
     3
%
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
     4
% Author: FOSSEE 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
     5
% Copyright (c) 2009, FOSSEE, IIT Bombay
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
     6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
     7
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
     8
\documentclass[14pt,compress]{beamer}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
     9
%\documentclass[draft]{beamer}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    10
%\documentclass[compress,handout]{beamer}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    11
%\usepackage{pgfpages} 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    12
%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    13
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    14
% Modified from: generic-ornate-15min-45min.de.tex
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    15
\mode<presentation>
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    16
{
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    17
  \usetheme{Warsaw}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    18
  \useoutertheme{infolines}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    19
  \setbeamercovered{transparent}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    20
}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    21
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    22
\usepackage[english]{babel}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    23
\usepackage[latin1]{inputenc}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    24
%\usepackage{times}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    25
\usepackage[T1]{fontenc}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    26
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    27
% Taken from Fernando's slides.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    28
\usepackage{ae,aecompl}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    29
\usepackage{mathpazo,courier,euler}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    30
\usepackage[scaled=.95]{helvet}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    31
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    32
\definecolor{darkgreen}{rgb}{0,0.5,0}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    33
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    34
\usepackage{listings}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    35
\lstset{language=Python,
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    36
    basicstyle=\ttfamily\bfseries,
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    37
    commentstyle=\color{red}\itshape,
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    38
  stringstyle=\color{darkgreen},
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    39
  showstringspaces=false,
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    40
  keywordstyle=\color{blue}\bfseries}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    41
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    42
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    43
% Macros
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    44
\setbeamercolor{emphbar}{bg=blue!20, fg=black}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    45
\newcommand{\emphbar}[1]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    46
{\begin{beamercolorbox}[rounded=true]{emphbar} 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    47
      {#1}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    48
 \end{beamercolorbox}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    49
}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    50
\newcounter{time}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    51
\setcounter{time}{0}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    52
\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    53
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    54
\newcommand{\typ}[1]{\lstinline{#1}}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    55
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    56
\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}}  }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    57
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    58
%%% This is from Fernando's setup.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    59
% \usepackage{color}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    60
% \definecolor{orange}{cmyk}{0,0.4,0.8,0.2}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    61
% % Use and configure listings package for nicely formatted code
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    62
% \usepackage{listings}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    63
% \lstset{
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    64
%    language=Python,
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    65
%    basicstyle=\small\ttfamily,
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    66
%    commentstyle=\ttfamily\color{blue},
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    67
%    stringstyle=\ttfamily\color{orange},
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    68
%    showstringspaces=false,
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    69
%    breaklines=true,
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    70
%    postbreak = \space\dots
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    71
% }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    72
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    73
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    74
% Title page
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    75
\title[Basic Plotting]{Python for Scientific Computing : Basic Plotting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    76
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    77
\author[FOSSEE] {FOSSEE}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    78
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    79
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    80
\date{}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    81
%% \date[] {7 November, 2009\\Day 1, Session 1}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    82
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    83
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    84
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    85
%\logo{\pgfuseimage{iitmlogo}}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    86
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    87
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    88
%% Delete this, if you do not want the table of contents to pop up at
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    89
%% the beginning of each subsection:
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    90
%% \AtBeginSubsection[]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    91
%% {
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    92
%%   \begin{frame}<beamer>
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    93
%%     \frametitle{Outline}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    94
%%     \tableofcontents[currentsection,currentsubsection]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    95
%%   \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    96
%% }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    97
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    98
%% \AtBeginSection[]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
    99
%% {
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   100
%%   \begin{frame}<beamer>
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   101
%%     \frametitle{Outline}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   102
%%     \tableofcontents[currentsection,currentsubsection]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   103
%%   \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   104
%% }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   105
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   106
% If you wish to uncover everything in a step-wise fashion, uncomment
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   107
% the following command: 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   108
%\beamerdefaultoverlayspecification{<+->}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   109
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   110
%%\includeonlyframes{current,current1,current2,current3,current4,current5,current6}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   111
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   112
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   113
% DOCUMENT STARTS
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   114
\begin{document}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   115
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   116
\begin{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   117
  \maketitle
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   118
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   119
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   120
%% \begin{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   121
%%   \frametitle{Outline}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   122
%%   \tableofcontents
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   123
%%   % You might wish to add the option [pausesections]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   124
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   125
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   126
%% \begin{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   127
%%   \frametitle{Workshop Schedule: Day 1}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   128
%%   \begin{description}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   129
%% 	\item[Session 1] Sat 09:00--10:00
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   130
%% 	\item[Session 2] Sat 10:05--11:05
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   131
%% 	\item[Session 3] Sat 11:20--12:20
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   132
%% 	\item[Session 4] Sat 12:25--13:25
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   133
%%         \item[Quiz 1] Sat 14:25--14:40
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   134
%%         \item[Session 5] Sat 14:40--15:25
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   135
%%         \item[Session 6] Sat 15:40--16:40
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   136
%%         \item[Quiz 2] Sat 16:45--17:00
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   137
%%   \end{description}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   138
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   139
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   140
%% \begin{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   141
%%   \frametitle{Workshop Schedule: Day 2}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   142
%%   \begin{description}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   143
%% 	\item[Session 1] Sun 09:00--10:00
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   144
%% 	\item[Session 2] Sun 10:05--11:05
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   145
%% 	\item[Session 3] Sun 11:20--12:20
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   146
%% 	\item[Session 4] Sun 12:25--13:25
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   147
%%         \item[Quiz 1] Sun 14:25--14:40
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   148
%%         \item[Session 5] Sun 14:40--15:25
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   149
%%         \item[Session 6] Sun 15:40--16:40
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   150
%%         \item[Quiz 2] Sun 16:45--17:00
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   151
%%   \end{description}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   152
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   153
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   154
\begin{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   155
  \frametitle{About the Workshop}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   156
  \begin{block}{Intended Audience}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   157
  \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   158
       \item Engg., Mathematics and Science teachers.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   159
       \item Interested students from similar streams.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   160
  \end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   161
  \end{block}  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   162
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   163
  \begin{block}{Goal: Successful participants will be able to}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   164
    \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   165
      \item Use Python as a basic Plotting tool.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   166
      \item Understand how to use Python as a scripting and problem solving language.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   167
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   168
    \end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   169
  \end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   170
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   171
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   172
\section{Getting started}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   173
\begin{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   174
\frametitle{Checklist}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   175
   \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   176
    \item IPython
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   177
    \item Pylab
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   178
    %% \item Editor: We recommend scite.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   179
    %% \item Data files: 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   180
    %%   \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   181
    %%   \item \typ{sslc1.txt}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   182
    %%   \item \typ{pendulum.txt}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   183
    %%   \item \typ{points.txt}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   184
    %%   \item \typ{pos.txt}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   185
    %%   \end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   186
    %% \item Python scripts: 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   187
    %%   \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   188
    %%   \item \typ{sslc_allreg.py}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   189
    %%   \item \typ{sslc_science.py}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   190
    %%   \end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   191
    %% \item Images
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   192
    %%   \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   193
    %%   \item \typ{lena.png}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   194
    %%   \item \typ{smoothing.gif}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   195
  \end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   196
  %% \end{enumerate}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   197
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   198
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   199
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   200
\frametitle{Starting up \ldots}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   201
\begin{block}{}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   202
\begin{verbatim}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   203
  $ ipython -pylab  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   204
\end{verbatim}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   205
\end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   206
\begin{lstlisting}     
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   207
  In []: print "Hello, World!"
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   208
  Hello, World!
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   209
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   210
Exiting
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   211
\begin{lstlisting}     
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   212
  In []: ^D(Ctrl-D)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   213
  Do you really want to exit([y]/n)? y
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   214
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   215
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   216
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   217
%% \begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   218
%% \frametitle{Loops}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   219
%% Breaking out of loops
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   220
%% \begin{lstlisting}     
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   221
%%   In []: while True:
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   222
%%     ...:     print "Hello, World!"
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   223
%%     ...:     
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   224
%%   Hello, World!
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   225
%%   Hello, World!^C(Ctrl-C)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   226
%%   ------------------------------------
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   227
%%   KeyboardInterrupt                   
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   228
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   229
%% \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   230
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   231
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   232
\section{Plotting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   233
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   234
\subsection{Drawing plots}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   235
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   236
\frametitle{First Plot}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   237
\begin{columns}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   238
    \column{0.20\textwidth}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   239
    \hspace*{-0.12in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   240
  \includegraphics[height=1.2in, interpolate=true]{data/firstplot}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   241
    \column{0.7\textwidth}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   242
    \begin{block}{}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   243
    \begin{small}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   244
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   245
In []: x=lins<tab>
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   246
In []: x=linspace(
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   247
 ... : (Ctrl-C)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   248
In []: x = linspace(0, 2*pi, 50)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   249
In []: plot(x, sin(x))
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   250
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   251
    \end{small}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   252
    \end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   253
 \begin{block}{Ipython Feature}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   254
    \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   255
      \item Use Tab for auto-suggestions.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   256
      \item In []: (Ctrl-C) to get back In[] prompt from ...
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   257
  \end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   258
  \end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   259
\end{columns}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   260
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   261
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   262
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   263
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   264
\frametitle{Function Documentation}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   265
\begin {block}{}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   266
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   267
In []: linspace?
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   268
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   269
\end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   270
\begin{block}{Ipython Feature}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   271
    \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   272
      \item linspace? , ? mark after a function shows its documentation
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   273
      \item q to exit help  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   274
  \end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   275
  \end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   276
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   277
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   278
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   279
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   280
\frametitle{Walkthrough}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   281
\begin{block}{\typ{x = linspace(start, stop, num)} }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   282
returns \typ{num} evenly spaced points, in the interval [\typ{start}, \typ{stop}].
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   283
\end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   284
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   285
x[0] = start
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   286
x[num - 1] = end
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   287
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   288
\vspace*{.35in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   289
\begin{block}{\typ{plot(x, y)}}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   290
plots \typ{x} and \typ{y} using default line style and color
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   291
\end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   292
%\inctime{10}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   293
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   294
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   295
\subsection{Decoration}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   296
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   297
\frametitle{Adding Labels and title}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   298
\begin{columns}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   299
  \column{0.25\textwidth}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   300
  \hspace*{-0.45in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   301
  \includegraphics[height=2in, interpolate=true]{data/label}  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   302
  \hspace*{0.5in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   303
  \column{0.55\textwidth}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   304
  \begin{block}{}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   305
  \small
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   306
  \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   307
In []: xlabel('x')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   308
In []: ylabel('sin(x)')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   309
In []: title('Sinusoids')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   310
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   311
  \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   312
  \small
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   313
%  \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   314
%\typ{xlabel(s)} sets the label of the \typ{x}-axis to \typ{s}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   315
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   316
%  \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   317
  \end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   318
%\typ{ylabel(s)} sets the label of the \typ{y}-axis to \typ{s}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   319
\end{columns}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   320
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   321
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   322
%% \begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   323
%% \frametitle{Another example}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   324
%%   \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   325
%% In []: clf()
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   326
%%   \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   327
%% \emphbar{Clears the plot area.}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   328
%%   \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   329
%% In []: y = linspace(0, 2*pi, 50)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   330
%% In []: plot(y, sin(2*y))
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   331
%% In []: xlabel('y')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   332
%% In []: ylabel('sin(2y)')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   333
%%   \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   334
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   335
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   336
\subsection{More decoration}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   337
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   338
\frametitle{ Legends}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   339
\vspace*{-0.15in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   340
%  \begin{block}{}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   341
%  \small
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   342
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   343
In []: legend(['sin(x)'])
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   344
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   345
%  \small
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   346
%  \end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   347
  \vspace*{-0.1in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   348
  \begin{center}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   349
  \includegraphics[height=2in, interpolate=true]{data/legend}  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   350
  \end{center}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   351
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   352
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   353
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   354
\frametitle{Legend Placement}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   355
\begin{block}{}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   356
    \small
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   357
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   358
In []: legend(['sin(x)'], loc = 'center')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   359
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   360
\end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   361
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   362
\begin{columns}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   363
    \column{0.6\textwidth}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   364
 \includegraphics[height=1.5in, interpolate=true]{data/position}  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   365
\column{0.35\textwidth}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   366
\vspace{-0.15in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   367
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   368
'best' 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   369
'right'
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   370
'center'
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   371
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   372
\end{columns}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   373
\begin{block}{Ipython Feature}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   374
    \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   375
      \item Use up arrow and down arrow to get old commands .
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   376
  \end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   377
  \end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   378
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   379
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   380
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   381
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   382
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   383
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   384
\frametitle{Annotate a point }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   385
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   386
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   387
In []:annotate('origin', xy = (0, 0))
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   388
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   389
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   390
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   391
\begin{columns}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   392
    \column{0.6\textwidth}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   393
 \includegraphics[height=2in, interpolate=true]{data/annotate}  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   394
\column{0.45\textwidth}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   395
\vspace{-0.2in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   396
%% \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   397
%% 'best' 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   398
%% 'right'
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   399
%% 'center'
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   400
%% \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   401
\end{columns}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   402
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   403
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   404
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   405
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   406
%% \begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   407
%%   \frametitle{For arbitrary location}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   408
%% \vspace*{-0.1in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   409
%% \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   410
%% In []: legend(['sin(2y)'], loc=(.8,.1)) 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   411
%% \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   412
%% \emphbar{Specify south-east corner position}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   413
%% %\vspace*{-0.2in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   414
%% \begin{center}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   415
%%   \includegraphics[height=2in, interpolate=true]{data/loc}  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   416
%% \end{center}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   417
%% %\inctime{10}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   418
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   419
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   420
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   421
\frametitle{Saving \& Closing}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   422
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   423
In []: savefig('sin.png')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   424
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   425
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   426
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   427
%%   \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   428
%% In []: clf()
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   429
%%   \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   430
%% \emphbar{Clears the plot area.}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   431
%%   \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   432
%% In []: y = linspace(0, 2*pi, 50)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   433
%% In []: plot(y, sin(2*y))
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   434
%% In []: xlabel('y')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   435
%% In []: ylabel('sin(2y)')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   436
%%   \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   437
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   438
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   439
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   440
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   441
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   442
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   443
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   444
\section{Multiple plots}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   445
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   446
\frametitle{Overlaid Plots}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   447
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   448
In []: plot(x, cos(x))
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   449
In []: xlabel('x')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   450
In []: ylabel('f(x)')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   451
In []: legend(['sin(x)', 'cos(x)']) 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   452
In []: clf()
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   453
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   454
\emphbar{By default plots would be overlaid!}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   455
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   456
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   457
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   458
\frametitle{Plotting separate figures}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   459
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   460
In []: figure(1)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   461
In []: plot(x, sin(x))
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   462
In []: figure(2)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   463
In []: plot(x, cos(x))
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   464
In []: figure(1)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   465
In []: title('sin(x)')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   466
In []: close()
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   467
In []: close()
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   468
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   469
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   470
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   471
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   472
\frametitle{Showing it better}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   473
\vspace{-0.15in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   474
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   475
In []: plot(x, sin(x), 'g' ,linewidth=2)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   476
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   477
In []: clf()
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   478
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   479
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   480
\vspace*{-0.2in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   481
\begin{center}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   482
  \includegraphics[height=2.2in, interpolate=true]{data/green}  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   483
\end{center}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   484
%\inctime{10}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   485
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   486
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   487
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   488
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   489
\frametitle{Showing it better , Using Dots }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   490
\vspace{-0.15in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   491
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   492
In []: plot(x, sin(x), '.')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   493
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   494
In []: clf()
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   495
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   496
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   497
\vspace*{-0.2in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   498
\begin{center}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   499
  \includegraphics[height=2.2in, interpolate=true]{data/dash}  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   500
\end{center}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   501
%\inctime{10}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   502
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   503
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   504
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   505
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   506
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   507
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   508
%% \begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   509
%% \frametitle{Review Ipython }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   510
%% \vspace{-0.15in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   511
%% \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   512
%% In []: lins<tab>
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   513
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   514
%% In []: function?
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   515
%%      :q 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   516
%% (Ctrl-D)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   517
%% In []: ^C(Ctrl-C)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   518
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   519
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   520
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   521
%% \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   522
%% %\inctime{10}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   523
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   524
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   525
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   526
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   527
\frametitle{Review Ipython Features }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   528
\vspace{-0.1in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   529
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   530
\item Entering Ipython.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   531
\begin{verbatim}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   532
  $ ipython -pylab  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   533
\end{verbatim}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   534
\item Seeing the documentation . 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   535
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   536
In []: linspace?
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   537
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   538
\item Quitting the documentation .
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   539
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   540
:q 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   541
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   542
\item Quitting from the ... prompt.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   543
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   544
Ctrl-C
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   545
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   546
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   547
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   548
\item Quitting Ipython
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   549
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   550
Ctrl-D
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   551
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   552
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   553
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   554
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   555
%\inctime{10}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   556
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   557
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   558
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   559
\frametitle{Review Plotting }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   560
\vspace{-0.15in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   561
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   562
\item Outputting things.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   563
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   564
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   565
In []: print ''hello world'' 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   566
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   567
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   568
\item Create equally spaced points.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   569
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   570
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   571
In []: x=linspace(0,2*pi,50)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   572
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   573
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   574
\item Simple Plotting
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   575
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   576
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   577
In []: plot(x,sin(x),'.',linewidth=2)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   578
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   579
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   580
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   581
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   582
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   583
\frametitle{Review Plotting }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   584
\vspace{-0.1in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   585
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   586
\item   label axis
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   587
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   588
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   589
In []: xlabel('x')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   590
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   591
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   592
\item Title The plot  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   593
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   594
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   595
In []: title('sinusoid')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   596
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   597
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   598
\item Place legend at a proper place
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   599
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   600
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   601
In []: legend(['sin(x)'])
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   602
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   603
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   604
\item Annotate the plot
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   605
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   606
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   607
In []:annotate('origin' , xy=(0,0)) 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   608
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   609
%\inctime{10}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   610
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   611
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   612
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   613
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   614
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   615
\begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   616
\frametitle{Review Plotting }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   617
\vspace{-0.15in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   618
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   619
\item Save a plot
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   620
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   621
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   622
In []:savefig('sine.png')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   623
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   624
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   625
\item Managing multiple plots using figure
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   626
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   627
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   628
In []:figure(1)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   629
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   630
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   631
\item Clearing plot 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   632
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   633
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   634
In []: clf()
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   635
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   636
\begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   637
\item Closing plot 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   638
\end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   639
\begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   640
In []: close()
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   641
\end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   642
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   643
%\inctime{10}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   644
\end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   645
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   646
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   647
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   648
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   649
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   650
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   651
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   652
%% \begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   653
%% \frametitle{Review  , Function and Commands }
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   654
%% \vspace{-0.15in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   655
%% \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   656
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   657
%% In []: print 'hello world'
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   658
%% In []: x=linspace(0,2*pi,50)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   659
%% In []: plot(x, sin(x), 'g',linewidth=2)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   660
%% In []: xlabel('x')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   661
%% In []: ylabel('sin(x)')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   662
%% In []: title('sinusoid')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   663
%% In []: legend(['sin(x)','cos(x)'])
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   664
%% In []: annotate('origin', xy=(0,0))
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   665
%% In []: savefig('sine.png')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   666
%% In []: clf()
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   667
%% In []: figure(1)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   668
%% \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   669
%% %\inctime{10}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   670
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   671
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   672
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   673
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   674
%% \begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   675
%% \frametitle{Annotating}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   676
%% \vspace*{-0.15in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   677
%% \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   678
%% In []: annotate('local max', xy=(1.5, 1))
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   679
%% \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   680
%% \vspace*{-0.2in}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   681
%% \begin{center}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   682
%%   \includegraphics[height=2in, interpolate=true]{data/annotate}  
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   683
%% \end{center}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   684
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   685
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   686
%% \begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   687
%% \frametitle{Axes lengths}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   688
%% \emphbar{Get the axes limits}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   689
%%   \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   690
%% In []: xmin, xmax = xlim() 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   691
%% In []: ymin, ymax = ylim() 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   692
%%   \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   693
%% \emphbar{Set the axes limits}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   694
%%   \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   695
%% In []: xmax = 2*pi
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   696
%% In []: xlim(xmin, xmax) 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   697
%% In []: ylim(ymin-0.2, ymax+0.2) 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   698
%%   \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   699
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   700
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   701
%% \begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   702
%% \frametitle{Review Problem}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   703
%% \begin{enumerate}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   704
%% \item Plot x, -x, sin(x), xsin(x) in range $-5\pi$ to $5\pi$
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   705
%% \item Add a legend
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   706
%% \item Annotate the origin
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   707
%% \item Set axes limits to the range of x
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   708
%% \end{enumerate}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   709
%% \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   710
%% In []: x=linspace(-5*pi, 5*pi, 500)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   711
%% In []: plot(x, x, 'b')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   712
%% In []: plot(x, -x, 'b')
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   713
%% \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   714
%% $\vdots$
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   715
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   716
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   717
%% \begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   718
%% \frametitle{Review Problem \ldots}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   719
%% \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   720
%% In []: plot(x, sin(x), 'g', linewidth=2)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   721
%% In []: plot(x, x*sin(x), 'r', 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   722
%%             linewidth=3)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   723
%% \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   724
%% \begin{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   725
%% In []: legend(['x', '-x', 'sin(x)', 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   726
%%                'xsin(x)'])
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   727
%% In []: annotate('origin', xy = (0, 0))
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   728
%% In []: xlim(-5*pi, 5*pi)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   729
%% In []: ylim(-5*pi, 5*pi)
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   730
%% \end{lstlisting}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   731
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   732
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   733
%% \begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   734
%% \frametitle{Saving Commands}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   735
%% Save commands of review problem into file
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   736
%% \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   737
%% \item Use \typ{\%hist} command of IPython 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   738
%% \item Identify the required line numbers
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   739
%% \item Then, use \typ{\%save} command of IPython
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   740
%% \end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   741
%% \typ{In []: \%hist}\\
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   742
%% \typ{In []: \%save four_plot.py} \alert{\typ{16 18-27}} 
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   743
%% \begin{block}{Careful about errors!}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   744
%%   \kwrd{\%hist} will contain the errors as well,\\
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   745
%%   so be careful while selecting line numbers.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   746
%% \end{block}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   747
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   748
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   749
%% \begin{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   750
%% \frametitle{Python Scripts\ldots}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   751
%%  This is called a Python Script.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   752
%%  \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   753
%%  \item run the script in IPython using \typ{\%run -i four_plot.py}\\
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   754
%%  \end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   755
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   756
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   757
%% \begin{frame}[fragile]
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   758
%%   \frametitle{What did we learn?}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   759
%%   \begin{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   760
%%     \item \kwrd{\%hist}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   761
%%     \item Saving commands to a script
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   762
%%     \item Running a script using \kwrd{\%run -i}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   763
%%     \item Creating simple plots.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   764
%%     \item Adding labels and legends.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   765
%%     \item Annotating plots.
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   766
%%     \item Changing the looks: size, linewidth
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   767
%%   \end{itemize}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   768
%% \end{frame}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   769
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   770
\end{document}
571226041e79 Adding presentations henceforth to be used for presentations for spoken tutorial
amit@thunder
parents:
diff changeset
   771