diff options
author | Shantanu Choudhary | 2009-11-18 12:36:26 +0530 |
---|---|---|
committer | Shantanu Choudhary | 2009-11-18 12:36:26 +0530 |
commit | 1e1f0d55018db777d13ec8a4191a895a70370f37 (patch) | |
tree | d2b3db509ac2ecccc65bfd4b4327ae428db578ab /day1/cheatsheet1.tex | |
parent | bf13c8137cdc1f37cb800a793b81ac1a037bf847 (diff) | |
download | workshops-1e1f0d55018db777d13ec8a4191a895a70370f37.tar.gz workshops-1e1f0d55018db777d13ec8a4191a895a70370f37.tar.bz2 workshops-1e1f0d55018db777d13ec8a4191a895a70370f37.zip |
Added changes for cheat sheet 1.
Diffstat (limited to 'day1/cheatsheet1.tex')
-rwxr-xr-x | day1/cheatsheet1.tex | 23 |
1 files changed, 22 insertions, 1 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)) |