quadplots


Namequadplots JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
SummaryCreate animations of simple numerical integration methods.
upload_time2024-05-01 14:46:51
maintainerNone
docs_urlNone
authorChris Copley
requires_python>=3.10
licenseNone
keywords simpson's rule trapezoidal rule riemann sum visualization graph quadrature
VCS
bugtrack_url
requirements antlr4-python3-runtime build bumpver certifi cffi charset-normalizer click colorama contourpy cryptography cycler docutils fonttools idna importlib-metadata jaraco-classes jaraco-context jaraco-functools jeepney keyring kiwisolver lexid looseversion markdown-it-py matplotlib mdurl more-itertools mpmath mypy mypy-extensions nh3 numpy packaging pillow pkginfo pycparser pygments pyparsing pyproject-hooks python-dateutil readme-renderer requests requests-toolbelt rfc3986 rich secretstorage six sympy toml twine typing-extensions urllib3 uv zipp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # quadplots

The `quadplots` program is an educational utility to create visualizations of basic quadrature methods. The current methods supported are Riemann sum (left, right, mid, max, min), Trapezoid rule, and Simpson's rule.

## Usage

Basic usage of quadplots only requires an expression you want to graph (must be valid python), and the start and end points.

```
quadplots "x**2 - 3*x + 1" -2 3 
```

![](https://github.com/CopOnTheRun/quadplots/raw/main/images/basic_example.svg)

By default quadplots will graph a riemann sum with n=10 and use the midpoint method, but you can easily change these options.

```
quadplots "x**2 - 3*x + 1" -2 3 --method min --partitions 5
```


![](https://github.com/CopOnTheRun/quadplots/raw/main/images/min_example.svg)

You can also change the type of quadrature method used

```
quadplots "x**3 - 8*x + 7" -2 3 --method min --partitions 4 --quad-type simpson 
```
![](https://github.com/CopOnTheRun/quadplots/raw/main/images/simpson_example.svg)

If you want, instead of python functions, you can write latex by adding the `--latex` flag to the command.

```
quadplots "\exp{-x^{2}}" -2 4 --partitions 4 --quad_type simpson --latex
```
![](https://github.com/CopOnTheRun/quadplots/raw/main/images/latex_example.svg)

Finally, if you wish to animate the plot, you can pass `--animate` with a list of partitions you would like to see at each frame.

```
quadplots "\exp{-x^{2}}" -2 4 --partitions 4 --quad_type simpson --latex --animate 2 4 6 10 100
```
![](https://github.com/CopOnTheRun/quadplots/raw/main/images/animation_example.gif)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "quadplots",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "Simpson's Rule, Trapezoidal rule, Riemann Sum, Visualization, Graph, Quadrature",
    "author": "Chris Copley",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5e/8d/a5ddd08230caa52e97570597ec162e11f4adb51c432ce934a19a237a07a5/quadplots-1.0.3.tar.gz",
    "platform": null,
    "description": "# quadplots\n\nThe `quadplots` program is an educational utility to create visualizations of basic quadrature methods. The current methods supported are Riemann sum (left, right, mid, max, min), Trapezoid rule, and Simpson's rule.\n\n## Usage\n\nBasic usage of quadplots only requires an expression you want to graph (must be valid python), and the start and end points.\n\n```\nquadplots \"x**2 - 3*x + 1\" -2 3 \n```\n\n![](https://github.com/CopOnTheRun/quadplots/raw/main/images/basic_example.svg)\n\nBy default quadplots will graph a riemann sum with n=10 and use the midpoint method, but you can easily change these options.\n\n```\nquadplots \"x**2 - 3*x + 1\" -2 3 --method min --partitions 5\n```\n\n\n![](https://github.com/CopOnTheRun/quadplots/raw/main/images/min_example.svg)\n\nYou can also change the type of quadrature method used\n\n```\nquadplots \"x**3 - 8*x + 7\" -2 3 --method min --partitions 4 --quad-type simpson \n```\n![](https://github.com/CopOnTheRun/quadplots/raw/main/images/simpson_example.svg)\n\nIf you want, instead of python functions, you can write latex by adding the `--latex` flag to the command.\n\n```\nquadplots \"\\exp{-x^{2}}\" -2 4 --partitions 4 --quad_type simpson --latex\n```\n![](https://github.com/CopOnTheRun/quadplots/raw/main/images/latex_example.svg)\n\nFinally, if you wish to animate the plot, you can pass `--animate` with a list of partitions you would like to see at each frame.\n\n```\nquadplots \"\\exp{-x^{2}}\" -2 4 --partitions 4 --quad_type simpson --latex --animate 2 4 6 10 100\n```\n![](https://github.com/CopOnTheRun/quadplots/raw/main/images/animation_example.gif)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Create animations of simple numerical integration methods.",
    "version": "1.0.3",
    "project_urls": {
        "Issues": "https://github.com/CopOnTheRun/quadplots/issues",
        "Repository": "https://github.com/CopOnTheRun/quadplots"
    },
    "split_keywords": [
        "simpson's rule",
        " trapezoidal rule",
        " riemann sum",
        " visualization",
        " graph",
        " quadrature"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1b9676c0a1b7141271181355bbc9a86f9354021cc2bbdbd4946838593c6ce7a9",
                "md5": "d3d475bd99825124656711155826fe74",
                "sha256": "d8d190ef07eab1f97a8853b5198cb79c34cbd88e890e92cd8003da4739fcc224"
            },
            "downloads": -1,
            "filename": "quadplots-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d3d475bd99825124656711155826fe74",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 10991,
            "upload_time": "2024-05-01T14:46:50",
            "upload_time_iso_8601": "2024-05-01T14:46:50.445240Z",
            "url": "https://files.pythonhosted.org/packages/1b/96/76c0a1b7141271181355bbc9a86f9354021cc2bbdbd4946838593c6ce7a9/quadplots-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e8da5ddd08230caa52e97570597ec162e11f4adb51c432ce934a19a237a07a5",
                "md5": "346d85af36c6fb0d81da0fca77af0bfe",
                "sha256": "7a18c8d206f507dcd023e29be7de391699d29db4af1f26a3294e9ff771537004"
            },
            "downloads": -1,
            "filename": "quadplots-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "346d85af36c6fb0d81da0fca77af0bfe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 10662,
            "upload_time": "2024-05-01T14:46:51",
            "upload_time_iso_8601": "2024-05-01T14:46:51.611235Z",
            "url": "https://files.pythonhosted.org/packages/5e/8d/a5ddd08230caa52e97570597ec162e11f4adb51c432ce934a19a237a07a5/quadplots-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-01 14:46:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CopOnTheRun",
    "github_project": "quadplots",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "antlr4-python3-runtime",
            "specs": [
                [
                    "==",
                    "4.11.0"
                ]
            ]
        },
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "1.2.1"
                ]
            ]
        },
        {
            "name": "bumpver",
            "specs": [
                [
                    "==",
                    "2023.1129"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2024.2.2"
                ]
            ]
        },
        {
            "name": "cffi",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.3.2"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.7"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    "==",
                    "0.4.6"
                ]
            ]
        },
        {
            "name": "contourpy",
            "specs": [
                [
                    "==",
                    "1.2.1"
                ]
            ]
        },
        {
            "name": "cryptography",
            "specs": [
                [
                    "==",
                    "42.0.5"
                ]
            ]
        },
        {
            "name": "cycler",
            "specs": [
                [
                    "==",
                    "0.12.1"
                ]
            ]
        },
        {
            "name": "docutils",
            "specs": [
                [
                    "==",
                    "0.21.2"
                ]
            ]
        },
        {
            "name": "fonttools",
            "specs": [
                [
                    "==",
                    "4.51.0"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.7"
                ]
            ]
        },
        {
            "name": "importlib-metadata",
            "specs": [
                [
                    "==",
                    "7.1.0"
                ]
            ]
        },
        {
            "name": "jaraco-classes",
            "specs": [
                [
                    "==",
                    "3.4.0"
                ]
            ]
        },
        {
            "name": "jaraco-context",
            "specs": [
                [
                    "==",
                    "5.3.0"
                ]
            ]
        },
        {
            "name": "jaraco-functools",
            "specs": [
                [
                    "==",
                    "4.0.1"
                ]
            ]
        },
        {
            "name": "jeepney",
            "specs": [
                [
                    "==",
                    "0.8.0"
                ]
            ]
        },
        {
            "name": "keyring",
            "specs": [
                [
                    "==",
                    "25.2.0"
                ]
            ]
        },
        {
            "name": "kiwisolver",
            "specs": [
                [
                    "==",
                    "1.4.5"
                ]
            ]
        },
        {
            "name": "lexid",
            "specs": [
                [
                    "==",
                    "2021.1006"
                ]
            ]
        },
        {
            "name": "looseversion",
            "specs": [
                [
                    "==",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "markdown-it-py",
            "specs": [
                [
                    "==",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    "==",
                    "3.8.4"
                ]
            ]
        },
        {
            "name": "mdurl",
            "specs": [
                [
                    "==",
                    "0.1.2"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "10.2.0"
                ]
            ]
        },
        {
            "name": "mpmath",
            "specs": [
                [
                    "==",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    "==",
                    "1.10.0"
                ]
            ]
        },
        {
            "name": "mypy-extensions",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "nh3",
            "specs": [
                [
                    "==",
                    "0.2.17"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.26.4"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "24.0"
                ]
            ]
        },
        {
            "name": "pillow",
            "specs": [
                [
                    "==",
                    "10.3.0"
                ]
            ]
        },
        {
            "name": "pkginfo",
            "specs": [
                [
                    "==",
                    "1.10.0"
                ]
            ]
        },
        {
            "name": "pycparser",
            "specs": [
                [
                    "==",
                    "2.22"
                ]
            ]
        },
        {
            "name": "pygments",
            "specs": [
                [
                    "==",
                    "2.17.2"
                ]
            ]
        },
        {
            "name": "pyparsing",
            "specs": [
                [
                    "==",
                    "3.1.2"
                ]
            ]
        },
        {
            "name": "pyproject-hooks",
            "specs": [
                [
                    "==",
                    "1.1.0"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.9.0.post0"
                ]
            ]
        },
        {
            "name": "readme-renderer",
            "specs": [
                [
                    "==",
                    "43.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "requests-toolbelt",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "rfc3986",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "==",
                    "13.7.1"
                ]
            ]
        },
        {
            "name": "secretstorage",
            "specs": [
                [
                    "==",
                    "3.3.3"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "sympy",
            "specs": [
                [
                    "==",
                    "1.12"
                ]
            ]
        },
        {
            "name": "toml",
            "specs": [
                [
                    "==",
                    "0.10.2"
                ]
            ]
        },
        {
            "name": "twine",
            "specs": [
                [
                    "==",
                    "5.0.0"
                ]
            ]
        },
        {
            "name": "typing-extensions",
            "specs": [
                [
                    "==",
                    "4.11.0"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "2.2.1"
                ]
            ]
        },
        {
            "name": "uv",
            "specs": [
                [
                    "==",
                    "0.1.39"
                ]
            ]
        },
        {
            "name": "zipp",
            "specs": [
                [
                    "==",
                    "3.18.1"
                ]
            ]
        }
    ],
    "lcname": "quadplots"
}
        
Elapsed time: 0.25124s