day1/cheatsheet1.tex
changeset 340 347ff2714deb
parent 328 4075482a9770
child 341 7ae88b9da553
equal deleted inserted replaced
329:0a6ab1d81491 340:347ff2714deb
    42 \typ{linspace} returns array of length \typ{num}, for which \typ{x[0] = start} and \typ{x[num-1] = stop} \\
    42 \typ{linspace} returns array of length \typ{num}, for which \typ{x[0] = start} and \typ{x[num-1] = stop} \\
    43 \emph{Please note indices of array starts from zero(0)}
    43 \emph{Please note indices of array starts from zero(0)}
    44 
    44 
    45 \subsection{plot}
    45 \subsection{plot}
    46 \typ{In []: plot(X, Y)}\\
    46 \typ{In []: plot(X, Y)}\\
    47 For given arrays of equal length(above case X and Y), \typ{plot} plots the correspoding *x* and *y* pairs taken from X and Y.
    47 For given arrays of equal length(above case X and Y), \typ{plot} plots the corresponding *x* and *y* pairs taken from X and Y.
    48 
    48 
    49 \subsection{Colors of plots}
    49 \subsection{Colors of plots}
    50 \typ{In []: plot(y, sin(y), 'g')}\\
    50 \typ{In []: plot(y, sin(y), 'g')}\\
    51 Plots graph with green color. Other options available are:
    51 Plots graph with green color. Other options available are:
    52 \begin{lstlisting}
    52 \begin{lstlisting}
    76 \end{lstlisting}  
    76 \end{lstlisting}  
    77 Same way one can have TeX expression on xlabel, ylabel etc.
    77 Same way one can have TeX expression on xlabel, ylabel etc.
    78 
    78 
    79 \subsection{legends}
    79 \subsection{legends}
    80 \typ{In []: legend('sin(x)',loc=center)} \\
    80 \typ{In []: legend('sin(x)',loc=center)} \\
    81 Placec a legend on the current plot at location *loc*.\\
    81 Places a legend on the current plot at location *loc*.\\
    82 Apart from \typ{center}, some other \typ{loc} which can be specified are:
    82 Apart from \typ{center}, some other \typ{loc} which can be specified are:
    83 \begin{lstlisting}
    83 \begin{lstlisting}
    84 'best'
    84 'best'
    85 'right'
    85 'right'
    86 'upper right'
    86 'upper right'