Skip to content

Statistical analysis, clustering and visualinzing scientific data with hassle free

License

Notifications You must be signed in to change notification settings

koonimaru/omniplot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9623104 · Nov 10, 2024
Dec 14, 2022
Dec 14, 2022
Apr 1, 2023
Nov 9, 2024
Mar 14, 2023
Jun 19, 2023
Apr 22, 2023
Apr 22, 2023
Nov 10, 2024
Nov 9, 2024
Nov 10, 2024
Mar 20, 2024
Feb 8, 2024
Nov 9, 2024
Feb 1, 2023
Feb 1, 2023
Jul 23, 2023
Apr 30, 2023
Feb 7, 2023
Feb 8, 2023
Apr 24, 2023
Mar 14, 2023
Apr 14, 2023
Dec 14, 2022

Repository files navigation

Downloads PyPI Version License omniplot logo

What is omniplot

omniplot is a python module to draw a scientific plot with hassle free. It mainly focuses on bioinfomatics data.





Motivation

Although there exist many good python data visualization libraries, such as matplotlib, pandas, seaborn, plotly, vedo and so on, still several kinds of plots cannot be drawn without hassle. This module is aimed to provide convenient tools that allow users to draw complex plots, such as a scatter plot with PCA and loadings or clustering analysis in one liner.

Install

omniplot best works with python3.8. But, greater python versions may be OK. Please try installation with conda, if something wrong with pip installation.

pip install cython --user
git clone https://github.com/koonimaru/omniplot.git --user
cd omniplot
pip install .

or

pip install cython --user
pip install git+https://github.com/koonimaru/omniplot.git --user

or

git clone https://github.com/koonimaru/omniplot.git
cd omniplot
conda env create -f environment.yml python=3.8
conda activate omniplot
conda install ipykernel
ipython kernel install --user --name=omniplot
conda deactivate

And this is how to use conda environment in jupyerlab.

Known issues:
If you get errors saying "error: invalid command 'bdist_wheel'", please try pip install --upgrade pip wheel setuptools

How to use

I created jupyter notebooks to demonstrate the usage of omniplot Link. You can open jupyter notebooks with jupyter lab or VScode.

And, I also write articles in medium.

A formal documation is under development, but you may want to visit an auto-generated API.

Example usage

import pandas as pd
from omniplot import plot as op
import seaborn as  sns
import matplotlib.pyplot as plt

df=sns.load_dataset("titanic")
df=df[["class","embark_town","sex"]].fillna("NA")
op.nested_piechart(df, category=["class","embark_town","sex"], title="Titanic", ignore=0.01, show_legend=True,show_values=False,hatch=True,ncols=3)
plt.show()

Example usage

import seaborn as sns
from omniplot import plot as op
import matplotlib.pyplot as plt
df=sns.load_dataset("penguins")
df=df.dropna(axis=0)
res=op.radialtree(df, category=["species","island","sex"])
plt.show()