-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplot.py
38 lines (33 loc) · 1.06 KB
/
plot.py
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
import preprocessing
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(style="ticks", color_codes=True)
sns.set_style("whitegrid")
sns.set_context("poster")
def show_data():
"""
Plots features pairwise, of the following set:
- average allelic fraction
- hematocrit
- platelet
- white blood cell count
- hemoglobin
- age
"""
# Preprocessing
aml_data = preprocessing.load_csv()
preprocessing.fill_missing_values(aml_data)
preprocessing.add_total_genes(aml_data)
# Delete gene columns
for column in aml_data.columns:
if 'Gene.' in column:
del aml_data[column]
# Plot pairwise
sns.set(style='whitegrid')
cols = ['caseflag', 'Total.Genes', 'Age', 'WBC', 'PLATELET', 'HEMOGLBN', 'HEMATOCR']
sns.pairplot(aml_data[cols],
hue='caseflag', # different caseflags have different colors
markers=['.', r'$+$'], # markers
plot_kws={"s": 250}, # marker size (100 default)
size=5.0) # size of each subplot
plt.show()