A Python package to draw groups of dots. dotgrouplot is inspired by the honeycomb plot in enclone. The major feature of dotgroupplot is to allow various group shapes and coloring schemes, which can mimic the pie chart.
- Clone the GitHub repo, e.g. with
git clone https://github.com/mourisl/dotgroupplot
. - Copy "dotgroupplot" folder to your project folder or run "python3 setup.py install" to install.
I will try to add dotgroupplot to PyPi in future.
Here is a minimal example:
import math
import pandas as pd
from dotgroupplot import dotgroupplot
n = 100 # Draw 100 groups
idlist = []
conditionlist = []
for i in range(n):
idlist += [str(i)] * (i + 1)
conditionlist += ["Healthy"] * math.floor((i+1)/2) + ["Disease"] * math.ceil((i+1)/2)
df = pd.DataFrame({"CDR3":idlist, "Condition":conditionlist})
dotgroupplot.dotgroupplot(df, "CDR3", hue="Condition")
See more examples in example.ipynb.
- Python >= 3.6
- seaborn >= 0.9
- matplotlib >= 2.2.2