1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+BEAMER_FRAME_LEVEL: 1
#+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent}
#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+LaTeX_HEADER: \usepackage[english]{babel} \usepackage{ae,aecompl}
#+LaTeX_HEADER: \usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet}
#+LaTeX_HEADER: \usepackage{listings}
#+LaTeX_HEADER:\lstset{language=Python, basicstyle=\ttfamily\bfseries,
#+LaTeX_HEADER: commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen},
#+LaTeX_HEADER: showstringspaces=false, keywordstyle=\color{blue}\bfseries}
#+TITLE:
#+AUTHOR: FOSSEE
#+DATE:
#+EMAIL:
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+OPTIONS: H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:not-in-toc
*
#+begin_latex
\begin{center}
\vspace{12pt}
\textcolor{blue}{\huge Plotting Data}
\end{center}
\vspace{18pt}
\begin{center}
\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_latex
* Objectives
At the end of this tutorial, you will be able to,
- Define a list of numbers.
- Perform elementwise squaring of the list.
- Plot data points.
- Plot errorbars.
* Simple Pendulum Data
#+ORGTBL: L vs T^2 orgtbl-to-latex
| L | T |
| 0.1 | 0.69 |
| 0.2 | 0.90 |
| 0.3 | 1.19 |
| 0.4 | 1.30 |
| 0.5 | 1.47 |
| 0.6 | 1.58 |
| 0.7 | 1.77 |
| 0.8 | 1.83 |
| 0.9 | 1.94 |
* Question 1
Plot the given experimental data with large dots.
* Question 1 Data
#+ORGTBL: L vs T^2 orgtbl-to-latex
| L | T |
| 0.08 | 0.04 |
| 0.09 | 0.08 |
| 0.07 | 0.03 |
| 0.05 | 0.05 |
| 0.06 | 0.03 |
| 0.00 | 0.03 |
| 0.06 | 0.04 |
| 0.06 | 0.07 |
| 0.01 | 0.08 |
* Question 2
Plot the given experimental data with small dots.
* 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 |
* Summary
In this tutorial, we have learnt to –
- Declare a sequence of numbers using the function ``array``.
- Perform elemtwise squaring using the ``square`` function.
- Use the various options available for plotting like dots,lines.
- Plot experimental data such that we can also represent error by using the
``errorbar()`` function.
* Evaluation
1. Square the following sequence.
- distance\_values=[2.1,4.6,8.72,9.03]
2. Plot L v/s T in red plusses.
* Solutions
1. square(distance\_values)
2. plot(L,T,'r+')
*
#+begin_latex
\begin{block}{}
\begin{center}
\textcolor{blue}{\Large THANK YOU!}
\end{center}
\end{block}
\begin{block}{}
\begin{center}
For more Information, visit our website\\
\url{http://fossee.in/}
\end{center}
\end{block}
#+end_latex
|