-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathseabn.py
More file actions
54 lines (38 loc) · 926 Bytes
/
seabn.py
File metadata and controls
54 lines (38 loc) · 926 Bytes
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
# 1.visualizing statistical relationships
# 2.plotting with categorical data
# 3.visualizing the distribution of a dataset
# sample function
import numpy as np
from scipy import stats
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
"""
# simple relplot
a = sns.load_dataset("flights")
b = sns.relplot(x='passengers', y='month', data=a)
plt.show()
"""
'''
# year view relplot
a = sns.load_dataset("flights")
b = sns.relplot(x='passengers', y='month', hue='year', data=a)
plt.show()
'''
'''
b = sns.load_dataset("tips")
#print(b)
# line graph
#sns.relplot(x='time',y='tip', data=b, kind="line")
# categorical data
#sns.catplot(x='day',y='total_bill',data=b)
#plt.show()
# kind views categorical data
sns.catplot(x='day',y='total_bill',kind='violin',data=b) # kind='boxen' is another kind
plt.show()
'''
'''
s = np.random.normal(loc=10, size=100, scale=2)
sns.distplot(s)
plt.show()
'''