Automatically generates textbook graphs for mathematical functions.
Project description
mathplot
mathplot is a Python package to automatically create textbook graphs of mathematical functions.
Basic examples
Example 1
import plotmath
def f(x):
return x**2 - x - 2
fix, ax = plotmath.plot(
functions=[f],
)
plotmath.savefig(
dirname="../figures",
fname="example_1.svg",
)
plotmath.show()
This will generate the following figure:
Example 2
import plotmath
import numpy as np
def f(x):
return x**2 * np.cos(x)
fix, ax = plotmath.plot(
functions=[f],
xmin=-6,
xmax=6,
ymin=-12,
ymax=8,
)
plotmath.savefig(
dirname="../figures",
fname="example_2.svg",
)
plotmath.show()
This will generate the following figure:
Example 3
import plotmath
def f(x):
return x**2 - 4
def g(x):
return x + 2
fix, ax = plotmath.plot(
functions=[f, g],
xmin=-6,
xmax=6,
ymin=-6,
ymax=6,
)
plotmath.savefig(
dirname="../figures",
fname="example_3.svg",
)
plotmath.show()
This will generate the following figure:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
plotmath-0.2.21.tar.gz
(4.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plotmath-0.2.21.tar.gz.
File metadata
- Download URL: plotmath-0.2.21.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3d0024d6472ec6eba86d9cecaf39165d596d6fea1692912bec98693826d5af5
|
|
| MD5 |
2bcb78fe40e750941a034a69846b9679
|
|
| BLAKE2b-256 |
e4457910ed2695f6e9c2a3a1c1ac1fb7d5facf3a82b82faf5bc017dbb24ee719
|
File details
Details for the file plotmath-0.2.21-py3-none-any.whl.
File metadata
- Download URL: plotmath-0.2.21-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45ccac1dbdda32d46a8afa6ec9900419df8f1ca6c716a18220d7d97ea2631367
|
|
| MD5 |
002e3c0e24eb93be652929752dc26cf7
|
|
| BLAKE2b-256 |
93b9b25f0c6b14fa012f864b223b556fefc5a1c6623b44d7deb57d00d76b0d66
|