day1/session1.tex
author Santosh G. Vattam <vattam.santosh@gmail.com>
Fri, 06 Nov 2009 17:51:40 +0530
changeset 290 10528e3073ef
parent 286 ac457f7d1702
child 293 f7d7b5565232
permissions -rw-r--r--
Changed the schedule in session 1 slides and updated session 2 slides.
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}
239
8953675dc056 Added slide numbers.
Puneeth Chaganti <punchagan@fossee.in>
parents: 225
diff changeset
    18
  \useoutertheme{infolines}
107
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}
279
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 265
diff changeset
    52
\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
107
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
180
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
    75
\title[Interactive Plotting]{Python for Science and Engg: Interactive Plotting}
107
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}
286
ac457f7d1702 Changed dates in day1 slides.
Puneeth Chaganti <punchagan@fossee.in>
parents: 280
diff changeset
    80
\date[] {7 November, 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
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   109
%%\includeonlyframes{current,current1,current2,current3,current4,current5,current6}
107
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
215
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   125
\begin{frame}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   126
  \frametitle{Workshop Schedule: Day 1}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   127
  \begin{description}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   128
	\item[Session 1] Sat 09:00--10:00
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   129
	\item[Session 2] Sat 10:05--11:05
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   130
	\item[Session 3] Sat 11:20--12:20
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   131
	\item[Session 4] Sat 12:25--13:25
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   132
        \item[Quiz 1] Sat 14:25--14:40
290
10528e3073ef Changed the schedule in session 1 slides and updated session 2 slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 286
diff changeset
   133
        \item[Session 5] Sat 14:40--15:25
10528e3073ef Changed the schedule in session 1 slides and updated session 2 slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 286
diff changeset
   134
        \item[Session 6] Sat 15:40--16:40
10528e3073ef Changed the schedule in session 1 slides and updated session 2 slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 286
diff changeset
   135
        \item[Quiz 2] Sat 16:45--17:00
215
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   136
  \end{description}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   137
\end{frame}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   138
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   139
\begin{frame}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   140
  \frametitle{Workshop Schedule: Day 2}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   141
  \begin{description}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   142
	\item[Session 1] Sun 09:00--10:00
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   143
	\item[Session 2] Sun 10:05--11:05
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   144
	\item[Session 3] Sun 11:20--12:20
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   145
	\item[Session 4] Sun 12:25--13:25
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   146
        \item[Quiz 1] Sun 14:25--14:40
290
10528e3073ef Changed the schedule in session 1 slides and updated session 2 slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 286
diff changeset
   147
        \item[Session 5] Sun 14:40--15:25
10528e3073ef Changed the schedule in session 1 slides and updated session 2 slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 286
diff changeset
   148
        \item[Session 6] Sun 15:40--16:40
10528e3073ef Changed the schedule in session 1 slides and updated session 2 slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 286
diff changeset
   149
        \item[Quiz 2] Sun 16:45--17:00
215
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   150
  \end{description}
220
15306dad3b81 Corrections to day1 Session1, day2 Session 3 and 4.
Shantanu <shantanu@fossee.in>
parents: 215
diff changeset
   151
\end{frame}
215
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   152
220
15306dad3b81 Corrections to day1 Session1, day2 Session 3 and 4.
Shantanu <shantanu@fossee.in>
parents: 215
diff changeset
   153
\begin{frame}
15306dad3b81 Corrections to day1 Session1, day2 Session 3 and 4.
Shantanu <shantanu@fossee.in>
parents: 215
diff changeset
   154
  \frametitle{About the Workshop}
215
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   155
  \begin{block}{Intended Audience}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   156
  \begin{itemize}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   157
       \item Engg., Mathematics and Science teachers.
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   158
       \item Interested students from similar streams.
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   159
  \end{itemize}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   160
  \end{block}  
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   161
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   162
  \begin{block}{Goal: Successful participants will be able to}
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   163
    \begin{itemize}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   164
      \item Use Python as plotting, computational tool
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   165
      \item Understand how Python can be used as a scripting and problem solving language.
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   166
      \item Train students for the same
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   167
    \end{itemize}
215
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   168
  \end{block}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   169
\end{frame}
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   170
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   171
\section{Getting started}
220
15306dad3b81 Corrections to day1 Session1, day2 Session 3 and 4.
Shantanu <shantanu@fossee.in>
parents: 215
diff changeset
   172
\begin{frame}
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   173
\frametitle{Checklist}
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   174
  \begin{enumerate}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   175
    \item IPython
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   176
    \item Editor: We recommend scite.
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   177
    \item Data files: 
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   178
      \begin{itemize}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   179
      \item \typ{sslc1.txt}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   180
      \item \typ{pendulum.txt}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   181
      \item \typ{points.txt}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   182
      \item \typ{pos.txt}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   183
      \end{itemize}
265
ac31e2f3754e Changes to session1, 5 and 6 at Goa.
Puneeth Chaganti <punchagan@fossee.in>
parents: 264
diff changeset
   184
    \item Python scripts: 
ac31e2f3754e Changes to session1, 5 and 6 at Goa.
Puneeth Chaganti <punchagan@fossee.in>
parents: 264
diff changeset
   185
      \begin{itemize}
ac31e2f3754e Changes to session1, 5 and 6 at Goa.
Puneeth Chaganti <punchagan@fossee.in>
parents: 264
diff changeset
   186
      \item \typ{sslc_allreg.py}
ac31e2f3754e Changes to session1, 5 and 6 at Goa.
Puneeth Chaganti <punchagan@fossee.in>
parents: 264
diff changeset
   187
      \item \typ{sslc_science.py}
ac31e2f3754e Changes to session1, 5 and 6 at Goa.
Puneeth Chaganti <punchagan@fossee.in>
parents: 264
diff changeset
   188
      \end{itemize}
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   189
  \end{enumerate}
215
b69d0bdb136c Session details,session 1 Day 1, 3Dploting->session3.
Shantanu <shantanu@fossee.in>
parents: 184
diff changeset
   190
\end{frame}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   191
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   192
\begin{frame}[fragile]
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   193
\frametitle{Starting up \ldots}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   194
\begin{block}{}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   195
\begin{verbatim}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   196
  $ ipython -pylab  
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   197
\end{verbatim}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   198
\end{block}
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 []: print "Hello, World!"
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   201
  Hello, World!
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   202
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   203
Exiting
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   204
\begin{lstlisting}     
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   205
  In []: ^D(Ctrl-D)
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   206
  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
   207
\end{lstlisting}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   208
\end{frame}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   209
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   210
%% \begin{frame}[fragile]
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   211
%% \frametitle{Loops}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   212
%% Breaking out of loops
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   213
%% \begin{lstlisting}     
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   214
%%   In []: while True:
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   215
%%     ...:     print "Hello, World!"
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   216
%%     ...:     
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   217
%%   Hello, World!
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   218
%%   Hello, World!^C(Ctrl-C)
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   219
%%   ------------------------------------
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   220
%%   KeyboardInterrupt                   
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   221
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   222
%% \end{lstlisting}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   223
%% \end{frame}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   224
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   225
\section{Plotting}
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   226
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   227
\subsection{Drawing plots}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   228
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   229
\frametitle{First Plot}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   230
\begin{columns}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   231
    \column{0.25\textwidth}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   232
    \hspace*{-0.5in}
184
9efa777af2e2 Reworked on Session 3 day 1 slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 182
diff changeset
   233
  \includegraphics[height=2in, interpolate=true]{data/firstplot}
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   234
    \column{0.8\textwidth}
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   235
    \begin{block}{}
224
668f88f20218 Added differentiation example.
Puneeth Chaganti <punchagan@fossee.in>
parents: 184
diff changeset
   236
    \begin{small}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   237
\begin{lstlisting}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   238
In []: x = linspace(0, 2*pi, 50)
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   239
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
   240
\end{lstlisting}
224
668f88f20218 Added differentiation example.
Puneeth Chaganti <punchagan@fossee.in>
parents: 184
diff changeset
   241
    \end{small}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   242
    \end{block}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   243
\end{columns}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   244
\end{frame}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   245
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   246
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   247
\begin{frame}[fragile]
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   248
\frametitle{Walkthrough}
180
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   249
\begin{block}{\typ{x = linspace(start, stop, num)} }
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   250
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
   251
\end{block}
180
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   252
\begin{lstlisting}
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   253
x[0] = start
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   254
x[num - 1] = end
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   255
\end{lstlisting}
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   256
\vspace*{.35in}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   257
\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
   258
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
   259
\end{block}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   260
%\inctime{10}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   261
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   262
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   263
\subsection{Decoration}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   264
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   265
\frametitle{Adding Labels}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   266
\begin{columns}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   267
  \column{0.25\textwidth}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   268
  \hspace*{-0.45in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   269
  \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
   270
  \hspace*{0.5in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   271
  \column{0.55\textwidth}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   272
  \begin{block}{}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   273
  \small
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   274
  \begin{lstlisting}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   275
In []: xlabel('x')
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   276
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   277
In []: ylabel('sin(x)')
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   278
  \end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   279
  \small
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   280
%  \end{lstlisting}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   281
%\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
   282
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   283
%  \begin{lstlisting}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   284
  \end{block}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   285
%\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
   286
\end{columns}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   287
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   288
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   289
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   290
\frametitle{Another example}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   291
  \begin{lstlisting}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   292
In []: clf()
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   293
#Clears the plot area.
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   294
In []: y = linspace(0, 2*pi, 50)
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   295
In []: plot(y, sin(2*y))
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   296
In []: xlabel('y')
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   297
In []: ylabel('sin(2y)')
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   298
  \end{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   299
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   300
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   301
\subsection{More decoration}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   302
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   303
\frametitle{Title and Legends}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   304
\vspace*{-0.15in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   305
%  \begin{block}{}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   306
%  \small
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   307
\begin{lstlisting}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   308
In []: title('Sinusoids')
129
d3aae4b05e99 Minor edits to day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 113
diff changeset
   309
#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
   310
In []: legend(['sin(2y)'])
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   311
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   312
%  \small
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   313
%  \end{block}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   314
  \vspace*{-0.1in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   315
  \begin{center}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   316
  \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
   317
  \end{center}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   318
\end{frame}
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   319
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   320
\begin{frame}[fragile]
180
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   321
\frametitle{Legend Placement}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   322
\begin{block}{}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   323
    \small
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   324
\begin{lstlisting}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   325
In []: legend(['sin(2y)'], loc = 'center')
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   326
\end{lstlisting}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   327
\end{block}
180
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   328
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   329
\begin{columns}
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   330
    \column{0.6\textwidth}
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   331
 \includegraphics[height=2in, interpolate=true]{data/position}  
180
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   332
\begin{lstlisting}
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   333
'best', 'right', 'center'
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   334
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   335
\column{0.45\textwidth}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   336
\vspace{-0.2in}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   337
\begin{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   338
'upper right'     
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   339
'upper left'      
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   340
'lower left'      
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   341
'lower right'     
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   342
'center left'     
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   343
'center right'    
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   344
'lower center'    
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   345
'upper center'    
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   346
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   347
\end{columns}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   348
\end{frame}
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   349
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   350
\begin{frame}[fragile]
180
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   351
  \frametitle{For arbitrary location}
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   352
\vspace*{-0.1in}
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   353
\begin{lstlisting}
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   354
In []: legend(['sin(2y)'], loc=(.8,.1)) 
180
e442b9e23972 Made English and low level id changes to session1.tex
rivermaker@RivermakerMBP.local
parents: 171
diff changeset
   355
# Specify south-east corner position
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   356
\end{lstlisting}
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   357
%\vspace*{-0.2in}
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   358
\begin{center}
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   359
  \includegraphics[height=2in, interpolate=true]{data/loc}  
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   360
\end{center}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   361
%\inctime{10}
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   362
\end{frame}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   363
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   364
\begin{frame}[fragile]
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   365
\frametitle{Saving \& Closing}
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   366
\begin{lstlisting}
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   367
In []: savefig('sin.png')
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   368
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   369
In []: close()
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   370
\end{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   371
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   372
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   373
\section{Multiple plots}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   374
\begin{frame}[fragile]
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   375
\frametitle{Overlaid Plots}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   376
\begin{lstlisting}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   377
In []: clf()
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   378
In []: plot(y, sin(y))
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   379
In []: plot(y, cos(y))
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   380
In []: xlabel('y')
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   381
In []: ylabel('f(y)')
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   382
In []: legend(['sin(y)', 'cos(y)']) 
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   383
\end{lstlisting}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   384
\emphbar{By default plots would be overlaid!}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   385
\end{frame}
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   386
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   387
\begin{frame}[fragile]
182
56ea84dfe38e Fixed typo
rivermaker@RivermakerMBP.local
parents: 180
diff changeset
   388
\frametitle{Plotting separate figures}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   389
\begin{lstlisting}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   390
In []: clf()
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   391
In []: figure(1)
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   392
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
   393
In []: figure(2)
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   394
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
   395
In []: figure(1)
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   396
In []: title('sin(y)')
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   397
In []: close()
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   398
In []: close()
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   399
\end{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   400
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   401
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   402
\begin{frame}[fragile]
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   403
\frametitle{Showing it better}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   404
\vspace{-0.15in}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   405
\begin{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   406
In []: plot(y, sin(y), 'g')
129
d3aae4b05e99 Minor edits to day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 113
diff changeset
   407
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   408
In []: clf()
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   409
In []: plot(y, sin(y), 'g', linewidth=2)
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   410
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   411
\vspace*{-0.2in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   412
\begin{center}
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   413
  \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
   414
\end{center}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   415
%\inctime{10}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   416
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   417
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   418
\begin{frame}[fragile]
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   419
\frametitle{Annotating}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   420
\vspace*{-0.15in}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   421
\begin{lstlisting}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   422
In []: annotate('local max', xy=(1.5, 1))
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   423
\end{lstlisting}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   424
\vspace*{-0.2in}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   425
\begin{center}
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   426
  \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
   427
\end{center}
110
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   428
\end{frame}
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   429
220ac08e67b5 Added Legend placement and Annotating.
Puneeth Chaganti <punchagan@fossee.in>
parents: 107
diff changeset
   430
\begin{frame}[fragile]
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   431
\frametitle{Axes lengths}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   432
  \begin{lstlisting}
129
d3aae4b05e99 Minor edits to day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 113
diff changeset
   433
#Get the axes limits
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   434
In []: xmin, xmax = xlim() 
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   435
In []: ymin, ymax = ylim() 
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   436
143
5d0444e9788a Minor edits to Day1 Session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 141
diff changeset
   437
In []: xmax = 2*pi
129
d3aae4b05e99 Minor edits to day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 113
diff changeset
   438
#Set the axes limits
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   439
In []: xlim(xmin, xmax) 
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   440
In []: ylim(ymin-0.2, ymax+0.2) 
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   441
  \end{lstlisting}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   442
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   443
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   444
\begin{frame}[fragile]
147
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   445
\frametitle{Review Problem}
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   446
\begin{enumerate}
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   447
\item Plot x, -x, sin(x), xsin(x) in range $-5\pi$ to $5\pi$
147
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   448
\item Add a legend
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   449
\item Annotate the origin
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   450
\item Set axis limits to the range of x
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   451
\end{enumerate}
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   452
\begin{lstlisting}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   453
In []: x=linspace(-5*pi, 5*pi, 500)
147
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   454
In []: plot(x, x, 'b')
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   455
In []: plot(x, -x, 'b')
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   456
\end{lstlisting}
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   457
$\vdots$
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   458
\end{frame}
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   459
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   460
\begin{frame}[fragile]
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   461
\frametitle{Review Problem \ldots}
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   462
\begin{lstlisting}
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   463
In []: plot(x, sin(x), 'g', linewidth=2)
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   464
In []: plot(x, x*sin(x), 'r', 
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   465
            linewidth=3)
147
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   466
\end{lstlisting}
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   467
\begin{lstlisting}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   468
In []: legend(['x', '-x', 'sin(x)', 
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   469
               'xsin(x)'])
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   470
In []: annotate('origin', xy = (0, 0))
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   471
In []: xlim(-5*pi, 5*pi)
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   472
In []: ylim(-5*pi, 5*pi)
147
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   473
\end{lstlisting}
6874a667dc4e Added review at end of session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 143
diff changeset
   474
\end{frame}
264
c3a1de5b8216 Updated day1 session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 247
diff changeset
   475
280
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   476
\begin{frame}[fragile]
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   477
\frametitle{Saving Commands}
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   478
Save commands of review problem into file
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   479
\begin{itemize}
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   480
\item Use \typ{\%hist} command of IPython 
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   481
\item Identify the required line numbers
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   482
\item Then, use \typ{\%save} command of IPython
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   483
\end{itemize}
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   484
\begin{lstlisting}
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   485
  In []: %hist
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   486
  In []: %save four_plot.py 16 18-27
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   487
\end{lstlisting}
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   488
\end{frame}
9bed85f05eb8 Added save command in session1.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   489
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   490
\begin{frame}
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   491
  \frametitle{What did we learn?}
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   492
  \begin{itemize}
246
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   493
    \item Creating simple plots.
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   494
    \item Adding labels and legends.
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   495
    \item Annotating plots.
d054581ef4b1 Made changes to Goals and added outline slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 225
diff changeset
   496
    \item Changing the looks: size, linewidth
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 147
diff changeset
   497
  \end{itemize}
107
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   498
\end{frame}
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   499
647239f95c4a Added rough draft of slides and cheatsheet for Interactive Plotting.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
   500
\end{document}
140
fe6a38572a65 Added changes suggested by PR for session 1 day 1.
Shantanu <shantanu@fossee.in>
parents: 138
diff changeset
   501