day1/session1.tex
author Puneeth Chaganti <punchagan@fossee.in>
Fri, 23 Oct 2009 11:08:45 +0530
changeset 143 5d0444e9788a
parent 141 fccf675946bf
child 147 6874a667dc4e
permissions -rw-r--r--
Minor edits to Day1 Session1.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
141
fccf675946bf Made usage of FOSSEE consistent; removed all instances of Team, Group.
Puneeth Chaganti <punchagan@fossee.in>
parents: 140
diff changeset
     2
%Tutorial slides on Python.
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     3
%
141
fccf675946bf Made usage of FOSSEE consistent; removed all instances of Team, Group.
Puneeth Chaganti <punchagan@fossee.in>
parents: 140
diff changeset
     4
% Author: FOSSEE 
fccf675946bf Made usage of FOSSEE consistent; removed all instances of Team, Group.
Puneeth Chaganti <punchagan@fossee.in>
parents: 140
diff changeset
     5
% Copyright (c) 2009, FOSSEE, IIT Bombay
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     7
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     8
\documentclass[14pt,compress]{beamer}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     9
%\documentclass[draft]{beamer}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    10
%\documentclass[compress,handout]{beamer}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    11
%\usepackage{pgfpages} 
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    12
%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    13
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    14
% Modified from: generic-ornate-15min-45min.de.tex
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    15
\mode<presentation>
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    16
{
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    17
  \usetheme{Warsaw}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    18
  \useoutertheme{split}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    19
  \setbeamercovered{transparent}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    20
}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    21
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    22
\usepackage[english]{babel}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    23
\usepackage[latin1]{inputenc}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    24
%\usepackage{times}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    25
\usepackage[T1]{fontenc}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    26
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    27
% Taken from Fernando's slides.
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    28
\usepackage{ae,aecompl}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    29
\usepackage{mathpazo,courier,euler}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    30
\usepackage[scaled=.95]{helvet}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    31
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    32
\definecolor{darkgreen}{rgb}{0,0.5,0}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    33
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    34
\usepackage{listings}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    35
\lstset{language=Python,
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    36
    basicstyle=\ttfamily\bfseries,
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    37
    commentstyle=\color{red}\itshape,
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    38
  stringstyle=\color{darkgreen},
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    39
  showstringspaces=false,
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    40
  keywordstyle=\color{blue}\bfseries}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    41
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    42
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    43
% Macros
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    44
\setbeamercolor{emphbar}{bg=blue!20, fg=black}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    45
\newcommand{\emphbar}[1]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    46
{\begin{beamercolorbox}[rounded=true]{emphbar} 
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    47
      {#1}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    48
 \end{beamercolorbox}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    49
}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    50
\newcounter{time}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    51
\setcounter{time}{0}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    52
\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    53
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    54
\newcommand{\typ}[1]{\lstinline{#1}}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    55
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    56
\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}}  }
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    57
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    58
%%% This is from Fernando's setup.
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    59
% \usepackage{color}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    60
% \definecolor{orange}{cmyk}{0,0.4,0.8,0.2}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    61
% % Use and configure listings package for nicely formatted code
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    62
% \usepackage{listings}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    63
% \lstset{
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    64
%    language=Python,
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    65
%    basicstyle=\small\ttfamily,
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    66
%    commentstyle=\ttfamily\color{blue},
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    67
%    stringstyle=\ttfamily\color{orange},
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    68
%    showstringspaces=false,
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    69
%    breaklines=true,
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    70
%    postbreak = \space\dots
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    71
% }
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    72
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    73
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    74
% Title page
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    75
\title[]{Interactive Plotting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    76
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    77
\author[FOSSEE] {FOSSEE}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    78
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    79
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
130
8905a5badd7e Minor edits to day1 session2.
Puneeth Chaganti <punchagan@fossee.in>
parents: 129
diff changeset
    80
\date[] {31, October 2009\\Day 1, Session 1}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    81
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    82
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    83
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    84
%\logo{\pgfuseimage{iitmlogo}}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    85
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    86
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    87
%% Delete this, if you do not want the table of contents to pop up at
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    88
%% the beginning of each subsection:
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    89
\AtBeginSubsection[]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    90
{
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    91
  \begin{frame}<beamer>
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    92
    \frametitle{Outline}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    93
    \tableofcontents[currentsection,currentsubsection]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    94
  \end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    95
}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    96
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    97
\AtBeginSection[]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    98
{
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    99
  \begin{frame}<beamer>
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   100
    \frametitle{Outline}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   101
    \tableofcontents[currentsection,currentsubsection]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   102
  \end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   103
}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   104
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   105
% If you wish to uncover everything in a step-wise fashion, uncomment
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   106
% the following command: 
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   107
%\beamerdefaultoverlayspecification{<+->}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   108
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   109
%\includeonlyframes{current,current1,current2,current3,current4,current5,current6}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   110
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   111
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   112
% DOCUMENT STARTS
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   113
\begin{document}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   114
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   115
\begin{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   116
  \maketitle
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   117
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   118
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   119
%% \begin{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   120
%%   \frametitle{Outline}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   121
%%   \tableofcontents
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   122
%%   % You might wish to add the option [pausesections]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   123
%% \end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   124
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   125
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   126
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   127
\frametitle{Starting up...}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   128
\begin{block}{}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   129
\begin{verbatim}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   130
  $ ipython -pylab  
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   131
\end{verbatim}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   132
\end{block}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   133
\begin{lstlisting}     
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   134
  In []: print "Hello, World!"
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   135
  Hello, World!
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   136
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   137
Exiting
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   138
\begin{lstlisting}     
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   139
  In []: ^D(Ctrl-D)
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   140
  Do you really want to exit([y]/n)? y
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   141
\end{lstlisting}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   142
\end{frame}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   143
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   144
\begin{frame}[fragile]
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   145
\frametitle{Loops}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   146
Breaking out of loops
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   147
\begin{lstlisting}     
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   148
  In []: while True:
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   149
    ...:     print "Hello, World!"
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   150
    ...:     
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   151
  Hello, World!
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   152
  Hello, World!^C(Ctrl-C)
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   153
  ------------------------------------
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   154
  KeyboardInterrupt                   
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   155
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   156
\end{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   157
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   158
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   159
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   160
\frametitle{First Plot}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   161
\begin{columns}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   162
    \column{0.25\textwidth}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   163
    \hspace*{-0.5in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   164
  \includegraphics[height=2in, interpolate=true]{data/firstplot}  
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   165
    \column{0.8\textwidth}
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   166
    \begin{block}{}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   167
    \small
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   168
\begin{lstlisting}
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   169
In []: x = linspace(0, 2*pi, 51)
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   170
In []: plot(x, sin(x))
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   171
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   172
    \small
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   173
    \end{block}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   174
\end{columns}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   175
\end{frame}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   176
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   177
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   178
\begin{frame}[fragile]
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   179
\frametitle{Walkthrough}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   180
\begin{block}{\typ{linspace(start, stop, num)} }
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   181
returns \typ{num} evenly spaced points, in the interval [\typ{start}, \typ{stop}].
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   182
\end{block}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   183
\vspace*{.5in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   184
\begin{block}{\typ{plot(x, y)}}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   185
plots \typ{x} and \typ{y} using default line style and color
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   186
\end{block}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   187
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   188
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   189
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   190
\frametitle{Adding Labels}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   191
\begin{columns}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   192
  \column{0.25\textwidth}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   193
  \hspace*{-0.45in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   194
  \includegraphics[height=2in, interpolate=true]{data/label}  
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   195
  \hspace*{0.5in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   196
  \column{0.55\textwidth}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   197
  \begin{block}{}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   198
  \small
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   199
  \begin{lstlisting}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   200
In []: xlabel('x')
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   201
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   202
In []: ylabel('sin(x)')
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   203
  \end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   204
  \small
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   205
%  \end{lstlisting}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   206
%\typ{xlabel(s)} sets the label of the \typ{x}-axis to \typ{s}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   207
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   208
%  \begin{lstlisting}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   209
  \end{block}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   210
%\typ{ylabel(s)} sets the label of the \typ{y}-axis to \typ{s}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   211
\end{columns}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   212
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   213
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   214
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   215
\frametitle{Another example}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   216
  \begin{lstlisting}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   217
In []: clf()
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   218
In []: y = linspace(0, 2*pi, 51)
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   219
In []: plot(y, sin(2*y))
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   220
In []: xlabel('y')
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   221
In []: ylabel('sin(2y)')
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   222
  \end{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   223
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   224
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   225
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   226
\frametitle{Title and Legends}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   227
\vspace*{-0.15in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   228
%  \begin{block}{}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   229
%  \small
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   230
\begin{lstlisting}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   231
In []: title('Sinusoids')
129
d3aae4b05e99 Minor edits to day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 113
diff changeset
   232
#Sets the title of the figure
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   233
In []: legend(['sin(2y)'])
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   234
# When no label, or to change
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   235
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   236
%  \small
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   237
%  \end{block}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   238
  \vspace*{-0.1in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   239
  \begin{center}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   240
  \includegraphics[height=2in, interpolate=true]{data/legend}  
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   241
  \end{center}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   242
\end{frame}
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   243
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   244
\begin{frame}[fragile]
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   245
\frametitle{Changing Legend Placement}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   246
\vspace*{-0.1in}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   247
\begin{lstlisting}
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   248
In []: legend(['sin(2y)'], loc=(.8,.1)) 
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   249
#(x,y) is position of lower-left 
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   250
#corner of legend box.
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   251
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   252
%\vspace*{-0.2in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   253
\begin{center}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   254
  \includegraphics[height=2in, interpolate=true]{data/loc}  
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   255
\end{center}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   256
\end{frame}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   257
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   258
\begin{frame}[fragile]
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   259
\frametitle{Changing Legend Placement}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   260
\begin{columns}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   261
    \column{0.6\textwidth}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   262
\begin{block}{}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   263
    \small
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   264
\begin{lstlisting}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   265
In []: legend(['sin(2y)'], 
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   266
         loc='right')
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   267
\end{lstlisting}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   268
    \small
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   269
\end{block}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   270
\column{0.45\textwidth}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   271
\vspace{-0.2in}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   272
\begin{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   273
Location String   
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   274
===============   
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   275
'best'            
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   276
'upper right'     
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   277
'upper left'      
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   278
'lower left'      
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   279
'lower right'     
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   280
'right'           
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   281
'center left'     
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   282
'center right'    
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   283
'lower center'    
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   284
'upper center'    
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   285
'center'          
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   286
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   287
\end{columns}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   288
\end{frame}
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   289
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   290
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   291
\begin{frame}[fragile]
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   292
\frametitle{Saving \& Closing}
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   293
\begin{lstlisting}
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   294
In []: savefig('sin.png')
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   295
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   296
In []: close()
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   297
\end{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   298
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   299
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   300
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   301
\frametitle{Multiple Figures}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   302
\begin{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   303
In []: figure(1)
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   304
In []: plot(y, sin(y))
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   305
In []: figure(2)
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   306
In []: plot(y, cos(y))
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   307
In []: figure(1)
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   308
In []: title('sin(y)')
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   309
In []: close()
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   310
In []: close()
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   311
\end{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   312
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   313
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   314
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   315
\frametitle{Showing it better}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   316
\vspace{-0.15in}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   317
\begin{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   318
In []: plot(y, sin(y), 'g')
129
d3aae4b05e99 Minor edits to day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 113
diff changeset
   319
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   320
In []: clf()
129
d3aae4b05e99 Minor edits to day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 113
diff changeset
   321
In []: plot(y, sin(y), linewidth=2)
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   322
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   323
\vspace*{-0.2in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   324
\begin{center}
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   325
  \includegraphics[height=2.2in, interpolate=true]{data/green}  
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   326
\end{center}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   327
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   328
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   329
\begin{frame}[fragile]
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   330
\frametitle{Annotating}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   331
\vspace*{-0.15in}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   332
\begin{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   333
In []: annotate('local max', 
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   334
       xy=(1.5, 1), 
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   335
       xytext=(2.5, .8),
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   336
       arrowprops=dict(
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   337
       shrink=0.05),)
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   338
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   339
\vspace*{-0.2in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   340
\begin{center}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   341
  \includegraphics[height=2in, interpolate=true]{data/annotate}  
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   342
\end{center}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   343
\end{frame}
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   344
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   345
\begin{frame}[fragile]
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   346
\frametitle{Axes lengths}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   347
  \begin{lstlisting}
129
d3aae4b05e99 Minor edits to day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 113
diff changeset
   348
#Get the axes limits
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   349
In []: xmin, xmax = xlim() 
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   350
In []: ymin, ymax = ylim() 
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   351
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   352
In []: xmax = 2*pi
129
d3aae4b05e99 Minor edits to day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 113
diff changeset
   353
#Set the axes limits
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   354
In []: xlim(xmin, xmax) 
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   355
In []: ylim(ymin, ymax) 
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   356
  \end{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   357
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   358
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   359
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   360
  \begin{center}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   361
  End of Session-1\\
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   362
  \alert{Don't Close \typ{IPython}}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   363
  \end{center}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   364
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   365
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   366
\end{document}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   367