python - Seaborn / Matplotlib: How to repress scientific notation in factorplot y-axis -


simple example below issue can't solve.

n.b. other seaborn plotting methods seems have arguments repress exponential form seemingly not factorplots. tried matplotlib solutions including suggested in similar question none work. not dupe of this question. use factorplots , ideally want find proper solution opposed workaround.

data = {'reports': [4, 24, 31, 2, 3],'coverage': [35050800, 54899767, 57890789, 62890798, 70897871]} df = pd.dataframe(data) df 

produces dataframe:

    coverage    reports 0   35050800    4 1   54899767    24 2   57890789    31 3   62890798    2 4   70897871    3 

and seaborn code:

sns.factorplot(y="coverage", x="reports", kind='bar', data=df, label="total")  

produces plot:

enter image description here

is there way y axis display appropriate numeric scale based on coverage values?

it looks following line solves issue:

plt.ticklabel_format(style='plain', axis='y') 

here documentation link.


Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -