Skip to main content

A Python visualization library replicating slandarer's MATLAB plots

Project description

slanplot

Version Python License

slanplot is a high-level, elegant Python visualization library that reproduces the incredibly aesthetic MATLAB scientific visualization suite authored by slandarer. By bridging the gap between MATLAB and Python, slanplot makes stunning and publication-ready statistical and relational diagrams accessible to the Python data science ecosystem.

✨ Features

  • Rich Aesthetics: Ships with 53 highly-curated scientific colormaps directly adapted from MATLAB's premium slanColor palette. Automatically registers them into Matplotlib's global colormaps registry.
  • Relational Diagrams:
    • ChordDiagram (和弦图)
    • SSankey (带智能排板的多级桑基图)
    • STree, PiTree, CircularTree (层级树、环形树)
  • Distribution Diagrams:
    • JoyPlot (峰峦图 / Ridgeline Plot)
    • MarginalPlot (带地毯式误差带和误差棒的联合边缘分布)
    • HatchedBar, HatchedPie (支持密集交叉纹理的经典带阴影条形图与饼图)
    • VennDiagram (平滑贝塞尔三相维恩图)
    • CalendarHeatmap (GitHub 风格日历热力图)
    • SHeatmap (支持六边形、扇形、自定义填充的特种相关性热力矩阵)
  • Scientific Ready: Includes built-in support for rendering *** significance stars, overlaying nested distribution patches, and fill_between dynamic standard deviation bounds.

📦 Installation

Install slanplot easily via pip:

pip install slanplot

🚀 Quick Start

import numpy as np
import matplotlib.pyplot as plt
from slanplot import SHeatmap

# 1. Generate correlation data
data = np.random.randn(10, 10)
pvals = np.random.rand(10, 10)

# 2. Draw a gorgeous special heatmap
fig, ax = plt.subplots(figsize=(8, 8))
hm = SHeatmap(data, format_type='pie', ax=ax, pval=pvals, cmap='slan_batlow')
hm.draw()

plt.show()

📖 Documentation & Examples

Please check the interactive Jupyter Notebooks in the examples/notebooks/ directory for an exhaustive visual walkthrough of every chart type:

  1. 01_Relational_Plots.ipynb: Focuses on network and relation distributions (Sankey, Chord).
  2. 02_Distribution_Plots.ipynb: Focuses on complex statistical comparisons (Joyplot, Marginal, Venn).
  3. 03_Scientific_Visualization.ipynb: Step-by-step reproduction of top-tier biological scientific plots.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📜 License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slanplot-0.1.0.tar.gz (16.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slanplot-0.1.0-py3-none-any.whl (2.3 MB view details)

Uploaded Python 3

File details

Details for the file slanplot-0.1.0.tar.gz.

File metadata

  • Download URL: slanplot-0.1.0.tar.gz
  • Upload date:
  • Size: 16.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for slanplot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e981a5551c37cf3a76783cc82dd5a9d5896921a81ac6b244879283a5fe512333
MD5 9b3e0c3dcdc1436b3cb229be36b6105e
BLAKE2b-256 bf90db54d02921c86653cf8dd1bde72c86aba822b68156bb61423ae979af2c54

See more details on using hashes here.

File details

Details for the file slanplot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: slanplot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for slanplot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfa936e1d1ae01076679ada6730dff3157c7d99d934116f455d07019a898016d
MD5 b04232e655e5b8977d1bd65d8cbfa69a
BLAKE2b-256 d547d212529afe84eb80e0fbd90612579053af0a5ca6d99e0978d5664d7b7306

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page