#read data into dataframe
con=pd.read_csv('testOutput.csv')
'''
testOutput.csv looks like :
Sample,Count
sample1,99.9
sample2, 96.6
'''
## set colours to increase with values
sns.set(style="darkgrid")
groupedvalues=con.groupby("Count").sum().reset_index()
pal = sns.color_palette("Greens_d", len(groupedvalues))
rank = groupedvalues["Count"].argsort().argsort()
#get summary stats of data
summary=pd.DataFrame(con['Count'].describe())
#set limits
maxLim=100
minLim=min(con['Count'])-0.1
#barplot horizontal
g=sns.barplot(x='Count', y ='Sample',data=groupedvalues, palette=np.array(pal[::-1])[rank])
plt.xlim(minLim,maxLim)
plt.xticks(np.arange(minLim, 100, 0.1))
#remove labels
g.set(yticks=[])
g.set(xlabel='BLA BLA BLA', ylabel='Sample')
plt.table(cellText=summary.values,
rowLabels=summary.index,
colLabels=summary.columns,
cellLoc = 'center', rowLoc = 'center',
loc='right')
#plt.show()
plt.savefig('outTest.png', dpi=150)
This outputs : This table on the right of the image is cut off. How do I fix this and also just round down to nearest 0.1 on the labels please?
Thanks