Commit 00f8e3e7 authored by Duggan, John's avatar Duggan, John
Browse files

Merge branch '65-add-webagg-widget-for-matplotlib' into 'main'

Add WebAgg widget for matplotlib

Closes #65

See merge request ndip/public-packages/nova-trame!51
parents b4d981dd b5fa9acf
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ build:
    # golang: "1.20"
  jobs:
    post_create_environment:
      - pip install altair sphinx-rtd-theme==3.0.0rc3
      - pip install altair sphinx-rtd-theme==3.0.2
      - pip install .

# Build documentation in the "docs/" directory with Sphinx
+4 −0
Original line number Diff line number Diff line
@@ -42,6 +42,10 @@ View Components
    :members:
    :special-members: __init__

.. autoclass:: nova.trame.view.components.visualization.MatplotlibFigure
    :members:
    :special-members: __init__

.. autoclass:: nova.trame.view.utilities.local_storage.LocalStorageManager
    :members:
    :special-members: __init__
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ Trame provides integrations with several libraries for 2D and 3D visualization.

For most use cases, we recommend that you use `Plotly <https://plotly.com/python/>`_. Kitware provides examples of how to integrate with Trame on `GitHub <https://github.com/Kitware/trame-plotly>`_.

If you have existing Matplotlib code, then Kitware also provides a `Matplotlib <https://github.com/Kitware/trame-matplotlib>`_ integration.
If you have existing Matplotlib code, then we recommend you use `our MatplotlibFigure component <https://nova-application-development.readthedocs.io/projects/nova-trame/en/latest/api.html#nova.trame.view.components.visualization.MatplotlibFigure>`_. Kitware provides a direct `Matplotlib integration <https://github.com/Kitware/trame-matplotlib>`_ with Trame, but it is restricted to performing client-side rendering via SVG. Our component allows you to opt into using the `WebAgg backend <https://matplotlib.org/stable/users/explain/figure/backends.html#interactive-backends>`_ for Matplotlib.

If you need to capture complex interactions with your 2D plot, then you can use `Vega-Altair <https://altair-viz.github.io/>`_ along with our :ref:`Interactive2DPlot <api_interactive2dplot>` component.

+1358 −777

File changed.

Preview size limit exceeded, changes collapsed.

+5 −1
Original line number Diff line number Diff line
[tool.poetry]
name = "nova-trame"
version = "0.15.0"
version = "0.16.0"
description = "A Python Package for injecting curated themes and custom components into Trame applications"
authors = ["Duggan, John <dugganjw@ornl.gov>"]
readme = "README.md"
@@ -10,11 +10,15 @@ packages = [{include = "nova", from = "src"}]


[tool.poetry.dependencies]
altair = "*"
libsass = "*"
mergedeep = "*"
python = ">=3.10,<4.0"
tomli = "*"
tornado = "*"
trame = "*"
trame-matplotlib = "*"
trame-plotly = "*"
trame-vega = "*"
trame-vuetify = "*"
nova-mvvm = "*"
Loading