summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantosh G. Vattam2009-11-18 17:07:43 +0530
committerSantosh G. Vattam2009-11-18 17:07:43 +0530
commit0d06b2fe83cb7d719cfeef46fa33bfc446b3a8a8 (patch)
tree14a2b214c9cb2ba74103ef5059c23cfa6158343f
parent2c48562f2b03419f7309e954cc99d25f97fa76ed (diff)
parentb47083c76bb254636b4f1734fc684250029bcfd1 (diff)
downloadworkshops-more-scipy-0d06b2fe83cb7d719cfeef46fa33bfc446b3a8a8.tar.gz
workshops-more-scipy-0d06b2fe83cb7d719cfeef46fa33bfc446b3a8a8.tar.bz2
workshops-more-scipy-0d06b2fe83cb7d719cfeef46fa33bfc446b3a8a8.zip
Branches merged.
-rwxr-xr-xday1/cheatsheet1.tex23
-rw-r--r--day1/session1.tex26
2 files changed, 35 insertions, 14 deletions
diff --git a/day1/cheatsheet1.tex b/day1/cheatsheet1.tex
index 26edf77..42b46b1 100755
--- a/day1/cheatsheet1.tex
+++ b/day1/cheatsheet1.tex
@@ -33,10 +33,31 @@ Exiting
\begin{lstlisting}
In [2]: (Ctrl-D)^D
Do you really want to exit ([y]/n)? y
-\end{lstlisting}
+\end{lstlisting} %$
\section{Plotting}
+\subsection{Label}
+Pylab accepts TeX equation expressions in any text expression. To get something like:\\
+$\sigma_i=15$ \\
+on title of figure use:
+\begin{lstlisting}
+ title('$\sigma_i=15$')
+\end{lstlisting}
+Same way one can have TeX expression on xlabel, ylabel etc.
+
+\subsection{legends}
+Apart from using \kwrd{loc='center'} for positioning the legend, one can also mention explicit co-ordinates for placement.
+\begin{lstlisting}
+In []: legend(['sin(2y)'], loc=(.8,.1))
+\end{lstlisting}
+\typ{loc = 0, 1} (left top position of graph)\\
+\typ{loc = 0.5, 0.5} (center of graph).
+
+%\subsection{Multiple figures}
+
+\subsection{Saving figures}
+One can save figure in any of these formats: png, pdf, ps, eps and svg.
\begin{lstlisting}
In [1]: x = linspace(0, 2*pi, 50)
In [2]: plot(x, sin(x))
diff --git a/day1/session1.tex b/day1/session1.tex
index 61cc0d7..26ec8e1 100644
--- a/day1/session1.tex
+++ b/day1/session1.tex
@@ -353,19 +353,19 @@ In []: legend(['sin(2y)'], loc = 'center')
\end{columns}
\end{frame}
-\begin{frame}[fragile]
- \frametitle{For arbitrary location}
-\vspace*{-0.1in}
-\begin{lstlisting}
-In []: legend(['sin(2y)'], loc=(.8,.1))
-\end{lstlisting}
-\emphbar{Specify south-east corner position}
-%\vspace*{-0.2in}
-\begin{center}
- \includegraphics[height=2in, interpolate=true]{data/loc}
-\end{center}
-%\inctime{10}
-\end{frame}
+%% \begin{frame}[fragile]
+%% \frametitle{For arbitrary location}
+%% \vspace*{-0.1in}
+%% \begin{lstlisting}
+%% In []: legend(['sin(2y)'], loc=(.8,.1))
+%% \end{lstlisting}
+%% \emphbar{Specify south-east corner position}
+%% %\vspace*{-0.2in}
+%% \begin{center}
+%% \includegraphics[height=2in, interpolate=true]{data/loc}
+%% \end{center}
+%% %\inctime{10}
+%% \end{frame}
\begin{frame}[fragile]
\frametitle{Saving \& Closing}