savefig/slides.tex
author Puneeth Chaganti <punchagan@fossee.in>
Wed, 20 Oct 2010 16:19:55 +0530
changeset 341 9f7eb1ed0e08
parent 290 290f3e62dc44
permissions -rw-r--r--
Merged heads.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
290
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
     1
% Created 2010-10-11 Mon 17:08
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
     2
\documentclass[presentation]{beamer}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
     3
\usepackage[latin1]{inputenc}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
     4
\usepackage[T1]{fontenc}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
     5
\usepackage{fixltx2e}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
     6
\usepackage{graphicx}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
     7
\usepackage{longtable}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
     8
\usepackage{float}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
     9
\usepackage{wrapfig}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    10
\usepackage{soul}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    11
\usepackage{t1enc}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    12
\usepackage{textcomp}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    13
\usepackage{marvosym}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    14
\usepackage{wasysym}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    15
\usepackage{latexsym}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    16
\usepackage{amssymb}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    17
\usepackage{hyperref}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    18
\tolerance=1000
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    19
\usepackage[english]{babel} \usepackage{ae,aecompl}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    20
\usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    21
\usepackage{listings}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    22
\lstset{language=Python, basicstyle=\ttfamily\bfseries,
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    23
commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen},
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    24
showstringspaces=false, keywordstyle=\color{blue}\bfseries}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    25
\providecommand{\alert}[1]{\textbf{#1}}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    26
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    27
\title{Savefig}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    28
\author{FOSSEE}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    29
\date{2010-10-11 Mon}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    30
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    31
\usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    32
\begin{document}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    33
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    34
\maketitle
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    35
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    36
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    37
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    38
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    39
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    40
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    41
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    42
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    43
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    44
\begin{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    45
\frametitle{Outline}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    46
\label{sec-1}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    47
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    48
\begin{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    49
\item Saving plots.
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    50
\item Plotting in different formats.
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    51
\item Locating the file in the file system.
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    52
\end{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    53
\end{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    54
\begin{frame}[fragile]
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    55
\frametitle{Creating a basic plot}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    56
\label{sec-2}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    57
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    58
  Plot a sine wave from -3pi to 3pi.
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    59
\begin{verbatim}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    60
In []: x = linspace(-3*pi,3*pi,100)
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    61
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    62
In []: plot(x, sin(x))
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    63
\end{verbatim}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    64
\end{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    65
\begin{frame}[fragile]
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    66
\frametitle{savefig()}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    67
\label{sec-3}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    68
\begin{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    69
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    70
\item savefig() - to save plots
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    71
\label{sec-3_1}%
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    72
\begin{verbatim}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    73
    syntax: savefig(fname)
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    74
\end{verbatim}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    75
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    76
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    77
\item example
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    78
\label{sec-3_2}%
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    79
\begin{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    80
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    81
\item savefig('/home/fossee/sine.png')
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    82
\label{sec-3_2_1}%
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    83
\begin{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    84
\item file sine.png saved to the folder /home/fossee
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    85
\item .png - file type
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    86
\end{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    87
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    88
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    89
\end{itemize} % ends low level
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    90
\end{itemize} % ends low level
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    91
\end{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    92
\begin{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    93
\frametitle{More on savefig()}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    94
\label{sec-4}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    95
\begin{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    96
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    97
\item Recall
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    98
\label{sec-4_1}%
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
    99
\begin{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   100
\item .png - file type
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   101
\end{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   102
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   103
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   104
\item File types supported
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   105
\label{sec-4_2}%
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   106
\begin{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   107
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   108
\item .pdf - PDF(Portable Document Format)\\
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   109
\label{sec-4_2_1}%
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   110
\item .ps - PS(Post Script)\\
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   111
\label{sec-4_2_2}%
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   112
\item .eps - Encapsulated Post Script\\
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   113
\label{sec-4_2_3}%
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   114
\texttt{to be used with} \LaTeX{} \texttt{documents}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   115
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   116
\item .svg - Scalable Vector Graphics\\
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   117
\label{sec-4_2_4}%
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   118
\texttt{vector graphics}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   119
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   120
\item .png - Portable Network Graphics\\
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   121
\label{sec-4_2_5}%
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   122
\texttt{supports transparency}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   123
\end{itemize} % ends low level
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   124
\end{itemize} % ends low level
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   125
\end{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   126
\begin{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   127
\frametitle{Exercise 1}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   128
\label{sec-5}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   129
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   130
  Save the sine plot in the format EPS which can be embedded in \LaTeX{} documents.
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   131
\end{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   132
\begin{frame}[fragile]
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   133
\frametitle{Solution 1}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   134
\label{sec-6}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   135
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   136
\begin{verbatim}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   137
savefig('/home/fossee/sine.eps')
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   138
\end{verbatim}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   139
\end{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   140
\begin{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   141
\frametitle{Exercise 2}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   142
\label{sec-7}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   143
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   144
  Save the sine plot in PDF, PS and SVG formats.
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   145
\end{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   146
\begin{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   147
\frametitle{Summary}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   148
\label{sec-8}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   149
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   150
  You should now be able to
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   151
\begin{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   152
\item Use \texttt{savefig()} function
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   153
\item Save plots in different formats
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   154
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   155
\begin{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   156
\item PDF
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   157
\item PS
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   158
\item PNG
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   159
\item SVG
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   160
\item EPS
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   161
\end{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   162
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   163
\item Locating the files in file system.
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   164
\end{itemize}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   165
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   166
    
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   167
\end{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   168
\begin{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   169
\frametitle{Thank you!}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   170
\label{sec-9}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   171
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   172
  \begin{block}{}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   173
  \begin{center}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   174
  This spoken tutorial has been produced by the
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   175
  \textcolor{blue}{FOSSEE} team, which is funded by the 
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   176
  \end{center}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   177
  \begin{center}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   178
    \textcolor{blue}{National Mission on Education through \\
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   179
      Information \& Communication Technology \\ 
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   180
      MHRD, Govt. of India}.
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   181
  \end{center}  
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   182
  \end{block}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   183
\end{frame}
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   184
290f3e62dc44 added slides for savefig.
anoop
parents:
diff changeset
   185
\end{document}