In [18]:
from astropy.io import fits
%matplotlib inline
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
import numpy as np
import pandas as pd
from scipy import stats, integrate
import seaborn as sns
sns.set(color_codes=True)
In [19]:
datafile = '/Users/rs548/Documents/Science/PeteHurley/Simard/table3wheadings.dat'
data = pd.read_csv(datafile,sep='\s+')
columns = ['z','$n_b$','$R_{chl,g}$','$g_{g2d}$','$M_{r,g}$','$e$']
df2 = data[columns]
len0 = len(df2)
for column in columns:
df2 = df2.drop(df2[df2[column] == -99.99].index)
print(str(len0 - len(df2)) + ' columns removed because of -99.99 values')
In [20]:
sns.pairplot( data=df2)
Out[20]:
In [21]:
g = sns.PairGrid(data=df2)
g.map_diag(sns.kdeplot)
g.map_offdiag(sns.kdeplot, cmap="Blues_d", n_levels=6)
In [22]:
g.savefig('/Users/rs548/Documents/Science/PeteHurley/Simard/kdecorner.png')
In [23]:
df2
Out[23]:
In [29]:
len(df2[df2['$R_{chl,g}$'] < 0])
Out[29]:
In [30]:
len(df2[df2['$R_{chl,g}$'] == 0])
Out[30]:
In [31]:
len(df2[df2['$R_{chl,g}$'] > 0])
Out[31]:
In [ ]: