Skip to content

mourisl/DotGroupPlot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dotgroupplot

What is it?

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.

Installation

  1. Clone the GitHub repo, e.g. with git clone https://github.com/mourisl/dotgroupplot.
  2. 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.

Usage

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.

Requirements

  • Python >= 3.6
  • seaborn >= 0.9
  • matplotlib >= 2.2.2

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published