trevismd / statannotations

add statistical significance annotations on seaborn plots. Further development of statannot, with bugfixes, new features, and a different API.
Other
619 stars 67 forks source link

Drifting annotations with FacetGrid #126

Open LucaCerina opened 12 months ago

LucaCerina commented 12 months ago

Figure_1

Hello, I am trying to add annotations in a seaborn catplot, but I noticed that self._plotter.get_value_lim() in annotate is messing the coordinates, since every plot increases the maximum ylim. I tried #89 and #101. Also setting a fixed orig_value_lim is breaking the plot, so probably also _annotate_pair uses the wrong ylims.

Do you know how to circumvent the problem?

trevismd commented 9 months ago

Hi! Sorry the first answer's coming late and isn't probably what you want, but here it is anyway :-)

Until Catplots are supported, if you're willing to switch over to using FacetGrid, you could probably pass sharey=False to achieve this (see the image and my recent answer for the code in #120). I think you could also find a way to specify ylims in each subplot such that the height of "100%" matches. Let me know how that goes, I'll try to be more reactive ;)