Added exercises to plotting data
authorAmit Sethi
Tue, 09 Nov 2010 23:18:57 +0530
changeset 432 c92662f02209
parent 420 27d2561e617a
child 433 f121a3598ad9
Added exercises to plotting data
plotting-data/script.rst
plotting-data/slides.org
plotting-data/slides.tex
--- a/plotting-data/script.rst	Tue Nov 09 15:49:45 2010 +0530
+++ b/plotting-data/script.rst	Tue Nov 09 23:18:57 2010 +0530
@@ -113,6 +113,21 @@
   clf()
 
 
+Following are exercises that you must do.
+
+%% %% Plot the given experimental data with large dots.The data is
+on your screen. 
+ 
+%% %% Plot the given experimental data with small dots.
+The data is on your screen
+
+
+Please, pause the video here. Do the exercises and then continue. 
+
+
+
+
+
 .. #[[Anoop: Make sure code is correct, corrected plot(L,t,o) to
    plot(L,t,'o')]]
 
@@ -162,18 +177,33 @@
 
    errorbar?
 
+Following is an  exercise that you must do.
+
+%% %% Plot the given experimental data with large green dots.Also include
+the error in your plot. 
+
+Please, pause the video here. Do the exercise and then continue. 
+
+
+
+
+
+
 
 {{{ Show Summary Slide }}}
 
-In this tutorial we have learnt : 
+In this tutorial we have learnt :
 
-1. How to declare a sequence of number , specifically the kind of sequence we learned was a list.
+1. How to declare a sequence of number , specifically the kind of
+sequence we learned was a list.
 
-2. Plotting experimental data extending our knowledge from mathematical functions. 
+#. Plotting experimental data extending our knowledge from
+mathematical functions.
 
-3. The various options available for plotting dots instead of lines.
+#. The various options available for plotting dots instead of lines.
 
-4. Plotting experimental data such that we can also represent error. We did this using the errorbar() function.
+#. Plotting experimental data such that we can also represent
+error. We did this using the errorbar() function.
 
 
  {{{ Show the "sponsored by FOSSEE" slide }}}
--- a/plotting-data/slides.org	Tue Nov 09 15:49:45 2010 +0530
+++ b/plotting-data/slides.org	Tue Nov 09 23:18:57 2010 +0530
@@ -58,8 +58,68 @@
   :      1.30, 1.47, 1.58,
   :      1.77, 1.83, 1.94]
 
+
+
+* Question 1
+  - Plot the given experimental data with large dots.
+  The data is on your screen.     
+  
+
+* Question 1 Data
+
+#+ORGTBL: L vs T^2 orgtbl-to-latex
+    
+  
+   |    S |     n |
+   | 0.19 | 10.74 |
+   | 0.38 | 14.01 |
+   | 0.57 | 18.52 |
+   | 0.77 | 20.23 |
+   | 0.96 | 22.88 |
+   | 1.15 | 24.59 |
+   | 1.34 | 27.55 |
+   | 1.54 | 28.48 |
+   | 1.73 | 30.20 |
+    
+
+* Solution 1
+
+  : S=[0.19,0.38,0.57,0.77,0.96,
+  :   1.15,1.34,1.54,1.73]
+  : n=[10.74,14.01,18.52,20.23,
+  :    22.88,24.59,27.55,28.48,30.20]
+  : plot(S,n,'o')
+
+* Question 2
+  - Plot the given experimental data with small dots.
+  The data is on your screen.     
+
+* Question 2 Data
+
+#+ORGTBL: L vs T^2 orgtbl-to-latex
+
+   |    P |    D |
+   | 1.48 | 0.68 |
+   | 2.96 | 0.89 |
+   | 4.44 | 1.18 |
+   | 5.92 | 1.29 |
+   | 7.40 | 1.46 |
+   | 8.88 | 1.57 |
+   | 10.3 | 1.76 |
+   | 11.8 | 1.82 |
+   | 13.3 | 1.93 |
+  
+* Solution 2
+
+   : P=[1.48,2.96,4.44,5.92,7.40,
+   :   8.88,10.3,11.8,13.3]
+   : D=[0.68,0.89,1.18,1.29,1.46,
+   :   1.57,1.76,1.82,1.93]
+   : plot(P,D,'.')
+
 * Adding Error 
 
+#+ORGTBL: L vs T^2 orgtbl-to-latex
 
   |   L |    T | \delta L | \delta T |
   | 0.1 | 0.69 |     0.08 |     0.04 |
@@ -75,8 +135,46 @@
  
 * Plotting Error bar 
   
-  : In[]: errorbar(L,tsquare,xerr=delta_L, yerr=delta_T,
-  :                fmt='b.')
+  : errorbar(L,tsquare,xerr=delta_L, yerr=delta_T,
+  :         fmt='b.')
+
+
+* Question 1
+
+  - Plot the given experimental data with large green dots.Also include
+  the error in your plot. 
+
+  
+* Question 1 Data
+
+  #+ORGTBL: L vs T^2 orgtbl-to-latex
+
+  |    S |     n | \delta S | \delta n |
+  | 0.19 | 10.74 |    0.006 |     0.61 |
+  | 0.38 | 14.01 |    0.006 |     0.69 |
+  | 0.57 | 18.52 |    0.005 |     0.53 |
+  | 0.77 | 20.23 |    0.003 |     0.38 |
+  | 0.96 | 22.88 |    0.004 |     0.46 |
+  | 1.15 | 24.59 |    0.007 |     0.37 |
+  | 1.34 | 27.55 |    0.004 |     0.46 |
+  | 1.54 | 28.48 |    0.004 |     0.46 |
+  | 1.73 | 30.20 |    0.007 |     0.37 |
+  
+  
+    
+
+* Solution 1
+  
+  : S=[0.19,0.38,0.57,0.77,0.96,
+  :   1.15,1.34,1.54,1.73]
+  : n=[10.74,14.01,18.52,20.23,
+  :   22.88,24.59,27.55,28.48,30.20]
+  : delta_S=[0.006,0.006,0.005,0.003,
+  :         0.004,0.007,0.004,0.004,0.007]
+  : delta_n=[0.61,0.69,0.53,0.38,0.46,
+  :         0.37,0.46,0.46,0.37]
+  : errorbar(S,n,xerr=delta_S, yerr=delta_n, 
+  :         fmt='go')
 
 * Summary 
  : L = [0.1, 0.2, 0.3, 0.4, 0.5,                                             |
--- a/plotting-data/slides.tex	Tue Nov 09 15:49:45 2010 +0530
+++ b/plotting-data/slides.tex	Tue Nov 09 23:18:57 2010 +0530
@@ -1,4 +1,4 @@
-% Created 2010-11-09 Tue 15:09
+% Created 2010-11-09 Tue 23:18
 \documentclass[presentation]{beamer}
 \usepackage[latin1]{inputenc}
 \usepackage[T1]{fontenc}
@@ -90,8 +90,106 @@
 \end{verbatim}
 \end{frame}
 \begin{frame}
+\frametitle{Question 1}
+\label{sec-4}
+
+\begin{itemize}
+\item Plot the given experimental data with large dots.
+\end{itemize}
+
+  The data is on your screen.     
+  
+\end{frame}
+\begin{frame}
+\frametitle{Question 1 Data}
+\label{sec-5}
+
+
+    
+  
+
+\begin{center}
+\begin{tabular}{rr}
+    S  &      n  \\
+ 0.19  &  10.74  \\
+ 0.38  &  14.01  \\
+ 0.57  &  18.52  \\
+ 0.77  &  20.23  \\
+ 0.96  &  22.88  \\
+ 1.15  &  24.59  \\
+ 1.34  &  27.55  \\
+ 1.54  &  28.48  \\
+ 1.73  &  30.20  \\
+\end{tabular}
+\end{center}
+
+
+    
+\end{frame}
+\begin{frame}[fragile]
+\frametitle{Solution 1}
+\label{sec-6}
+
+
+\begin{verbatim}
+   S=[0.19,0.38,0.57,0.77,0.96,
+     1.15,1.34,1.54,1.73]
+   n=[10.74,14.01,18.52,20.23,
+      22.88,24.59,27.55,28.48,30.20]
+   plot(S,n,'o')
+\end{verbatim}
+\end{frame}
+\begin{frame}
+\frametitle{Question 2}
+\label{sec-7}
+
+\begin{itemize}
+\item Plot the given experimental data with small dots.
+\end{itemize}
+
+  The data is on your screen.     
+\end{frame}
+\begin{frame}
+\frametitle{Question 2 Data}
+\label{sec-8}
+
+
+
+
+\begin{center}
+\begin{tabular}{rr}
+    P  &     D  \\
+ 1.48  &  0.68  \\
+ 2.96  &  0.89  \\
+ 4.44  &  1.18  \\
+ 5.92  &  1.29  \\
+ 7.40  &  1.46  \\
+ 8.88  &  1.57  \\
+ 10.3  &  1.76  \\
+ 11.8  &  1.82  \\
+ 13.3  &  1.93  \\
+\end{tabular}
+\end{center}
+
+
+  
+\end{frame}
+\begin{frame}[fragile]
+\frametitle{Solution 2}
+\label{sec-9}
+
+
+\begin{verbatim}
+    P=[1.48,2.96,4.44,5.92,7.40,
+      8.88,10.3,11.8,13.3]
+    D=[0.68,0.89,1.18,1.29,1.46,
+      1.57,1.76,1.82,1.93]
+    plot(P,D,'.')
+\end{verbatim}
+\end{frame}
+\begin{frame}
 \frametitle{Adding Error}
-\label{sec-4}
+\label{sec-10}
 
 
 
@@ -117,17 +215,76 @@
 \end{frame}
 \begin{frame}[fragile]
 \frametitle{Plotting Error bar}
-\label{sec-5}
+\label{sec-11}
 
   
 \begin{verbatim}
-   In[]: errorbar(L,tsquare,xerr=delta_L, yerr=delta_T,
-                  fmt='b.')
+   errorbar(L,tsquare,xerr=delta_L, yerr=delta_T,
+           fmt='b.')
+\end{verbatim}
+\end{frame}
+\begin{frame}
+\frametitle{Question 1}
+\label{sec-12}
+
+
+\begin{itemize}
+\item Plot the given experimental data with large green dots.Also include
+\end{itemize}
+
+  the error in your plot. 
+
+  
+\end{frame}
+\begin{frame}
+\frametitle{Question 1 Data}
+\label{sec-13}
+
+
+  \#+ORGTBL: L vs T$^2$ orgtbl-to-latex
+
+
+\begin{center}
+\begin{tabular}{rrrr}
+    S  &      n  &  $\delta$ S  &  $\delta$ n  \\
+ 0.19  &  10.74  &       0.006  &        0.61  \\
+ 0.38  &  14.01  &       0.006  &        0.69  \\
+ 0.57  &  18.52  &       0.005  &        0.53  \\
+ 0.77  &  20.23  &       0.003  &        0.38  \\
+ 0.96  &  22.88  &       0.004  &        0.46  \\
+ 1.15  &  24.59  &       0.007  &        0.37  \\
+ 1.34  &  27.55  &       0.004  &        0.46  \\
+ 1.54  &  28.48  &       0.004  &        0.46  \\
+ 1.73  &  30.20  &       0.007  &        0.37  \\
+\end{tabular}
+\end{center}
+
+
+  
+  
+    
+\end{frame}
+\begin{frame}[fragile]
+\frametitle{Solution 1}
+\label{sec-14}
+
+  
+\begin{verbatim}
+   S=[0.19,0.38,0.57,0.77,0.96,
+     1.15,1.34,1.54,1.73]
+   n=[10.74,14.01,18.52,20.23,
+     22.88,24.59,27.55,28.48,30.20]
+   delta_S=[0.006,0.006,0.005,0.003,
+           0.004,0.007,0.004,0.004,0.007]
+   delta_n=[0.61,0.69,0.53,0.38,0.46,
+           0.37,0.46,0.46,0.37]
+   errorbar(S,n,xerr=delta_S, yerr=delta_n, 
+           fmt='go')
 \end{verbatim}
 \end{frame}
 \begin{frame}[fragile]
 \frametitle{Summary}
-\label{sec-6}
+\label{sec-15}
 
 \begin{verbatim}
   L = [0.1, 0.2, 0.3, 0.4, 0.5,                                             |