Metadata-Version: 2.4
Name: marsilea
Version: 0.5.2
Summary: Declarative creation of composable visualizations
Project-URL: Home, https://github.com/Marsilea-viz/marsilea
Project-URL: Documentation, https://marsilea.readthedocs.io
Author-email: Yimin Zheng <yzheng@cemm.at>, Zhihang Zheng <zhihang.zheng@connect.polyu.hk>
License: The MIT License (MIT)
        
        Copyright (c) 2025 Yimin Zheng
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
License-File: LICENSE
Classifier: Framework :: Matplotlib
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.8
Requires-Dist: legendkit
Requires-Dist: matplotlib>=3.6
Requires-Dist: numpy
Requires-Dist: pandas[parquet]
Requires-Dist: platformdirs
Requires-Dist: scipy
Requires-Dist: seaborn
Description-Content-Type: text/markdown

<p align="center">
  <picture align="center">
    <source media="(prefers-color-scheme: dark)" srcset="https://github.com/Marsilea-viz/marsilea/raw/main/img/banner-dark.jpg">
    <source media="(prefers-color-scheme: light)" srcset="https://github.com/Marsilea-viz/marsilea/raw/main/img/banner-blue.jpg">
    <img alt="Shows a bar chart with benchmark results." src="https://github.com/Marsilea-viz/marsilea/raw/main/img/banner-dark.jpg" width="400">
  </picture>
</p>

[![Documentation Status](https://readthedocs.org/projects/marsilea/badge/?version=stable&style=flat-square)](https://marsilea.readthedocs.io/en/stable)
![pypi version](https://img.shields.io/pypi/v/marsilea?color=0098FF&logo=python&logoColor=white&style=flat-square)
![Conda Version](https://img.shields.io/conda/vn/conda-forge/marsilea?style=flat-square&logo=anaconda&logoColor=white&color=%2344A833)
![PyPI - License](https://img.shields.io/pypi/l/marsilea?color=FFD43B&style=flat-square)
[![DOI](https://img.shields.io/badge/DOI-10.1186%2Fs13059--024--03469--3-blue?color=0098FF&style=flat-square)](https://doi.org/10.1186/s13059-024-03469-3)

[![Gitter](https://img.shields.io/gitter/room/Marsilea/Questions?style=flat-square)](https://app.gitter.im/#/room/#Marsilea:gitter.im)

# Marsilea: Declarative creation of composable visualization!

---

## Documentation

You can read the documentation on Read the Docs.

[Read Documentation](https://marsilea.readthedocs.io/)

## Installation

### Using PIP
```shell
pip install marsilea
```
### Using Conda/Mamba
```shell
conda install -c conda-forge marsilea
# or
mamba install -c conda-forge marsilea
```

## What is Composable Visualization?

<p align="center">
  <picture align="center">
    <img alt="Shows a bar chart with benchmark results." src="https://github.com/Marsilea-viz/marsilea/raw/main/img/showcase.gif" width="300">
  </picture>
</p>

When we do visualization, we often need to combine multiple plots to show different aspects of the data.
For example, we may need to create a heatmap to show the expression of genes in different cells,
and then create a bar chart to show the expression of genes in different cell types.
A visualization contains multiple plots is called a composable visualization.
In Marsilea, we employ a declarative approach for user to create composable visualization incrementally.

## Citation

If you use Marsilea in your research, please cite the following:

> Marsilea: an intuitive generalized paradigm for composable visualizations
> 
> Yimin Zheng, Zhihang Zheng, André F. Rendeiro & Edwin Cheung
> 
> _Genome Biology_ 2025 Jan 06. DOI: [10.1186/s13059-017-1382-0](https://doi.org/10.1186/s13059-024-03469-3)

## Get helps

1. Open an issue
2. Join us on [Gitter](https://app.gitter.im/#/room/#Marsilea:gitter.im)


## Examples

<table>
    <thead>
        <tr>
            <th>
                <a href="https://marsilea.readthedocs.io/en/latest/examples/Gallery/plot_tiobe_index.html">
                    Bar Chart With Image
                </a>
            </th>
            <th>
                <a href="https://marsilea.readthedocs.io/en/latest/examples/Gallery/plot_oil_well.html">
                    Stacked Bar
                </a>
            </th>
            <th>
                <a href="https://marsilea.readthedocs.io/en/latest/examples/Gallery/plot_arc_diagram.html">
                    Arc Diagram
                </a>
            </th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <img src="https://marsilea.readthedocs.io/en/latest/_images/sphx_glr_plot_tiobe_index_001_2_00x.png" height="300px">
            </td>
            <td>
                <img src="https://marsilea.readthedocs.io/en/latest/_images/sphx_glr_plot_oil_well_001_2_00x.png" height="300px">
            </td>
            <td>
                <img src="https://marsilea.readthedocs.io/en/latest/_images/sphx_glr_plot_arc_diagram_001_2_00x.png" width="300px">
            </td>
        </tr>
    </tbody>
</table>

<table>
    <thead>
        <tr>
            <th>
                <a href="https://marsilea.readthedocs.io/en/latest/examples/Gallery/plot_pbmc3k.html">
                    Heatmap
                </a>
            </th>
            <th>
                <a href="https://marsilea.readthedocs.io/en/latest/examples/Gallery/plot_oncoprint.html">
                    Oncoprint
                </a>
            </th>
            <th>
                <a href="https://marsilea.readthedocs.io/en/latest/examples/Gallery/plot_upset.html">
                    Upsetplot
                </a>
            </th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <img src="https://marsilea.readthedocs.io/en/latest/_images/sphx_glr_plot_pbmc3k_001_2_00x.png" width="300px">
            </td>
            <td>
                <img src="https://marsilea.readthedocs.io/en/latest/_images/sphx_glr_plot_oncoprint_005_2_00x.png" width="300px">
            </td>
            <td>
                <img src="https://marsilea.readthedocs.io/en/latest/_images/sphx_glr_plot_upset_001_2_00x.png" width="300px">
            </td>
        </tr>
    </tbody>
</table>
