Saturday, July 02, 2022

[Solved] seaborn: decrease the size of the markers


Code:

ax = sns.swarmplot(y="time_taken", x="dtype", data=all_results, color=".25")


Error:

/usr/local/Cellar/jupyterlab/3.3.2/libexec/lib/python3.9/site-packages/seaborn/categorical.py:1296: UserWarning: 35.9% of the points cannot be placed; you may want to decrease the size of the markers or use stripplot.
  warnings.warn(msg, UserWarning)


Fix:

ax = sns.swarmplot(y="time_taken", x="dtype", data=all_results, color=".25", size=3.25)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.