summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embellishing_a_plot/script.rst14
-rw-r--r--embellishing_a_plot/slides.org14
-rw-r--r--embellishing_a_plot/slides.tex61
-rw-r--r--getting_started_with_ipython/script.rst13
-rw-r--r--using_plot_interactively/script.rst64
-rw-r--r--using_plot_interactively/slides.org13
-rw-r--r--using_plot_interactively/slides.tex34
7 files changed, 132 insertions, 81 deletions
diff --git a/embellishing_a_plot/script.rst b/embellishing_a_plot/script.rst
index 2f1c4fd..4fa6168 100644
--- a/embellishing_a_plot/script.rst
+++ b/embellishing_a_plot/script.rst
@@ -31,7 +31,7 @@ team along with the logo of MHRD }}}
.. R1
-Welcome to the tutorial on Embellishing Plots.
+Welcome to the tutorial on "Embellishing a Plot".
.. L2
@@ -49,15 +49,21 @@ At the end of this tutorial, you will be able to,
.. R3
+Before beginning this tutorial,we would suggest you to complete the
+tutorial on "Using plot interactively".
+
Let us start ipython with pylab loaded, open the terminal and type
+.. L3
+
+{{{ Show slide with pre-requisite }}}
+
+{{{ open the terminal and type ipython -pylab }}}
::
ipython -pylab
-.. L3
-{{{ open the terminal and type ipython -pylab }}}
.. R4
@@ -548,6 +554,6 @@ thickness 3,we use the ``linspace`` and ``plot`` command as,
.. R44
-Hope you have enjoyed and found it useful.
+Hope you have enjoyed this tutorial and found it useful.
Thank you!
diff --git a/embellishing_a_plot/slides.org b/embellishing_a_plot/slides.org
index 78890b2..7f01e2a 100644
--- a/embellishing_a_plot/slides.org
+++ b/embellishing_a_plot/slides.org
@@ -53,6 +53,8 @@
- Label x and y axes.
- Add annotations to the plot.
- Set and Get the limits of axes.
+* Pre-requisite
+ - Spoken tutorial on "Using plot interactively"
* Question 1
Plot sin(x) in blue colour alongwith linewidth as 3
* Question 2
@@ -72,12 +74,12 @@
rectangle (-1, -15) and (3, 0)
* Summary
In this tutorial,we have learnt to-
- + Modify the attributes of plot by passing additional arguments
- + Add title
- + Incorporate LaTeX style formatting
- + Label x and y axes
- + Add annotations
- + Set the limits of axes
+ + Modify the attributes of plot by passing additional arguments.
+ + Add title to a plot using 'title' command.
+ + Incorporate LaTeX style formatting by adding a $ sign before and after the part of the string.
+ + Label x and y axes using 'xlabel()' and 'ylabel()' commands.
+ + Add annotations to a plot using annotate() command.
+ + Set the limits of axes using 'xlim()' and 'ylim()' commands.
* Evaluation
1. Draw a plot of cosine graph between -2pi to 2pi with line thickness 4.
diff --git a/embellishing_a_plot/slides.tex b/embellishing_a_plot/slides.tex
index b8e83d1..4504d1c 100644
--- a/embellishing_a_plot/slides.tex
+++ b/embellishing_a_plot/slides.tex
@@ -1,4 +1,4 @@
-% Created 2011-05-06 Fri 12:24
+% Created 2011-05-18 Wed 16:31
\documentclass[presentation]{beamer}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
@@ -43,14 +43,18 @@ showstringspaces=false, keywordstyle=\color{blue}\bfseries}
\begin{frame}
\begin{center}
-\textcolor{blue}{Embellishing a Plot}
+\vspace{12pt}
+\textcolor{blue}{\huge Embellishing a Plot}
\end{center}
+\vspace{18pt}
\begin{center}
-\includegraphics[scale=0.25]{../images/iitb-logo.png}\\
-Developed by FOSSEE Team, IIT-Bombay. \\
-Funded by National Mission on Education through ICT
-
-MHRD, Govt. of India
+\vspace{10pt}
+\includegraphics[scale=0.95]{../images/fossee-logo.png}\\
+\vspace{5pt}
+\scriptsize Developed by FOSSEE Team, IIT-Bombay. \\
+\scriptsize Funded by National Mission on Education through ICT\\
+\scriptsize MHRD,Govt. of India\\
+\includegraphics[scale=0.30]{../images/iitb-logo.png}\\
\end{center}
\end{frame}
\begin{frame}
@@ -68,68 +72,77 @@ MHRD, Govt. of India
\end{itemize}
\end{frame}
\begin{frame}
-\frametitle{Question 1}
+\frametitle{Pre-requisite}
\label{sec-3}
+
+\begin{itemize}
+\item Spoken tutorial on ``Using plot interactively''
+\end{itemize}
+\end{frame}
+\begin{frame}
+\frametitle{Question 1}
+\label{sec-4}
+
Plot sin(x) in blue colour alongwith linewidth as 3
\end{frame}
\begin{frame}
\frametitle{Question 2}
-\label{sec-4}
+\label{sec-5}
Plot the sine curve with green filled circles.
\end{frame}
\begin{frame}
\frametitle{Question 3}
-\label{sec-5}
+\label{sec-6}
Plot the curve of x vs tan(x) in red dashed line and linewidth 3
\end{frame}
\begin{frame}
\frametitle{Question 4}
-\label{sec-6}
+\label{sec-7}
Change the title of the figure such that the whole title is
formatted in LaTex style
\end{frame}
\begin{frame}
\frametitle{Question 5}
-\label{sec-7}
+\label{sec-8}
Set the x and y labels as ``x'' and ``f(x)'' in LaTex style.
\end{frame}
\begin{frame}
\frametitle{Question 6}
-\label{sec-8}
+\label{sec-9}
Make an annotation called ``root'' at the point (-4, 0). What happens
to the first annotation?
\end{frame}
\begin{frame}
\frametitle{Question 7}
-\label{sec-9}
+\label{sec-10}
Set the limits of axes such that the area of interest is the
rectangle (-1, -15) and (3, 0)
\end{frame}
\begin{frame}
\frametitle{Summary}
-\label{sec-10}
+\label{sec-11}
In this tutorial,we have learnt to-
\begin{itemize}
-\item Modify the attributes of plot by passing additional arguments
-\item Add title
-\item Incorporate \LaTeX{} style formatting
-\item Label x and y axes
-\item Add annotations
-\item Set the limits of axes
+\item Modify the attributes of plot by passing additional arguments.
+\item Add title to a plot using `title' command.
+\item Incorporate \LaTeX{} style formatting by adding a \$ sign before and after the part of the string.
+\item Label x and y axes using `xlabel()' and `ylabel()' commands.
+\item Add annotations to a plot using annotate() command.
+\item Set the limits of axes using `xlim()' and `ylim()' commands.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Evaluation}
-\label{sec-11}
+\label{sec-12}
\begin{enumerate}
@@ -145,7 +158,7 @@ MHRD, Govt. of India
\end{frame}
\begin{frame}
\frametitle{Solutions}
-\label{sec-12}
+\label{sec-13}
\begin{enumerate}
@@ -156,8 +169,6 @@ MHRD, Govt. of India
\end{enumerate}
\end{frame}
\begin{frame}
-\frametitle{Acknowledgement}
-\label{sec-13}
\begin{block}{}
\begin{center}
diff --git a/getting_started_with_ipython/script.rst b/getting_started_with_ipython/script.rst
index 5cf7b88..058a879 100644
--- a/getting_started_with_ipython/script.rst
+++ b/getting_started_with_ipython/script.rst
@@ -155,7 +155,7 @@ Type
::
- 'print'
+ print
{{{Hit enter}}}
{{{Point at the Out[] prompt}}}
@@ -243,9 +243,9 @@ the commands starting with a.
Now, let's see what the functions abs is used for. We will use the
help features of ipython to find out this. To see the documentation
-of a function, type the function name followed by a question mark, and
-hit enter. Ipython interpreter will show the documentation for the
-function. Lets us see the documentation of the function abs, type
+of a function, type the function name followed by a question mark.
+Ipython interpreter will show the documentation for the
+function. Let us see the documentation of the function abs, type
abs? and press enter
.. L18
@@ -269,6 +269,8 @@ returns it's absolute value.
lets see few examples,
+Type abs(-19) and abs(19) on the interpreter.
+
We get 19, as expected, in both the cases.
.. R20
@@ -357,6 +359,7 @@ and hit enter, without closing the parenthesis.
.. L26
+{{{ switch to terminal }}}
::
round(2.484
@@ -476,5 +479,5 @@ And the answers,
.. R34
-Hope you have enjoyed and found it useful.
+Hope you have enjoyed this tutorial and found it useful.
Thank you!
diff --git a/using_plot_interactively/script.rst b/using_plot_interactively/script.rst
index fb9e0ef..73ff5df 100644
--- a/using_plot_interactively/script.rst
+++ b/using_plot_interactively/script.rst
@@ -59,7 +59,8 @@ ipython -pylab and hit enter.
Pylab is a python library which provides plotting functionality.It
provides many other important mathematical and scientific
functions. After running IPython -pylab in the shell you will see some
-information about ipython and pylab followed by the In[1] prompt.But if you get an error like ::
+information about ipython and pylab followed by the In[1] prompt.
+But if you get an error like ::
`ERROR: matplotlib could NOT be imported! Starting normal
IPython.`
@@ -95,7 +96,8 @@ As you can see a sequence of numbers from 1 to 100 appears.
.. R7
-Now lets try to generate 200 points between 0 and 1,we do that by typing linspace(0,1,200).
+Now lets try to generate 200 points between 0 and 1,we do that by typing
+linspace(0,1,200).
.. L7
@@ -130,7 +132,8 @@ If we now type ``len(p)``we will get the no. of points.
.. R10
-Let's try and plot a cosine curve between -pi and pi.For this we use the plot command.
+Let's try and plot a cosine curve between -pi and pi.
+For this we use the plot command.
Here cos(p) gets the cosine value at every point
corresponding to point p.
@@ -164,8 +167,10 @@ Now to clear the plot ,we use the ``clf()`` function
.. R13
-This is done because if we wish to make another plot,it will overlap the previous plot.
-As we do not wish to clutter the area with overlaid plots , we just clear it with clf().
+This is done because if we wish to make another plot,
+it will overlap the previous plot.
+As we do not wish to clutter the area with overlaid plots ,
+we just clear it with clf().
Now lets try a sine plot.
.. L13
@@ -176,7 +181,8 @@ Now lets try a sine plot.
.. R14
-We can study the plot better on the plot window by using the various options available on it.Let us have a look at these options.
+We can study the plot better on the plot window by using the
+various options available on it.Let us have a look at these options.
.. L14
@@ -184,7 +190,8 @@ We can study the plot better on the plot window by using the various options ava
.. R15
-As we can observe, moving the mouse pointer along the plot gives us the location of each point on the plot
+As we can observe, moving the mouse pointer along the plot gives us
+the location of each point on the plot
.. L15
@@ -192,11 +199,12 @@ As we can observe, moving the mouse pointer along the plot gives us the location
.. R16
-To the bottom left of the window,there are a few buttons.The right most among them is
-for saving the file.
+To the bottom left of the window,there are a few buttons.
+The right most among them is for saving the file.
Just click on it and type the file name. We will save the plot
-by the name `sin_curve` in pdf format.As you can see we can specify the format
-of file from the dropdown.Formats like png ,eps ,pdf, ps are available.
+by the name `sin_curve` in pdf format.
+As you can see we can specify the format of file from the dropdown.
+Formats like png ,eps ,pdf, ps are available.
.. L16
@@ -204,7 +212,8 @@ of file from the dropdown.Formats like png ,eps ,pdf, ps are available.
.. R17
-Left to the save button is the slider button by which we can specify the margins.
+Left to the save button is the slider button by which we can
+specify the margins.
.. L17
@@ -216,8 +225,8 @@ Left to the save button is the slider button by which we can specify the margins
.. R18
-Left to this is the zoom button by which we can zoom into the plot. Just specify the
-region to zoom into.
+Left to this is the zoom button by which we can zoom into the plot.
+Just specify the region to zoom into.
.. L19
@@ -233,9 +242,9 @@ The button to the left of it can be used to move the axes of the plot.
.. R20
-The next two buttons with left and right arrow icons change the state of the
-plot and take it to the previous state it was in. It more or less acts like the
-back and forward button in a browser.
+The next two buttons with left and right arrow icons change the
+state of the plot and take it to the previous state it was in.
+It more or less acts like the back and forward button in a browser.
.. L21
@@ -268,11 +277,13 @@ Pause the video here, try out the following exercise and resume the video.
Let's revise quickly what we have learnt today
1. To Start Ipython with pylab.
- #. To Use the linspace function to create `num` equally spaced points in a region.
+ #. To Use the linspace function to create `num` equally spaced points
+ in a region.
#. To Find the length of sequences using len function.
#. To Plot mathematical functions using plot.
#. To Clear drawing area using clf.
- #. To Use the UI of plot for studying it better and using functionalities like save,zoom and moving the plots on x and y axis.
+ #. To Use the UI of plot for studying it better and using functionalities
+ like save,zoom and moving the plots on x and y axis.
.. L24
@@ -284,9 +295,12 @@ Let's revise quickly what we have learnt today
2. What will the command ''linspace(-pi,pi,100)'' do.
- returns 100 evenly spaced samples from -pi to pi
- - returns 100 evenly spaced samples from -pi to pi excluding pi but including -pi
- - returns 100 evenly spaced samples from -pi to pi excluding -pi but including pi
- - returns 100 evenly spaced samples from -pi to pi including both -pi and pi
+ - returns 100 evenly spaced samples from -pi to pi excluding pi but
+ including -pi
+ - returns 100 evenly spaced samples from -pi to pi excluding -pi but
+ including pi
+ - returns 100 evenly spaced samples from -pi to pi including both -pi
+ and pi
3. How do you find the length of a sequence?
@@ -298,9 +312,11 @@ Let's revise quickly what we have learnt today
And the answers,
-1. We use the command `linspace(-pi/2,pi/2,100)` to create 100 eually spaced lines between the points -pi/2 and pi/2.
+1. We use the command `linspace(-pi/2,pi/2,100)` to create 100 eually spaced
+ lines between the points -pi/2 and pi/2.
-2. The command ''linspace(-pi,pi,100)'' will return 100 evenly spaced samples from -pi to pi including both -pi and pi.
+2. The command ''linspace(-pi,pi,100)'' will return 100 evenly spaced samples
+ from -pi to pi including both -pi and pi.
3. `len(sequence_name)` is the function used to find out the length of a sequence.
diff --git a/using_plot_interactively/slides.org b/using_plot_interactively/slides.org
index 2d02d13..0d32b59 100644
--- a/using_plot_interactively/slides.org
+++ b/using_plot_interactively/slides.org
@@ -66,7 +66,7 @@
- Back and Forward Button
- Home
-* Question1
+* Question 1
Plot (sin(x)*sin(x))/x.
1. Save the plot by the sinsquarebyx.pdf in pdf format.
2. Zoom and find the maxima.
@@ -89,11 +89,16 @@
* Evaluation
1. Create 100 equally spaced points between -pi/2 and pi/2?
- 2. How do you clear a figure in ipython?
- 3. How do find the length of a sequen
+ 2. What will the command ''linspace(-pi,pi,100)'' do.
+ - returns 100 evenly spaced samples from -pi to pi
+ - returns 100 evenly spaced samples from -pi to pi excluding pi but including -pi
+ - returns 100 evenly spaced samples from -pi to pi excluding -pi but including pi
+ - returns 100 evenly spaced samples from -pi to pi including both -pi and pi
+ 3. How do find the length of a sequence.
* Solutions...
1. linspace(-pi/2,pi/2,100)
- 2. clf()
+ 2.
+returns 100 evenly spaced samples from -pi to pi including both -pi and pi
3. len(sequence\_name)
*
#+begin_latex
diff --git a/using_plot_interactively/slides.tex b/using_plot_interactively/slides.tex
index ade4ff6..c39ed84 100644
--- a/using_plot_interactively/slides.tex
+++ b/using_plot_interactively/slides.tex
@@ -1,4 +1,4 @@
-% Created 2011-05-04 Wed 11:44
+% Created 2011-05-18 Wed 15:15
\documentclass[presentation]{beamer}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
@@ -43,14 +43,18 @@ showstringspaces=false, keywordstyle=\color{blue}\bfseries}
\begin{frame}
\begin{center}
-\textcolor{blue}{Using plot Interactively}
+\vspace{12pt}
+\textcolor{blue}{\huge Using Plot Interactively}
\end{center}
+\vspace{18pt}
\begin{center}
-\includegraphics[scale=0.25]{../images/iitb-logo.png}\\
-Developed by FOSSEE Team, IIT-Bombay. \\
-Funded by National Mission on Education through ICT
-
-MHRD, Govt. of India
+\vspace{10pt}
+\includegraphics[scale=0.95]{../images/fossee-logo.png}\\
+\vspace{5pt}
+\scriptsize Developed by FOSSEE Team, IIT-Bombay. \\
+\scriptsize Funded by National Mission on Education through ICT\\
+\scriptsize MHRD,Govt. of India\\
+\includegraphics[scale=0.30]{../images/iitb-logo.png}\\
\end{center}
\end{frame}
\begin{frame}
@@ -88,7 +92,7 @@ MHRD, Govt. of India
\end{itemize}
\end{frame}
\begin{frame}
-\frametitle{Question1}
+\frametitle{Question 1}
\label{sec-5}
Plot (sin(x)*sin(x))/x.
@@ -130,8 +134,14 @@ MHRD, Govt. of India
\begin{enumerate}
\item Create 100 equally spaced points between -pi/2 and pi/2?
-\item How do you clear a figure in ipython?
-\item How do find the length of a sequen
+\item What will the command `'linspace(-pi,pi,100)'' do.
+\begin{itemize}
+\item returns 100 evenly spaced samples from -pi to pi
+\item returns 100 evenly spaced samples from -pi to pi excluding pi but including -pi
+\item returns 100 evenly spaced samples from -pi to pi excluding -pi but including pi
+\item returns 100 evenly spaced samples from -pi to pi including both -pi and pi
+\end{itemize}
+\item How do find the length of a sequence.
\end{enumerate}
\end{frame}
\begin{frame}
@@ -141,13 +151,11 @@ MHRD, Govt. of India
\begin{enumerate}
\item linspace(-pi/2,pi/2,100)
-\item clf()
+\item returns 100 evenly spaced samples from -pi to pi including both -pi and pi
\item len(sequence\_name)
\end{enumerate}
\end{frame}
\begin{frame}
-\frametitle{Acknowledgement\ldots{}}
-\label{sec-9}
\begin{block}{}
\begin{center}