pyEPVis


NamepyEPVis JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/AAbhijithA/pyEPVis
SummaryA Expression and Particle movement visualizer package
upload_time2023-09-21 14:34:58
maintainer
docs_urlNone
authorAbhijith Ajith
requires_python>=3.9.2
license
keywords particle expression expression visualizer particle movement visualizer animation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyEPVis
A package that allows you to easily visualize single or two variable functions and allows you to visualize particle/point movements along two or three Dimensions with an interactive plotly visualization.

## Used for Development
![Python](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue)![NumPy](https://img.shields.io/badge/Numpy-777BB4?style=for-the-badge&logo=numpy&logoColor=white)![Plotly](https://img.shields.io/badge/Plotly-239120?style=for-the-badge&logo=plotly&logoColor=white)

## Using the package

Install the package using the command
```
pip install pyEPVis
```
### Visualizing Single Variable Functions
```
"""
This function takes a string and evaluates it as a function of x i.e. f(x) and plots a graph for the function.
    Args:
        ----Required Arguments----
        formula (string): formula in terms of x and y for the function f(x)
        xstart (float): starting extreme of x value to evaluate f(x) from
        xend (float): ending extreme of x value to evaluate f(x) to
        step (float): incrementation to continuously evaluate f(x) with i.e. (x +/- step)
        ----Optional Arguments----
        color (string): Default 'lime'
        width (float): Default 2, width of the curve
        title (string): Default to the formula parameter, title of the plot
        xtitle (string): Default to 'X-axis', x-axis title
        ytitle (string): Default to 'Y-axis', y-axis title
    Returns:
        plotly.graph_objects.Figure
    Raises:
        StepsError: step must be higher than 0
        xIntervalError: xend is lesser than xstart
        Other Errors such as invalid evaluation
        wrong argument passed as colorscale
    Note:
        [Assuming the output is given to a variable fig]
        The graph can be shown using the output with fig.show()
        The graph can be further modified using fig.update_layout, refer here: https://plotly.com/python/reference/layout/
"""
from pyEPVis import do_fx_plot
do_fx_plot(formula = "x**4 - 10*(x**3) - 2*(x**2) - 5*x + 4",xstart = -100,xend = 100,step = 1, color = "steelblue").show()
```
![plotfx](pkgWork/plotfx.png)

### Visualizing Double Variable Functions
```
"""
This function takes a string and evaluates it as a function of x and y i.e. f(x,y) and plots a graph for the function.
    Args:
        ----Required Arguments----
        formula (string): formula in terms of x and y for the function f(x,y)
        xstart (float): starting extreme of x value to evaluate f(x,y) from
        xend (float): ending extreme of x value to evaluate f(x,y) to
        ystart (float): starting extreme of y value to evaluate f(x,y) from
        yend (float): ending extreme of y value to evaluate f(x,y) to
        step (float): incrementation to continuously evaluate f(x,y) with i.e. (x +/- step, y +/- step)
        ----Optional Arguments----
        colorscale (string): Default 'Electric', can be any of the following (Blackbody, Bluered, Blues, C ividis,
        Earth, Electric, Greens, Greys, Hot, Jet, Picnic, Portland, Rainbow, RdBu, Reds, Viridis, YlGnBu, YlOrRd)
        title (string): Default to the formula parameter, title of the plot
        xtitle (string): Default to 'X-axis', x-axis title
        ytitle (string): Default to 'Y-axis', y-axis title
        ztitle (string): Default to 'Z-axis', z-axis title
    Returns:
        plotly.graph_objects.Figure
    Raises:
        StepsError: step must be higher than 0
        xIntervalError: xend is lesser than xstart
        yIntervalError: yend is lesser than ystart
        Other Errors such as invalid evaluation
        wrong argument passed as colorscale
    Note:
        [Assuming the output is given to a variable fig]
        The graph can be shown using the output with fig.show()
        The graph can be further modified using fig.update_layout, refer here: https://plotly.com/python/reference/layout/
"""
from pyEPVis import do_fxy_plot
do_fxy_plot(formula = "(x**2 + y**2)/(x - y)",xstart = -5,xend = 5,ystart = -5,yend = 5,step = 0.1,colorscale = 'Viridis').show()
```
![plotfx](pkgWork/plotfxy.png)

### Visualizing 2D Particle Movements
```
"""
This function takes a set of particles and animates its movements
    Args:
        ----Required Arguments----
        x (list): A list of list of x coordinates of n particles for iterations equal to number of rows.
        y (list): A list of list of y coordinates of n particles for iterations equal to number of rows.
        ----Optional Arguments----
        size (float): Default size is 7, size of particles.
        colors (list): Default all particles are colored 'steelblue', a list of strings with n colors.
        title (string): Title of the plot
        timeperframe (float): Default value is 1000, time taken to move to the next frame (milliseconds)
    Returns:
        plotly.graph_objects.Figure
    Raises:
        DimensionError: x and y list don't have the same dimensions
        TPFError: timeperframe must be greater than 0
        Other Errors such as invalid evaluation
        wrong argument passed as colors
    Note:
        [Assuming the output is given to a variable fig]
        The graph can be shown using the output with fig.show()
        The graph can be further modified using fig.update_layout, refer here: https://plotly.com/python/reference/layout/
"""
from pyEPVis import animate_xy_particles
animate_xy_particles(x = [[1,4,7],[4,7,1],[7,1,4],[1,4,7]],y = [[1,4,1],[4,1,1],[1,1,4],[1,4,1]],colors = ["red","blue","green"]).show()
```
![vis2D](pkgWork/vis2D.gif)

### Visualizing 3D Particle Movements
```
"""
This function takes a set of particles and animates its movements
    Args:
        ----Required Arguments----
        x (list): A list of list of x coordinates of n particles for iterations equal to number of rows.
        y (list): A list of list of y coordinates of n particles for iterations equal to number of rows.
        z (list): A list of list of z coordinates of n particles for iterations equal to number of rows.
        ----Optional Arguments----
        size (float): Default size is 7, size of particles.
        colors (list): Default all particles are colored 'steelblue', a list of strings with n colors.
        title (string): Title of the plot.
        framespmov (int): Default value is 10, Frames for movement from one position to another, must be greater than 1.
        timeperframe (float): Default value is 1000, time taken to move to the next frame (milliseconds) "high frametime with framespmov results in a smooth animation"
    Returns:
        plotly.graph_objects.Figure
    Raises:
        DimensionError: x, y, and z lists don't have the same dimensions
        FramesError: framespmov should be greater or equal to 1
        TPFError: timeperframe must be greater than 0
        Other Errors such as invalid evaluation
        wrong argument passed as colors
    Note:
        [Assuming the output is given to a variable fig]
        The graph can be shown using the output with fig.show()
        The graph can be further modified using fig.update_layout, refer here: https://plotly.com/python/reference/layout/
"""
from pyEPVis import animate_xyz_particles
animate_xyz_particles(x = [[1,8,7],[3,3,6],[1,1,1]],y = [[5,2,2],[7,9,0],[5,2,6]],z = [[1,2,3],[4,5,6],[7,1,1]],colors = ["red","green","blue"],framespmov = 15,timeperframe = 100).show()
```
![vis3D](pkgWork/vis3D.gif)

## Warnings
* ***(Note: for function evaluation please stick to x and y and not other variables as it will lead to evaluation errors and framespmove should be high in order to visualize the movement smoothly in animate_xyz_particles)***

## Other Help
* Use the **help(enter_function_name_here)** function to refer to the full documentation of the function.
* The figure is a plotly.graph_objects.Figure variable it can be further modified for including more plots inside the figure.
* All math package syntaxes along with python expressions are supported as well, to use the math package in your formula and use it as follows: **math.enter_function_name()**

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AAbhijithA/pyEPVis",
    "name": "pyEPVis",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9.2",
    "maintainer_email": "",
    "keywords": "particle,expression,expression visualizer,particle movement,visualizer,animation",
    "author": "Abhijith Ajith",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/9e/34/c933a9b021afd631b8485130ec15540763187f0dc7cf2da132faf3a72f6c/pyEPVis-0.0.4.tar.gz",
    "platform": null,
    "description": "# pyEPVis\r\nA package that allows you to easily visualize single or two variable functions and allows you to visualize particle/point movements along two or three Dimensions with an interactive plotly visualization.\r\n\r\n## Used for Development\r\n![Python](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue)![NumPy](https://img.shields.io/badge/Numpy-777BB4?style=for-the-badge&logo=numpy&logoColor=white)![Plotly](https://img.shields.io/badge/Plotly-239120?style=for-the-badge&logo=plotly&logoColor=white)\r\n\r\n## Using the package\r\n\r\nInstall the package using the command\r\n```\r\npip install pyEPVis\r\n```\r\n### Visualizing Single Variable Functions\r\n```\r\n\"\"\"\r\nThis function takes a string and evaluates it as a function of x i.e. f(x) and plots a graph for the function.\r\n    Args:\r\n        ----Required Arguments----\r\n        formula (string): formula in terms of x and y for the function f(x)\r\n        xstart (float): starting extreme of x value to evaluate f(x) from\r\n        xend (float): ending extreme of x value to evaluate f(x) to\r\n        step (float): incrementation to continuously evaluate f(x) with i.e. (x +/- step)\r\n        ----Optional Arguments----\r\n        color (string): Default 'lime'\r\n        width (float): Default 2, width of the curve\r\n        title (string): Default to the formula parameter, title of the plot\r\n        xtitle (string): Default to 'X-axis', x-axis title\r\n        ytitle (string): Default to 'Y-axis', y-axis title\r\n    Returns:\r\n        plotly.graph_objects.Figure\r\n    Raises:\r\n        StepsError: step must be higher than 0\r\n        xIntervalError: xend is lesser than xstart\r\n        Other Errors such as invalid evaluation\r\n        wrong argument passed as colorscale\r\n    Note:\r\n        [Assuming the output is given to a variable fig]\r\n        The graph can be shown using the output with fig.show()\r\n        The graph can be further modified using fig.update_layout, refer here: https://plotly.com/python/reference/layout/\r\n\"\"\"\r\nfrom pyEPVis import do_fx_plot\r\ndo_fx_plot(formula = \"x**4 - 10*(x**3) - 2*(x**2) - 5*x + 4\",xstart = -100,xend = 100,step = 1, color = \"steelblue\").show()\r\n```\r\n![plotfx](pkgWork/plotfx.png)\r\n\r\n### Visualizing Double Variable Functions\r\n```\r\n\"\"\"\r\nThis function takes a string and evaluates it as a function of x and y i.e. f(x,y) and plots a graph for the function.\r\n    Args:\r\n        ----Required Arguments----\r\n        formula (string): formula in terms of x and y for the function f(x,y)\r\n        xstart (float): starting extreme of x value to evaluate f(x,y) from\r\n        xend (float): ending extreme of x value to evaluate f(x,y) to\r\n        ystart (float): starting extreme of y value to evaluate f(x,y) from\r\n        yend (float): ending extreme of y value to evaluate f(x,y) to\r\n        step (float): incrementation to continuously evaluate f(x,y) with i.e. (x +/- step, y +/- step)\r\n        ----Optional Arguments----\r\n        colorscale (string): Default 'Electric', can be any of the following (Blackbody, Bluered, Blues, C ividis,\r\n        Earth, Electric, Greens, Greys, Hot, Jet, Picnic, Portland, Rainbow, RdBu, Reds, Viridis, YlGnBu, YlOrRd)\r\n        title (string): Default to the formula parameter, title of the plot\r\n        xtitle (string): Default to 'X-axis', x-axis title\r\n        ytitle (string): Default to 'Y-axis', y-axis title\r\n        ztitle (string): Default to 'Z-axis', z-axis title\r\n    Returns:\r\n        plotly.graph_objects.Figure\r\n    Raises:\r\n        StepsError: step must be higher than 0\r\n        xIntervalError: xend is lesser than xstart\r\n        yIntervalError: yend is lesser than ystart\r\n        Other Errors such as invalid evaluation\r\n        wrong argument passed as colorscale\r\n    Note:\r\n        [Assuming the output is given to a variable fig]\r\n        The graph can be shown using the output with fig.show()\r\n        The graph can be further modified using fig.update_layout, refer here: https://plotly.com/python/reference/layout/\r\n\"\"\"\r\nfrom pyEPVis import do_fxy_plot\r\ndo_fxy_plot(formula = \"(x**2 + y**2)/(x - y)\",xstart = -5,xend = 5,ystart = -5,yend = 5,step = 0.1,colorscale = 'Viridis').show()\r\n```\r\n![plotfx](pkgWork/plotfxy.png)\r\n\r\n### Visualizing 2D Particle Movements\r\n```\r\n\"\"\"\r\nThis function takes a set of particles and animates its movements\r\n    Args:\r\n        ----Required Arguments----\r\n        x (list): A list of list of x coordinates of n particles for iterations equal to number of rows.\r\n        y (list): A list of list of y coordinates of n particles for iterations equal to number of rows.\r\n        ----Optional Arguments----\r\n        size (float): Default size is 7, size of particles.\r\n        colors (list): Default all particles are colored 'steelblue', a list of strings with n colors.\r\n        title (string): Title of the plot\r\n        timeperframe (float): Default value is 1000, time taken to move to the next frame (milliseconds)\r\n    Returns:\r\n        plotly.graph_objects.Figure\r\n    Raises:\r\n        DimensionError: x and y list don't have the same dimensions\r\n        TPFError: timeperframe must be greater than 0\r\n        Other Errors such as invalid evaluation\r\n        wrong argument passed as colors\r\n    Note:\r\n        [Assuming the output is given to a variable fig]\r\n        The graph can be shown using the output with fig.show()\r\n        The graph can be further modified using fig.update_layout, refer here: https://plotly.com/python/reference/layout/\r\n\"\"\"\r\nfrom pyEPVis import animate_xy_particles\r\nanimate_xy_particles(x = [[1,4,7],[4,7,1],[7,1,4],[1,4,7]],y = [[1,4,1],[4,1,1],[1,1,4],[1,4,1]],colors = [\"red\",\"blue\",\"green\"]).show()\r\n```\r\n![vis2D](pkgWork/vis2D.gif)\r\n\r\n### Visualizing 3D Particle Movements\r\n```\r\n\"\"\"\r\nThis function takes a set of particles and animates its movements\r\n    Args:\r\n        ----Required Arguments----\r\n        x (list): A list of list of x coordinates of n particles for iterations equal to number of rows.\r\n        y (list): A list of list of y coordinates of n particles for iterations equal to number of rows.\r\n        z (list): A list of list of z coordinates of n particles for iterations equal to number of rows.\r\n        ----Optional Arguments----\r\n        size (float): Default size is 7, size of particles.\r\n        colors (list): Default all particles are colored 'steelblue', a list of strings with n colors.\r\n        title (string): Title of the plot.\r\n        framespmov (int): Default value is 10, Frames for movement from one position to another, must be greater than 1.\r\n        timeperframe (float): Default value is 1000, time taken to move to the next frame (milliseconds) \"high frametime with framespmov results in a smooth animation\"\r\n    Returns:\r\n        plotly.graph_objects.Figure\r\n    Raises:\r\n        DimensionError: x, y, and z lists don't have the same dimensions\r\n        FramesError: framespmov should be greater or equal to 1\r\n        TPFError: timeperframe must be greater than 0\r\n        Other Errors such as invalid evaluation\r\n        wrong argument passed as colors\r\n    Note:\r\n        [Assuming the output is given to a variable fig]\r\n        The graph can be shown using the output with fig.show()\r\n        The graph can be further modified using fig.update_layout, refer here: https://plotly.com/python/reference/layout/\r\n\"\"\"\r\nfrom pyEPVis import animate_xyz_particles\r\nanimate_xyz_particles(x = [[1,8,7],[3,3,6],[1,1,1]],y = [[5,2,2],[7,9,0],[5,2,6]],z = [[1,2,3],[4,5,6],[7,1,1]],colors = [\"red\",\"green\",\"blue\"],framespmov = 15,timeperframe = 100).show()\r\n```\r\n![vis3D](pkgWork/vis3D.gif)\r\n\r\n## Warnings\r\n* ***(Note: for function evaluation please stick to x and y and not other variables as it will lead to evaluation errors and framespmove should be high in order to visualize the movement smoothly in animate_xyz_particles)***\r\n\r\n## Other Help\r\n* Use the **help(enter_function_name_here)** function to refer to the full documentation of the function.\r\n* The figure is a plotly.graph_objects.Figure variable it can be further modified for including more plots inside the figure.\r\n* All math package syntaxes along with python expressions are supported as well, to use the math package in your formula and use it as follows: **math.enter_function_name()**\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Expression and Particle movement visualizer package",
    "version": "0.0.4",
    "project_urls": {
        "Homepage": "https://github.com/AAbhijithA/pyEPVis"
    },
    "split_keywords": [
        "particle",
        "expression",
        "expression visualizer",
        "particle movement",
        "visualizer",
        "animation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a719595a0db0644d83fa01a7e91f19d28e1827959fd548432c9ffbb7ac4f2d06",
                "md5": "7fae5b538e15e57c93da992751f226e6",
                "sha256": "f80fb01417dae1a01c6bc0b8ea98698e1c0ae18ccb4b42784d9e3af509a306c1"
            },
            "downloads": -1,
            "filename": "pyEPVis-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7fae5b538e15e57c93da992751f226e6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.2",
            "size": 7260,
            "upload_time": "2023-09-21T14:34:54",
            "upload_time_iso_8601": "2023-09-21T14:34:54.820042Z",
            "url": "https://files.pythonhosted.org/packages/a7/19/595a0db0644d83fa01a7e91f19d28e1827959fd548432c9ffbb7ac4f2d06/pyEPVis-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9e34c933a9b021afd631b8485130ec15540763187f0dc7cf2da132faf3a72f6c",
                "md5": "92051b7f40a960902030ec2124dff90b",
                "sha256": "908884f988af7532ae59437de1c1eb13e1e9573b6d9f82f96300a3f88e3f901f"
            },
            "downloads": -1,
            "filename": "pyEPVis-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "92051b7f40a960902030ec2124dff90b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.2",
            "size": 6292,
            "upload_time": "2023-09-21T14:34:58",
            "upload_time_iso_8601": "2023-09-21T14:34:58.422360Z",
            "url": "https://files.pythonhosted.org/packages/9e/34/c933a9b021afd631b8485130ec15540763187f0dc7cf2da132faf3a72f6c/pyEPVis-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-21 14:34:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AAbhijithA",
    "github_project": "pyEPVis",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyepvis"
}
        
Elapsed time: 0.16488s