I am trying to adjust geom_text labels so that they don't overlap. Adjusting the labels using nudge_x, nudge_y and size does not give me a very satisfying result. I came across the adjust_text package but I don't manage to implement it to my code.
Right now my graph looks like that:
I tried adding adjust_text =True (see below) which gives me the following error. "Parameters {'adjust_text'}, are not understood by either the geom, stat or layer."
(ggplot(nutrient_rel_item, aes(y='Share_calories', x='Share_biomass', color='Type',show_legend=False))
+stat_smooth( aes(y='Share_calories', x='Share_biomass'),method='lm',inherit_aes=False)
+geom_text(aes(label='Abb'),data=nutrient_rel_item, nudge_x=0.1, nudge_y=0.1, size=4, adjust_text =True)
+facet_wrap('~CCC1',nrow=2)
+ scale_x_log10(labels=lambda l: ["%d%%" % (v * 100) for v in l])
+ scale_y_log10(labels=lambda l: ["%d%%" % (v * 100) for v in l])
+ geom_point(size=0.1)
+ geom_path(aes(group='Item'), arrow= arrow(angle = 15, length= 0.1, type = "closed"))
+ labs(x='x', y='y')
+ theme(legend_position='none'))