outset

add zoom indicators, insets, and magnified panels to matplotlib/seaborn visualizations with ease!

https://github.com/mmore500/outset

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.4%) to scientific vocabulary

Keywords

data-science data-visualization matplotlib pypi-package python seaborn

Keywords from Contributors

mesh sequences interactive hacking network-simulation
Last synced: 4 months ago · JSON representation ·

Repository

add zoom indicators, insets, and magnified panels to matplotlib/seaborn visualizations with ease!

Basic Info
  • Host: GitHub
  • Owner: mmore500
  • License: other
  • Language: Python
  • Default Branch: main
  • Homepage: http://mmore500.com/outset/
  • Size: 6.12 MB
Statistics
  • Stars: 8
  • Watchers: 1
  • Forks: 0
  • Open Issues: 3
  • Releases: 10
Topics
data-science data-visualization matplotlib pypi-package python seaborn
Created about 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.rst

.. figure:: https://raw.githubusercontent.com/mmore500/outset/481089653d858f14e636c3757df4927783bd5d23/docs/assets/outset-wordmark.png
   :target: https://github.com/mmore500/outset
   :alt: outset wordmark

|PyPi| |docs| |GitHub stars| |CI| |Deploy Sphinx documentation to Pages| |zenodo|

add zoom indicators, insets, and magnified panels to matplotlib/seaborn visualizations with ease!

- Free software: MIT license
- Documentation: https://mmore500.com/outset
- Repository: https://github.com/mmore500/outset


Features
--------

* compose axes grids to juxtapose a complete plot with data subsets or magnified subregions
* render grid axes as overlaid insets
* draw elegant zoom indicators with publication-ready default styling
* enjoy a familiar, data-oriented interface --- with full feature sets inherited directly from seaborn
* abstract away handling of padding and aspect ratios
* fine-tune appearance and layout with extensive styling options and bundled numbering/symbol library
* use hooks to inject custom functionality, like numbering/symbols and layout tweaks

Install
-------

``python3 -m pip install outset``


Gallery
-------

   .. figure:: https://raw.githubusercontent.com/mmore500/outset/481089653d858f14e636c3757df4927783bd5d23/docs/assets/outset-gallery-collage.png
      :target: https://mmore500.com/outset/gallery.html
      :alt: outset gallery collage


*Find example code and visualizations* |gallery|_.

.. _gallery: https://mmore500.com/outset/gallery.html

.. |gallery| replace:: *here*

Basic Usage
-----------

Use ``outset.OutsetGrid`` to compose source plot with zoom panels on an axes grid.
Zoom sections can be *a)* designated manually or *b)* inferred to bound data subsets.
To overlay zoom panels onto source plot, *c)* call ``outset.inset_outsets``.

a) Create ``OutsetGrid``, Explicit Zoom Areas
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   .. code:: python

      from matplotlib import pyplot as plt
      import numpy as np
      import outset as otst
      import seaborn as sns
      # adapted from # https://matplotlib.org/stable/gallery/
      i, a, b, c, d = np.arange(0.0, 2*np.pi, 0.01), 1, 7, 3, 11

      # 3 axes grid: source plot and two zoom frames
      grid = otst.OutsetGrid([(-10, 8, -8, 12), (-5, 5, -1, 3)])  # frame coords
      grid.broadcast(plt.plot,  # run plotter over all axes
         np.sin(i*a)*np.cos(i*b) * 20, np.sin(i*c)*np.cos(i*d) * 20,  # line coords
         c="k", zorder=-1)  # kwargs forwarded to plt.plot

      grid.marqueeplot()  # set axlims and render marquee annotations

   ..

   .. figure:: https://raw.githubusercontent.com/mmore500/outset/481089653d858f14e636c3757df4927783bd5d23/docs/assets/usage1.png
      :alt: usage example 1 result

b) Create ``OutsetGrid``, Inferred Zoom Areas
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   .. code:: python

      grid = otst.OutsetGrid(data=sns.load_dataset("iris").dropna(),  # facet over axes grid
         x="petal_width", y="petal_length",
         col="species",  # create zoom panel for each species
         hue="species",  # color marquee annotations by species
         aspect=0.6, height=3)  # adjust axes grid geometry
      grid.map_dataframe(sns.scatterplot,  # map plotter over faceted data
         x="petal_width", y="petal_length", legend=False, zorder=0)

      grid.marqueeplot()   # set axlims and render marquee annotations
      grid.add_legend()  # add figure-level legend

   ..

   .. figure:: https://raw.githubusercontent.com/mmore500/outset/481089653d858f14e636c3757df4927783bd5d23/docs/assets/usage2.png
      :alt: usage example 2 result


c) Overlay Zoom Panels as Insets
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   .. code-block:: python

      grid = otst.OutsetGrid(data=sns.load_dataset("iris").dropna(),  # facet over axes grid
         x="petal_width", y="petal_length",
         col="species",  # put each species in its own outset
         hue="species",   # make different color marquees
         aspect=1.5, height=4)  # adjust axes grid geometry
      grid.map_dataframe(sns.scatterplot,  # map plotter over faceted data
         x="petal_width", y="petal_length", legend=False, zorder=0)

      grid.add_legend()  # add figure-level legend
      otst.inset_outsets(grid, insets="NW")  # inset outsets in upper-left corner
      grid.marqueeplot()  # set axlims and render marquee annotations

   ..

   .. figure:: https://raw.githubusercontent.com/mmore500/outset/481089653d858f14e636c3757df4927783bd5d23/docs/assets/usage3.png
      :alt: usage example 3 result

*See the* |quickstart|_ *for more detailed usage information.*

.. _quickstart: https://mmore500.com/outset/quickstart.html

.. |quickstart| replace:: *quickstart guide*


API Overview
------------

* |OutsetGrid|_: compose a source plot and zoom regions over it (e.g., "outsets") on a multiplot lattice

  * designate zoom regions directly, or as regions containing data subsets
  * object-oriented, "tidy data" interface a la ``seaborn.FacetGrid``

* |inset_outsets|_: rearrange an ``OutsetGrid`` to place outset zoom regions as insets over the original source axes

* |marqueeplot|_: axis-level "tidy data" interface to draw marquees framing specified subsets of data

* |draw_marquee|_: low-level interface to draw individual marquee annotations


.. |OutsetGrid| replace:: ``outset.OutsetGrid``
.. _OutsetGrid: https://mmore500.com/outset/_autosummary/outset.OutsetGrid.html

.. |inset_outsets| replace:: ``outset.inset_outsets``
.. _inset_outsets: https://mmore500.com/outset/_autosummary/outset.inset_outsets.html

.. |marqueeplot| replace:: ``outset.marqueeplot``
.. _marqueeplot: https://mmore500.com/outset/_autosummary/outset.marqueeplot.html

.. |draw_marquee| replace:: ``outset.draw_marquee``
.. _draw_marquee: https://mmore500.com/outset/_autosummary/outset.draw_marquee.html


*Read the full API documentation* |apidocs|_.

.. _apidocs: https://mmore500.com/outset/_autosummary/outset.html#module-outset

.. |apidocs| replace:: *here*

Available Styling Extensions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

*Callout mark glyphs:* customize marquee identifiers; pass as ``mark_glyph`` kwarg

   |MarkAlphabeticalBadges|_ | |MarkArrow|_ | |MarkInlaidAsterisk|_ | |MarkMagnifyingGlass|_ | |MarkRomanBadges|_

   .. image:: https://raw.githubusercontent.com/mmore500/outset/481089653d858f14e636c3757df4927783bd5d23/docs/assets/callout-mark-glyphs.png
      :alt: comparison of available glyphs

   *These mark glyphs can also be used directly, independently of the rest of the library!*

.. |MarkAlphabeticalBadges| replace:: ``outset.mark.MarkAlphabeticalBadges``
.. _MarkAlphabeticalBadges: https://mmore500.com/outset/_autosummary/outset.mark.MarkAlphabeticalBadges.html

.. |MarkArrow| replace:: ``outset.mark.MarkArrow``
.. _MarkArrow: https://mmore500.com/outset/_autosummary/outset.mark.MarkArrow.html

.. |MarkInlaidAsterisk| replace:: ``outset.mark.MarkInlaidAsterisk``
.. _MarkInlaidAsterisk: https://mmore500.com/outset/_autosummary/outset.mark.MarkInlaidAsterisk.html

.. |MarkMagnifyingGlass| replace:: ``outset.mark.MarkMagnifyingGlass``
.. _MarkMagnifyingGlass: https://mmore500.com/outset/_autosummary/outset.mark.MarkMagnifyingGlass.html

.. |MarkRomanBadges| replace:: ``outset.mark.MarkRomanBadges``
.. _MarkRomanBadges: https://mmore500.com/outset/_autosummary/outset.mark.MarkRomanBadges.html

*Callout tweaks:* customize how marquee callouts are shaped and positioned; pass as ``leader_tweak`` kwarg

   * |TweakReflect|_: flip callouts left-right/up-down
   * |TweakSpreadArea|_: spread callout glyphs apart to resolve overlaps

.. |TweakReflect| replace:: ``outset.mark.TweakReflect``
.. _TweakReflect: https://mmore500.com/outset/_autosummary/outset.tweak.TweakReflect.html

.. |TweakSpreadArea| replace:: ``outset.mark.TweakSpreadArea``
.. _TweakSpreadArea: https://mmore500.com/outset/_autosummary/outset.tweak.TweakSpreadArea.html


Citing
------

If outset is used in a scholarly work, please cite it as

    Matthew Andres Moreno. (2023). mmore500/outset. Zenodo. https://doi.org/10.5281/zenodo.10426106

.. code:: bibtex

    @software{moreno2023outset,
      author = {Matthew Andres Moreno},
      title = {mmore500/outset},
      month = dec,
      year = 2023,
      publisher = {Zenodo},
      doi = {10.5281/zenodo.10426106},
      url = {https://doi.org/10.5281/zenodo.10426106}
    }

Consider also citing `matplotlib `__ and `seaborn `__ .
And don't forget to leave a `star on GitHub `__!

Contributing
------------

This project welcomes contributions and suggestions.
Documentation includes `detailed information to get you started `__.

.. |PyPi| image:: https://img.shields.io/pypi/v/outset.svg
   :target: https://pypi.python.org/pypi/outset
.. |CI| image:: https://github.com/mmore500/outset/actions/workflows/CI.yml/badge.svg
   :target: https://github.com/mmore500/outset/actions
.. |Deploy Sphinx documentation to Pages| image:: https://github.com/mmore500/outset/actions/workflows/sphinx.yml/badge.svg
   :target: https://github.com/mmore500/outset/actions/workflows/sphinx.yml
.. |GitHub stars| image:: https://img.shields.io/github/stars/mmore500/outset.svg?style=round-square&logo=github&label=Stars&logoColor=white
   :target: https://github.com/mmore500/outset
.. |zenodo| image:: https://zenodo.org/badge/729401509.svg
   :target: https://zenodo.org/doi/10.5281/zenodo.10426106
.. |docs| image:: https://img.shields.io/badge/pages%20-%20docs%20-%20fedcba?logo=github
   :target: https://mmore500.com/outset

Owner

  • Name: Matthew Andres Moreno
  • Login: mmore500
  • Kind: user
  • Location: East Lansing, MI
  • Company: @devosoft

doctoral student, Computer Science and Engineering at Michigan State University

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use this software, please cite it as below."
title: 'outset: a Python library for multi-scale visualization'
abstract: "Add zoom indicators, insets, and magnified panels to matplotlib/seaborn visualizations with ease!"
authors:
- family-names: Moreno
  given-names: Matthew Andres
  orcid: 0000-0003-4726-4479
date-released: 2023-12-22
doi: 10.5281/zenodo.10426106
license: MIT
repository-code: https://github.com/mmore500/outset
url: "https://github.com/mmore500/outset"
version: v0.1.1

GitHub Events

Total
  • Watch event: 4
Last Year
  • Watch event: 4

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 331
  • Total Committers: 2
  • Avg Commits per committer: 165.5
  • Development Distribution Score (DDS): 0.045
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Matthew Andres Moreno m****g@g****m 316
dependabot[bot] 4****] 15

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 14
  • Total pull requests: 38
  • Average time to close issues: 1 day
  • Average time to close pull requests: 1 day
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 1.07
  • Average comments per pull request: 2.16
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 38
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mmore500 (13)
Pull Request Authors
  • dependabot[bot] (48)
Top Labels
Issue Labels
Pull Request Labels
dependencies (48) python (44) github_actions (4)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 451 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 218
  • Total maintainers: 1
pypi.org: outset

add zoom indicators, insets, and magnified panels to matplotlib/seaborn visualizations with ease!

  • Versions: 218
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 451 Last month
Rankings
Forks count: 5.1%
Stargazers count: 5.6%
Downloads: 7.1%
Average: 9.9%
Dependent packages count: 10.1%
Dependent repos count: 21.5%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/CI.yml actions
.github/workflows/publish.yml actions
.github/workflows/schedule-update-actions.yml actions
  • actions/checkout v4.1.1 composite
  • saadmk11/github-actions-version-updater v0.8.1 composite
.github/workflows/semantic-pr-check.yml actions
  • amannn/action-semantic-pull-request v5.4.0 composite
.github/workflows/sphinx.yml actions
  • sphinx-notes/pages v3 composite
.github/workflows/template-sync.yml actions
  • actions/checkout v4.1.1 composite
  • euphoricsystems/action-sync-template-repository v2.5.1 composite
.devcontainer/Dockerfile docker
  • mcr.microsoft.com/devcontainers/python 3 build
pyproject.toml pypi
docs/requirements.in pypi
  • IPython *
  • OWSLib *
  • cartopy *
  • ipython-genutils *
  • matplotlib *
  • nbsphinx *
  • numpy *
  • pandas *
  • pykdtree *
  • scipy *
  • seaborn *
  • sphinx *
  • sphinx-copybutton *
  • sphinx-rtd-theme *
docs/requirements.txt pypi
  • alabaster ==0.7.13
  • asttokens ==2.4.1
  • attrs ==23.1.0
  • babel ==2.14.0
  • bleach ==6.1.0
  • cartopy ==0.22.0
  • certifi ==2023.11.17
  • charset-normalizer ==3.3.2
  • comm ==0.2.0
  • contourpy ==1.2.0
  • cycler ==0.12.1
  • debugpy ==1.8.0
  • decorator ==5.1.1
  • defusedxml ==0.7.1
  • docutils ==0.20.1
  • entrypoints ==0.4
  • exceptiongroup ==1.2.0
  • executing ==2.0.1
  • fastjsonschema ==2.19.0
  • fonttools ==4.47.0
  • idna ==3.6
  • imagesize ==1.4.1
  • ipykernel ==6.27.1
  • ipython ==8.18.1
  • ipython-genutils ==0.2.0
  • jedi ==0.19.1
  • jinja2 ==3.0.3
  • jsonschema ==4.20.0
  • jsonschema-specifications ==2023.11.2
  • jupyter-client ==8.6.0
  • jupyter-core ==5.5.1
  • jupyterlab-pygments ==0.3.0
  • kiwisolver ==1.4.5
  • lxml ==4.9.4
  • markupsafe ==2.1.3
  • matplotlib ==3.8.2
  • matplotlib-inline ==0.1.6
  • mistune ==0.8.4
  • nbclient ==0.5.13
  • nbconvert ==6.4.2
  • nbformat ==5.9.2
  • nbsphinx ==0.9.3
  • nest-asyncio ==1.5.8
  • numpy ==1.26.2
  • owslib ==0.29.3
  • packaging ==23.2
  • pandas ==2.1.4
  • pandocfilters ==1.5.0
  • parso ==0.8.3
  • pexpect ==4.9.0
  • pillow ==10.1.0
  • platformdirs ==4.1.0
  • prompt-toolkit ==3.0.43
  • psutil ==5.9.7
  • ptyprocess ==0.7.0
  • pure-eval ==0.2.2
  • pygments ==2.17.2
  • pykdtree ==1.3.10
  • pypandoc-binary ==1.12
  • pyparsing ==3.1.1
  • pyproj ==3.6.1
  • pyshp ==2.3.1
  • python-dateutil ==2.8.2
  • pytz ==2023.3.post1
  • pyyaml ==6.0.1
  • pyzmq ==25.1.2
  • referencing ==0.32.0
  • requests ==2.31.0
  • rpds-py ==0.15.2
  • scipy ==1.11.4
  • seaborn ==0.13.0
  • shapely ==2.0.2
  • six ==1.16.0
  • snowballstemmer ==2.2.0
  • sphinx ==7.2.6
  • sphinx-copybutton ==0.5.2
  • sphinx-rtd-theme ==2.0.0
  • sphinxcontrib-applehelp ==1.0.7
  • sphinxcontrib-devhelp ==1.0.5
  • sphinxcontrib-htmlhelp ==2.0.4
  • sphinxcontrib-jquery ==4.1
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==1.0.6
  • sphinxcontrib-serializinghtml ==1.1.9
  • stack-data ==0.6.3
  • testpath ==0.6.0
  • tornado ==6.4
  • traitlets ==5.14.0
  • tzdata ==2023.3
  • urllib3 ==2.1.0
  • wcwidth ==0.2.12
  • webencodings ==0.5.1