equal
deleted
inserted
replaced
103 \end{lstlisting} |
103 \end{lstlisting} |
104 % sorry Vattam just a joke :P |
104 % sorry Vattam just a joke :P |
105 \section{Self contained python script} |
105 \section{Self contained python script} |
106 Functions like \typ{plot}, \typ{linspace} etc are not inbuilt functions. One have to import them to use them. |
106 Functions like \typ{plot}, \typ{linspace} etc are not inbuilt functions. One have to import them to use them. |
107 \begin{lstlisting} |
107 \begin{lstlisting} |
108 from scipy import linspace, pi, sin |
108 from pylab import linspace, pi, sin |
109 from pylab import plot, legend, annotate |
109 from pylab import plot, legend, annotate |
110 from pylab import xlim, ylim |
110 from pylab import xlim, ylim |
111 |
111 |
112 x = linspace(-5*pi, 5*pi, 500) |
112 x = linspace(-5*pi, 5*pi, 500) |
113 plot(x, x, 'b') |
113 plot(x, x, 'b') |