# `mathplot`
`mathplot` is a Python package to automatically create textbook graphs of mathematical functions.
## Basic examples
### Example 1
```python
import plotmath
def f(x):
return x**2 - x - 2
fix, ax = plotmath.make_figure(
functions=[f],
)
plotmath.savefig(
dirname="../figures",
fname="example_1.svg",
)
plotmath.show()
```
This will generate the following figure:

### Example 2
```python
import plotmath
import numpy as np
def f(x):
return x**2 * np.cos(x)
fix, ax = plotmath.make_figure(
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
```python
import plotmath
def f(x):
return x**2 - 4
def g(x):
return x + 2
fix, ax = plotmath.make_figure(
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:

Raw data
{
"_id": null,
"home_page": "https://github.com/reneaas/plotmath",
"name": "plotmath",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Ren\u00e9 Alexander Ask",
"author_email": "rene.ask@icloud.com",
"download_url": "https://files.pythonhosted.org/packages/3a/5b/2a86af88ad079594d556087734961a5a4cc3049deedaf2e3aa633d88aca5/plotmath-0.1.8.tar.gz",
"platform": null,
"description": "# `mathplot`\n`mathplot` is a Python package to automatically create textbook graphs of mathematical functions. \n\n## Basic examples\n\n### Example 1\n\n```python\nimport plotmath\n\n\ndef f(x):\n return x**2 - x - 2\n\n\nfix, ax = plotmath.make_figure(\n functions=[f],\n)\n\nplotmath.savefig(\n dirname=\"../figures\",\n fname=\"example_1.svg\",\n)\n\nplotmath.show()\n```\n\nThis will generate the following figure:\n\n\n\n### Example 2\n\n```python\nimport plotmath\nimport numpy as np\n\n\ndef f(x):\n return x**2 * np.cos(x)\n\n\nfix, ax = plotmath.make_figure(\n functions=[f],\n xmin=-6,\n xmax=6,\n ymin=-12,\n ymax=8,\n)\n\nplotmath.savefig(\n dirname=\"../figures\",\n fname=\"example_2.svg\",\n)\n\nplotmath.show()\n```\n\nThis will generate the following figure:\n\n\n\n### Example 3\n\n```python\nimport plotmath\n\n\ndef f(x):\n return x**2 - 4\n\n\ndef g(x):\n return x + 2\n\n\nfix, ax = plotmath.make_figure(\n functions=[f, g],\n xmin=-6,\n xmax=6,\n ymin=-6,\n ymax=6,\n)\n\nplotmath.savefig(\n dirname=\"../figures\",\n fname=\"example_3.svg\",\n)\n\nplotmath.show()\n```\n\nThis will generate the following figure:\n\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Automatically generates textbook graphs for mathematical functions.",
"version": "0.1.8",
"project_urls": {
"Homepage": "https://github.com/reneaas/plotmath"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6cc6796745b0d32d366f1670c84a81816648b758f8ab30fb7e333bb8da9fedab",
"md5": "744b168d18771c3fca4af24a26625208",
"sha256": "19a2621acdbb5f9bf0ce45fe40cfb137b9c153ce4a101f0bf0cbca4b4c08527d"
},
"downloads": -1,
"filename": "plotmath-0.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "744b168d18771c3fca4af24a26625208",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 4203,
"upload_time": "2024-10-26T15:30:18",
"upload_time_iso_8601": "2024-10-26T15:30:18.160777Z",
"url": "https://files.pythonhosted.org/packages/6c/c6/796745b0d32d366f1670c84a81816648b758f8ab30fb7e333bb8da9fedab/plotmath-0.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3a5b2a86af88ad079594d556087734961a5a4cc3049deedaf2e3aa633d88aca5",
"md5": "09afb89c7230da46d74c24f44d5d73b9",
"sha256": "7b279367a2958146d8c1cce24660684db970cf6a5af19a250b44feeb7e8ed7e2"
},
"downloads": -1,
"filename": "plotmath-0.1.8.tar.gz",
"has_sig": false,
"md5_digest": "09afb89c7230da46d74c24f44d5d73b9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 4016,
"upload_time": "2024-10-26T15:30:19",
"upload_time_iso_8601": "2024-10-26T15:30:19.663066Z",
"url": "https://files.pythonhosted.org/packages/3a/5b/2a86af88ad079594d556087734961a5a4cc3049deedaf2e3aa633d88aca5/plotmath-0.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-26 15:30:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "reneaas",
"github_project": "plotmath",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "plotmath"
}