summaryrefslogtreecommitdiff
path: root/tutorials/module_4/4.7_Data_Visualization_and_Presentation.md
blob: f97721b06ebfe2e1f0bd355bdd195b9d4b42e3cc (plain)
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
#data #visualization 
# Data Visualization and Presentation

## How to represent data scientifically

Remember PCC:
1. Purpose
2. Composition
3. Color

## Plotting with Matplotlib
### Simple plot
You've probably seen the `matplotlib` package being imported at the top of the scripts. Matplotlib allows us to create static, animated and interactive visualizations in Python. It can even create publication quality plots.

Initialize
```python
import numpy as np
import matplotlib.pyplot as plt
```
Prepare data
```python
x = np.linspace(0,10*np.pi,1000)
y = np.sin(x)
```
Render
```python
fig, ax = plt.subplots()
ax.plot(X,Y)
plt.show()
```


### Customizing plots 
subplots, twin axis, labels, annotations

Colormaps and figure aesthetics.




### Other types of plots
- `scatter`
- `bar`
- `imshow`
- `contourf`
- `pie`
- `hist`
- `errorbar`
- `boxplot`

## Plotting different types of data



## Plotting for reports and publication quality graphs
Now that you've 


### Saving figures
save formats
	figure size
	bitmap vs vector format




## Problem:
Using pandas to plot spectroscopy data from raw data


## Problem:
Create a muli-panel figure showing raw data, fitted curve and residuals. Format with consistent style, legend, and color scheme for publication-ready quality.