Skip to main content

Backends for plotting with SymPy

Project description

Sympy Plotting Backends

PyPI version Conda Version Documentation Status Coverage

This module contains a few plotting backends that can be used with SymPy and Numpy. A backend represents the plotting library: it provides the necessary functionalities to quickly and easily plot the most common types of symbolic expressions (line plots, surface plots, parametric plots, vector plots, complex plots, control system plots).

The following plotting libraries are supported: Matplolib, Plotly, Bokeh, K3D-Jupyter.

What's new in comparison to SymPy

On top of the usual plotting functions exposed by SymPy (plot, plot_parametric, plot3d, etc.), this module offers the capabily to:

  • use a different plotting library.
  • visualize discontinuities on 2D line plots.
  • visualize 2D/3D vector fields with quivers or streamlines.
  • visualize complex functions with domain coloring.
  • visualize entities from the sympy.geometry module.
  • visualize control systems' response to input signals, root locus, as well as Bode, Nyquist and Nichols diagrams.
  • create parametric-interactive plots using widgets (sliders, buttons, etc.) with ipywidgets or Holoviz's Panel.
  • create animations.

Please, read the following documentation page to understand the differences between this module and sympy.plotting.

Development and Support

If you feel like a feature could be implemented, open an issue or create a PR.

If you really want a new feature but you don't have the capabilities or the time to make it work, I'm willing to help; but first, open an issue or send me an email so that we can discuss a sponsorship strategy.

Developing this module and its documentation was no easy job. Implementing new features and fixing bugs requires time and energy too. If you found this module useful and would like to show your appreciation, please consider sponsoring this project with either one of these options:

"Buy Me A Coffee" or

Installation

SymPy Plotting Backends can be installed with pip or conda. By default, only basic plotting with Matplotlib will be installed:

pip install sympy_plot_backends

Or

conda install -c conda-forge sympy_plot_backends

To install the complete requirements in order to get interactive plots, bokeh, plotly, k3d, vtk, execute the following command:

pip install sympy_plot_backends[all]

If you are using zshell, the above pip command is going to fail. Use the following instead:

pip install "sympy_plot_backends[all]"

Or, if you are using conda:

conda install -c anaconda scipy notebook colorcet
conda install -c conda-forge adaptive
conda install -c conda-forge panel
conda install -c anaconda ipywidgets
conda install -c conda-forge ipympl
conda install -c bokeh ipywidgets_bokeh
conda install -c conda-forge k3d msgpack-python
conda install -c plotly plotly
conda install -c conda-forge vtk
conda install -c conda-forge control slycot

Warnings

Some backend comes with a memory cost. Since they require external libraries and/or open a server-process in order to visualize the data, memory usage can quickly rise if we are showing many plots. Keep an eye on you system monitor and act accordingly (close the kernels, restart the browser, etc.).

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

sympy_plot_backends-4.0.0.tar.gz (471.3 kB view details)

Uploaded Source

Built Distribution

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

sympy_plot_backends-4.0.0-py3-none-any.whl (379.0 kB view details)

Uploaded Python 3

File details

Details for the file sympy_plot_backends-4.0.0.tar.gz.

File metadata

  • Download URL: sympy_plot_backends-4.0.0.tar.gz
  • Upload date:
  • Size: 471.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for sympy_plot_backends-4.0.0.tar.gz
Algorithm Hash digest
SHA256 1a6c21f060b4cfa3d1ba1f07ae8bfd678107ba5a28a5abf475a63a59ba692014
MD5 0cfce4bb95123b2e424d9a17cc7f7874
BLAKE2b-256 2e541f64dba745425a4c14db4536add1cb1a5a2c5dac6b309b5a95231b0b8fc8

See more details on using hashes here.

File details

Details for the file sympy_plot_backends-4.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sympy_plot_backends-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb2d0a3f32c39f74ab817a4e2cb6a87f261c7c386266609eafc3383b69ad575a
MD5 0d1c628a81b5e70f31c8f829ce636355
BLAKE2b-256 6a4d931bf3735583f6490c814b3f84dcb4d0129250d224032f9b06201e2a7dfc

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