statannotations
statannotations copied to clipboard
Seaborn categorical plot issue
Hi,
I have been using this package for quite some time but came back to it more recently to find it broken when trying to plot violin plot with Seaborn
I have tried with Seaborn 0.13
and Pandas 2.1.1
, which got me this error (see below), then downgraded Seaborn 0.11.2
and Pandas 1.5.3
, same error, even created another conda env with just the required package (Seaborn 0.11.2
and Pandas 1.5.3
) and still gets me the same error message
It seems that Seaborn has removed the use of _ViolinPlotter
in categorical.py
A solution would be to update this package to actual versions of Seaborn and Pandas, which both received important updates and because it's the only stats annotator package on Python, or at least update the calling names for Seaborn plots
File "<ipython-input-4-827f267a0f19>", line 8, in <module>
annotator=Annotator(ax,pairs=[('C1','Mt')],plot='violinplot',data=df,x='Classification',y='X2')
File "C:\ProgramData\miniforge\envs\statenv\lib\site-packages\statannotations\Annotator.py", line 108, in __init__
self._plotter = self._get_plotter(engine, ax, pairs, plot, data,
File "C:\ProgramData\miniforge\envs\statenv\lib\site-packages\statannotations\Annotator.py", line 784, in _get_plotter
return engine_plotter(*args, **kwargs)
File "C:\ProgramData\miniforge\envs\statenv\lib\site-packages\statannotations\_Plotter.py", line 87, in __init__
self.plotter = self._get_plotter(plot, x, y, hue, data, order,
File "C:\ProgramData\miniforge\envs\statenv\lib\site-packages\statannotations\_Plotter.py", line 157, in _get_plotter
plotter = sns.categorical._ViolinPlotter(
AttributeError: module 'seaborn.categorical' has no attribute '_ViolinPlotter'
Cheers!
same issue here:
AttributeError: module 'seaborn.categorical' has no attribute '_BoxPlotter'
any updates?