import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
df=pd.DataFrame(np.random.randn(6,4),index=['one','two','three','four','five','six'],columns=pd.Index(['A','B','C','D'],name='Gnes'))
df.columns
Index(['A', 'B', 'C', 'D'], dtype='object', name='Gnes')
abs(df).plot(kind='barh',stacked=True,alpha=0.9)
comp1=np.random.normal(0,1,size=200)
comp2=np.random.normal(10,2,size=200)
values=pd.Series(np.concatenate([comp1,comp2]))
values.hist(bins=100,alpha=0.6,color='g',normed=True)
values.plot(kind='kde',style='-')
df2=pd.DataFrame(np.random.rand(50,4),columns=pd.Index(['A','B','C','D'],name='MAC_#YJ'))
diff_df2=df2.diff()
plt.scatter(diff_df2['B'],diff_df2['A'])
pd.plotting.scatter_matrix(diff_df2,diagonal='kde',color='g',alpha=0.8)
date_df=pd.Series(np.random.rand(30),index=pd.date_range('10/11/2018',periods=30))
fig=plt.figure()
axes=fig.add_subplot()
import seaborn as sns
sns.set(style="darkgrid")
# Plot the responses for different events and regions
sns.lineplot(x="timepoint", y="signal",col='vars',
hue="region", style="event",
data=date_df)