diff options
author | Anoop Jacob Thomas | 2010-12-18 12:54:49 +0530 |
---|---|---|
committer | Anoop Jacob Thomas | 2010-12-18 12:54:49 +0530 |
commit | 8237dcc199da39222a5ad230506a67612c8f42bb (patch) | |
tree | 10d36ba208a172cd9415c92b7f76adc1b432f020 | |
parent | 9ef42a846bf92217dcca5aa3ae084e6dc9470b82 (diff) | |
download | st-scripts-8237dcc199da39222a5ad230506a67612c8f42bb.tar.gz st-scripts-8237dcc199da39222a5ad230506a67612c8f42bb.tar.bz2 st-scripts-8237dcc199da39222a5ad230506a67612c8f42bb.zip |
Made some changes to the script embellishing a plot, but it still needs changes.
-rw-r--r-- | embellishing_a_plot/script.rst | 18 | ||||
-rw-r--r-- | embellishing_a_plot/slides.tex | 38 | ||||
-rw-r--r-- | getting_started_with_ipython/slides.tex | 13 |
3 files changed, 32 insertions, 37 deletions
diff --git a/embellishing_a_plot/script.rst b/embellishing_a_plot/script.rst index 4269022..2ccdba6 100644 --- a/embellishing_a_plot/script.rst +++ b/embellishing_a_plot/script.rst @@ -67,12 +67,14 @@ arguments to the plot command. .. #[[Anoop: I think it will be good to rephrase the sentence]] .. #[madhu: Why "you" here? Shouldn't this be "we" as decided? Also I added "the default" check the diff] + The additional argument that we shall be passing in here now is the colour argument. We shall first clear the figure and plot the same in red colour. Hence .. #[Madhu: Note the diff for changes] - :: + +:: clf() plot(x, sin(x), 'r') @@ -81,9 +83,8 @@ As we can see we have the same plot but now in red colour. .. #[Madhu: diff again] -To alter the thickness of the line, we use the ``linewidth`` argument in the plot -command. Hence -:: +To alter the thickness of the line, we use the ``linewidth`` argument +in the plot command. Hence :: plot(x, cos(x), linewidth=2) @@ -96,7 +97,7 @@ thickness 2. {{{ Show the plot and compare the sine and cos plots }}} -{{{ Pause here and try out the following exercises }}} +Pause here and try out the following exercises, .. #[[Anoop: is the above a context switch for the person who does the recording, other wise if it an instruction to the person viewing @@ -153,7 +154,7 @@ Other available options can be seen in the documentation of plot. .. #[Madhu: The script needs to tell what needs to be shown or explained.] -{{{ Pause here and try out the following exercises }}} +Pause here and try out the following exercises .. #[[Anoop: same question as above, should it be read out?]] @@ -244,8 +245,9 @@ The solution is to enclose the whole string in between $. Hence, :: title("Parabolic function $-x^2+4x-5$") -#[[Bhanu: Dollar sign should enclose only the math-expression. change -made.]] + +.. #[[Bhanu: Dollar sign should enclose only the math-expression. change + made.]] gives a title that looks neatly formatted. diff --git a/embellishing_a_plot/slides.tex b/embellishing_a_plot/slides.tex index 30b69cc..e71645b 100644 --- a/embellishing_a_plot/slides.tex +++ b/embellishing_a_plot/slides.tex @@ -1,4 +1,4 @@ -% Created 2010-10-10 Sun 17:32 +% Created 2010-12-18 Sat 12:25 \documentclass[presentation]{beamer} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} @@ -8,6 +8,7 @@ \usepackage{float} \usepackage{wrapfig} \usepackage{soul} +\usepackage{t1enc} \usepackage{textcomp} \usepackage{marvosym} \usepackage{wasysym} @@ -62,11 +63,10 @@ showstringspaces=false, keywordstyle=\color{blue}\bfseries} \frametitle{Solution 1} \label{sec-3} -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} In []: clf() In []: plot(x, sin(x), 'b', linewidth=3) -\end{lstlisting} +\end{verbatim} \end{frame} \begin{frame} \frametitle{Question 2} @@ -78,11 +78,10 @@ In []: plot(x, sin(x), 'b', linewidth=3) \frametitle{Solution 2} \label{sec-5} -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} In []: clf() In []: plot(x, cos(x), 'go') -\end{lstlisting} +\end{verbatim} \end{frame} \begin{frame} \frametitle{Question 3} @@ -94,11 +93,10 @@ In []: plot(x, cos(x), 'go') \frametitle{Solution 3} \label{sec-7} -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} In []: clf() In []: plot(x, cos(x), 'r--') -\end{lstlisting} +\end{verbatim} \end{frame} \begin{frame} \frametitle{Question 4} @@ -111,10 +109,9 @@ In []: plot(x, cos(x), 'r--') \frametitle{Solution 4} \label{sec-9} -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} In []: title("$Parabolic function -x^2+4x-5$") -\end{lstlisting} +\end{verbatim} \end{frame} \begin{frame} \frametitle{Question 5} @@ -126,11 +123,10 @@ In []: title("$Parabolic function -x^2+4x-5$") \frametitle{Solution 5} \label{sec-11} -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} In []: xlabel("$x$") In []: yalbel("$f(x)$") -\end{lstlisting} +\end{verbatim} \end{frame} \begin{frame} \frametitle{Question 6} @@ -143,10 +139,9 @@ In []: yalbel("$f(x)$") \frametitle{Solution 6} \label{sec-13} -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} In []: annotate("root", xy=(-4,0)) -\end{lstlisting} +\end{verbatim} \end{frame} \begin{frame} \frametitle{Question 7} @@ -159,11 +154,10 @@ In []: annotate("root", xy=(-4,0)) \frametitle{Solution 7} \label{sec-15} -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} In []: xlim(-1, 3) In []: ylim(-15, 0) -\end{lstlisting} +\end{verbatim} \end{frame} \begin{frame} \frametitle{Summary} diff --git a/getting_started_with_ipython/slides.tex b/getting_started_with_ipython/slides.tex index 310db35..9cf2655 100644 --- a/getting_started_with_ipython/slides.tex +++ b/getting_started_with_ipython/slides.tex @@ -1,4 +1,4 @@ -% Created 2010-11-05 Fri 20:59 +% Created 2010-12-18 Sat 12:23 \documentclass[presentation]{beamer} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} @@ -8,6 +8,7 @@ \usepackage{float} \usepackage{wrapfig} \usepackage{soul} +\usepackage{t1enc} \usepackage{textcomp} \usepackage{marvosym} \usepackage{wasysym} @@ -84,8 +85,7 @@ showstringspaces=false, keywordstyle=\color{blue}\bfseries} \label{sec-6} Check the output of -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} round(2.48) round(2.48, 1) round(2.48, 2) @@ -93,7 +93,7 @@ round(2.48, 2) round(2.484) round(2.484, 1) round(2.484, 2) -\end{lstlisting} +\end{verbatim} Look-up the documentation of \texttt{round} and see how to use it. \end{frame} \begin{frame} @@ -114,13 +114,12 @@ round(2.484, 2) \frametitle{Solution 4} \label{sec-9} -\lstset{language=Python} -\begin{lstlisting} +\begin{verbatim} round(2.484 ^C round(2.484, 2) -\end{lstlisting} +\end{verbatim} \end{frame} \begin{frame} \frametitle{Summary} |