summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPuneeth Chaganti2009-10-03 19:47:43 +0530
committerPuneeth Chaganti2009-10-03 19:47:43 +0530
commita1cc0c35f553e75216e8774cb92ab6ba352ee7a2 (patch)
tree9be8645309579a5ec1803e3de522e251dccb8c96
parent0d6f10283f5fb928df306a428980c73832c063ec (diff)
parentf091abf11af72b135dd4f127dbe18e670ad7d223 (diff)
downloadworkshops-more-scipy-a1cc0c35f553e75216e8774cb92ab6ba352ee7a2.tar.gz
workshops-more-scipy-a1cc0c35f553e75216e8774cb92ab6ba352ee7a2.tar.bz2
workshops-more-scipy-a1cc0c35f553e75216e8774cb92ab6ba352ee7a2.zip
Merged Heads.
-rw-r--r--day2/session1.tex65
1 files changed, 30 insertions, 35 deletions
diff --git a/day2/session1.tex b/day2/session1.tex
index 75cfee1..b36b3c2 100644
--- a/day2/session1.tex
+++ b/day2/session1.tex
@@ -222,7 +222,7 @@ array([10,11,12,-1])
exp(x), sqrt(x)} etc.
\item \typ{sum(x, axis=0), product(x, axis=0), dot(a, bp)} \inctime{10}
\end{itemize}
-
+ \inctime{10}
\end{frame}
\subsection{Array Creation \& Slicing, Striding Arrays}
@@ -331,7 +331,7 @@ array([[ 0.96276665, 0.77174861],
\subsection{Plots - Lines, Labels and Legends}
\begin{frame}[fragile]
- \frametitle{Basic plotting \ldots}
+ \frametitle{Basic plotting}
\begin{lstlisting}
# Set properties of objects:
>>> l, = plot(x, sin(x))
@@ -346,21 +346,28 @@ array([[ 0.96276665, 0.77174861],
\end{frame}
\begin{frame}[fragile]
- \frametitle{Multiple figures}
-
+ \frametitle{Working with text \ldots}
+%\begin{itemize}
+% \item We already saw LaTeX markup support!
+%\end{itemize}
\begin{lstlisting}
->>> figure(1)
->>> plot(x, sin(x))
->>> figure(2)
->>> plot(x, tanh(x))
->>> figure(1)
->>> title('Easy as 1,2,3')
+>>> w = arange(-2,2,.1)
+>>> plot(w,exp(-(w*w))*cos)
+>>> ylabel('$f(\omega)$')
+>>> xlabel('$\omega$')
+>>> title(r"$f(\omega)=e^{-\omega^2}
+ cos({\omega^2})$")
+>>> annotate('maxima',xy=(0, 1),
+ xytext=(1, 0.8),
+ arrowprops=dict(
+ facecolor='black',
+ shrink=0.05))
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
- \frametitle{Legends and Annotation}
+ \frametitle{Legends}
\begin{lstlisting}
>>> plot(x, cos(5*x), 'r--',
label='cosine')
@@ -375,30 +382,18 @@ array([[ 0.96276665, 0.77174861],
\end{frame}
\begin{frame}[fragile]
- \frametitle{More commands \ldots}
- \begin{lstlisting}
-# semilog, loglog
->>> x = 10.**(-arange(100)*0.1)
->>> semilogx(x, x)
->>> semilogy(x, x)
->>> loglog(x, x)
->>> loglog(x, x*x)
- \end{lstlisting}
-\end{frame}
+ \frametitle{Multiple figures}
+
+\begin{lstlisting}
+>>> figure(1)
+>>> plot(x, sin(x))
+>>> figure(2)
+>>> plot(x, tanh(x))
+>>> figure(1)
+>>> title('Easy as 1,2,3')
+\end{lstlisting}
+
-\begin{frame}[fragile]
- \frametitle{More plots \ldots}
- \begin{lstlisting}
->>> clf()
->>> t = arange(0.1, 4, 0.1)
->>> s = exp(-t)
->>> e = 0.1*abs(randn(len(s)))
->>> errorbar(t, s, e)
-# Scatter plots
->>> clf()
->>> t = randn(len(e))
->>> scatter(t, e, c=s)
- \end{lstlisting}
\end{frame}
\begin{frame}[fragile]
@@ -703,7 +698,7 @@ title('triangular head; scale '\
\end{frame}
\begin{frame}[fragile] \frametitle{Maps}
- \includegraphics[height=2.5in, interpolate=true]{data/plotmap}
+ \includegraphics[height=2.3in, interpolate=true]{data/plotmap}
\begin{center}
\tiny
For details see \url{http://matplotlib.sourceforge.net/screenshots/plotmap.py}