diff -r ea8570f660b8 -r 647239f95c4a day1/cheatsheet1.tex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/day1/cheatsheet1.tex Tue Oct 13 13:03:11 2009 +0530 @@ -0,0 +1,55 @@ +\documentclass[12pt]{article} +\title{Interactive Plotting} +\author{FOSSEE} +\begin{document} +\maketitle + +\section{Starting up...} +\begin{verbatim} + $ ipython -pylab +\end{verbatim} +Exiting Ipython +\begin{verbatim} + In [1]: print "Hello, World!" + In [2]: ^D + Do you really want to exit ([y]/n)? y +\end{verbatim} +Breaking out of loops +\begin{verbatim} + In [1]: while True: + ...: print "Hello, World!" + ...: + Hello, World! + Hello, World!^C +\end{verbatim} + +\section{First Plot} +\begin{verbatim} + In [2]: x=linspace(0, 2*pi, 50) + + In [3]: plot(x,sin(x)) + Out[3]: [] +\end{verbatim} + +\section{Labeling} +\begin{verbatim} + In [4]: xlabel('x') + + In [5]: ylabel('sin(x)') +\end{verbatim} + +\section{Another example} +\begin{verbatim} +In [6]: clf() + +In [7]: y = linspace(0,10,101) + +In [8]: plot(y, exp(-y)) + +In [9]: xlabel('y') + +In [10]: ylabel(r'$e^{-y}$') +\end{verbatim} + +\end{document} +