I am a bit confused with my inability to replace the xticks in a bar plot.
For a reproducible example here are some data:
images_per_patient_quantiles.to_json()
'{"quantile":{"0":0.0,"1":0.05,"2":0.1,"3":0.15,"4":0.2,"5":0.25,"6":0.3,"7":0.35,"8":0.4,"9":0.45,"10":0.5,"11":0.55,"12":0.6,"13":0.65,"14":0.7,"15":0.75,"16":0.8,"17":0.85,"18":0.9,"19":0.95,"20":1.0},"number_of_images_per_patient":{"0":20.0,"1":28.0,"2":28.0,"3":30.0,"4":31.0,"5":32.0,"6":32.0,"7":32.0,"8":32.0,"9":33.0,"10":34.0,"11":35.0,"12":36.0,"13":36.0,"14":37.0,"15":40.0,"16":40.0,"17":42.0,"18":52.0,"19":71.0,"20":548.0}}'
If i plot the data the xtick labels are confused as below:
On the other hand if I try to replace them I get this oddity below which I can not explain:
sns.barplot(x = 'quantile', y = 'number_of_images_per_patient', data = images_per_patient_quantiles, color = 'crimson')
plt.xticks(ticks = np.arange(0,1.05, 0.05), labels = np.arange(0,1.05, 0.05))
From the documentation I understand that I can also pass arguments that would format the ticks and possibly this would also improve the readability of the chart:
How this can be done?