statannot icon indicating copy to clipboard operation
statannot copied to clipboard

TypeError: __init__() missing 1 required positional argument: 'seed'

Open zkytony opened this issue 4 years ago • 4 comments

When I tried to use add_state_annotation() to a barplot, I get the following error:

Traceback (most recent call last):
  File "plotting.py", line 63, in result_plot
    add_stat_annotation(ax, plot="barplot", data=df,
  File "/home/myhome/pyenv/py37/lib/python3.7/site-packages/statannot/statannot.py", line 442, in add_stat_annotation
    errcolor=".26", errwidth=None, capsize=None, dodge=True)
TypeError: __init__() missing 1 required positional argument: 'seed'

I am using seaborn 0.11.0. I checked seaborn's source code and indeed there is a required seed argument. I think this is a simple bug to be fixed. Also, it would be nice to have some barplot examples in the Jupyter Notebook, so that the barplot annotation functionality is tested:)

zkytony avatar Sep 18 '20 22:09 zkytony

Hi @zkytony ,

Just met the same problem. Have you sort it out?

Cheers, Shang

ShawnGao911101 avatar Oct 27 '20 14:10 ShawnGao911101

I forked and fixed this in a commit https://github.com/zkytony/statannot/commit/504876162d4a1ba5cd1ae734ad6dbc6ec30dd343

zkytony avatar Oct 27 '20 14:10 zkytony

Many thanks mate, problem solved! @zkytony

ShawnGao911101 avatar Oct 27 '20 15:10 ShawnGao911101

See also https://github.com/webermarcolivier/statannot/issues/48.

kpj avatar Nov 27 '20 12:11 kpj