Swarm#

Swarm is a wrapper for seaborn’s swarmplot.

from marsilea.plotter import Swarm
import numpy as np
import matplotlib.pyplot as plt

_, ax = plt.subplots()
data = np.random.rand(50, 10)
Swarm(data).render(ax)
plot swarm
     var     value
0      0  0.232557
1      0  0.595224
2      0  0.351328
3      0  0.317622
4      0  0.728415
..   ...       ...
495    9  0.569839
496    9  0.040710
497    9  0.620363
498    9  0.519342
499    9  0.513141

[500 rows x 2 columns]
{'x': 'var', 'y': 'value'}

Total running time of the script: (0 minutes 1.033 seconds)

Gallery generated by Sphinx-Gallery