Skip to main content

A plotting package for the Mathematics 1 course at the Technical University of Denmark

Project description

dtumathtools

Description

This package is a collection of easy-to-use commands for plotting using SymPy. It is designed to fit the requirements of the Mathematics 1 course at the Technical University of Denmark. This includes, but is not limited to:

  • Plotting of vector fields and vectors
  • 2D plotting of SymPy functions
  • 3D plotting of SymPy functions
  • Scatterplots in 2D and 3D

The plotting functions are an extension of sympy-plot-backends, and so documentation and examples of plots (for all functions but dtuplot.scatter() and dtuplot.quiver()) can be found at sympy-plot-backends.readthedocs.io/. Additional functionality and usage is given through course material.

Installation

To install dtumathtools using PyPi, run the following command

pip install dtumathtools

Then one can import all the utility by writing

from dtumathtools import *

All plotting functionality can be found using dtuplot.xxx (including all spb plotting functions).

Usage

Use is designed for the Mathematics 1 course at the Technical University of Denmark. Any use-case outside this scope is thus not considered, but very welcome!

Backends

Multiple different backends (plotting libraries) can be used (especially helpful for some 3D plots). Currently, Matplotlib (MB), Plotly (PB), Bokeh (BB, 2D only), and K3D-Jupyter (KB, 3D only) are supported (Mayavi (MAB, 3D only) might be supported in the future). The user can change the backend for a plot using the backend keyword argument (eg. backend=dtuplot.PB), or change the default (here for 3D, but similar for 2D) using:

dtuplot.cfg["backend_3D"] = "plotly"
dtuplot.set_defaults(dtuplot.cfg)

For further descriptions of the strengths and benefits of each, see this page.

Contributing

You are very welcome to contribute in the way that makes sense to you! The development team will consider all pull requests at the repo here. For changes to plotting functionality outside scatter and quiver, direct queries to spb.

Authors and acknowledgment

The project would have never gotten off the ground without Jakob Lemvig and his engagement with SymPy in Mathematics 1. Thank you to Ulrik Engelund Pedersen for trusting us with this task. Finally, a huge thanks to the professors of the course for making great and engaging education: Michael Pedersen and Karsten Schmidt.

License

Open-source under the BSD license. This means that you are free to use it whatever you like, be it academic, commercial, creating forks or derivatives, as long as you copy the BSD statement if you redistribute it (see the LICENSE file for details).

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

dtumathtools-2024.2.0.tar.gz (32.7 kB view details)

Uploaded Source

Built Distribution

dtumathtools-2024.2.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file dtumathtools-2024.2.0.tar.gz.

File metadata

  • Download URL: dtumathtools-2024.2.0.tar.gz
  • Upload date:
  • Size: 32.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for dtumathtools-2024.2.0.tar.gz
Algorithm Hash digest
SHA256 a54345d962d78cfd50695c2a519fcb9bdeba533f55606bb570ca9f2c3203069b
MD5 7220c3e9ba8d82e6202f7289d9f8681e
BLAKE2b-256 9cc613f5fbf4d200123bbc40eb3e2c6a3c780071319f465326dc7228e54831d8

See more details on using hashes here.

File details

Details for the file dtumathtools-2024.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dtumathtools-2024.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 201fba333b248982e80a08b4feacc628eae6e463d5740f7a865db914d9e7d713
MD5 ee7a812906a4aade1ed94554faeb8cef
BLAKE2b-256 e4978f7e80657b745c04ec2266b7fff14dc242a5a79306e290de79f0a3dadabe

See more details on using hashes here.

Supported by

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