reflex-plot


Namereflex-plot JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryPlot your dataframe with reflex!
upload_time2024-10-14 16:51:28
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords dashboard pandas plotting reflex reflex-plot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # reflex-plot
Seamlessly plot dataframes in _Reflex_ just like you would do with Matplotlib.

![](./static/screenshot.png)

You can import `plot` from `reflex_plot` to get a Rechart component.

```python
import random
from typing import Literal

import pandas as pd
import reflex as rx
from reflex_plot import plot

def plot_data(kind: Literal["line", "area", "bar"]) -> rx.Component:
    df = pd.DataFrame(
        {
            "category": list(range(20)),
            "value": [random.randint(0, 1000) for _ in range(20)],
        }
    )
    return plot(
        df,
        kind=kind,
        x="category",
        y="value",
        grid=True,
        tool_tip=True,
    )
```

## Pandas plotting backend

You can also set `reflex_plot` as the default backend for pandas and use `DataFrame.plot` as you would do with Matplotlib


```python
pd.set_option("plotting.backend", "reflex_plot")


def plot_data(kind: Literal["line", "area", "bar"]) -> rx.Component:
    df = pd.DataFrame(
        {
            "category": list(range(20)),
            "value": [random.randint(0, 1000) for _ in range(20)],
        }
    )
    return df.plot(
        kind=kind,
        x="category",
        y="value",
        grid=True,
        tool_tip=True,
    )

```

## How to install
```
pip install reflex-plot
```

## Charts type covered
- [x] Line
- [x] Area
- [x] Bar

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "reflex-plot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "dashboard, pandas, plotting, reflex, reflex-plot",
    "author": null,
    "author_email": "Luciano Scarpulla <66913960+lucianosrp@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/c4/d8/3ca6cb6b60a506ffa83252744469284390530b409156e96e2d09d002d6d3/reflex_plot-0.1.0.tar.gz",
    "platform": null,
    "description": "# reflex-plot\nSeamlessly plot dataframes in _Reflex_ just like you would do with Matplotlib.\n\n![](./static/screenshot.png)\n\nYou can import `plot` from `reflex_plot` to get a Rechart component.\n\n```python\nimport random\nfrom typing import Literal\n\nimport pandas as pd\nimport reflex as rx\nfrom reflex_plot import plot\n\ndef plot_data(kind: Literal[\"line\", \"area\", \"bar\"]) -> rx.Component:\n    df = pd.DataFrame(\n        {\n            \"category\": list(range(20)),\n            \"value\": [random.randint(0, 1000) for _ in range(20)],\n        }\n    )\n    return plot(\n        df,\n        kind=kind,\n        x=\"category\",\n        y=\"value\",\n        grid=True,\n        tool_tip=True,\n    )\n```\n\n## Pandas plotting backend\n\nYou can also set `reflex_plot` as the default backend for pandas and use `DataFrame.plot` as you would do with Matplotlib\n\n\n```python\npd.set_option(\"plotting.backend\", \"reflex_plot\")\n\n\ndef plot_data(kind: Literal[\"line\", \"area\", \"bar\"]) -> rx.Component:\n    df = pd.DataFrame(\n        {\n            \"category\": list(range(20)),\n            \"value\": [random.randint(0, 1000) for _ in range(20)],\n        }\n    )\n    return df.plot(\n        kind=kind,\n        x=\"category\",\n        y=\"value\",\n        grid=True,\n        tool_tip=True,\n    )\n\n```\n\n## How to install\n```\npip install reflex-plot\n```\n\n## Charts type covered\n- [x] Line\n- [x] Area\n- [x] Bar\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Plot your dataframe with reflex!",
    "version": "0.1.0",
    "project_urls": {
        "source": "https://github.com/lucianosrp/reflex-plot"
    },
    "split_keywords": [
        "dashboard",
        " pandas",
        " plotting",
        " reflex",
        " reflex-plot"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d198a0d87b23267d6be2268874b0d80fa9bae036f929224bdd54913414b9ea2f",
                "md5": "8062b2d09565af6f9de4eeb6ba1087b3",
                "sha256": "2acb16aaf2c42232fb837aba378c189d127f56ade5aad23abee22d0001820480"
            },
            "downloads": -1,
            "filename": "reflex_plot-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8062b2d09565af6f9de4eeb6ba1087b3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 3490,
            "upload_time": "2024-10-14T16:51:23",
            "upload_time_iso_8601": "2024-10-14T16:51:23.817827Z",
            "url": "https://files.pythonhosted.org/packages/d1/98/a0d87b23267d6be2268874b0d80fa9bae036f929224bdd54913414b9ea2f/reflex_plot-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c4d83ca6cb6b60a506ffa83252744469284390530b409156e96e2d09d002d6d3",
                "md5": "def55778140762b4145b35db4a3429a6",
                "sha256": "35419e56f10098d4213b73cf8738095c477e124614c4ac3d0064085911405ed6"
            },
            "downloads": -1,
            "filename": "reflex_plot-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "def55778140762b4145b35db4a3429a6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 232028,
            "upload_time": "2024-10-14T16:51:28",
            "upload_time_iso_8601": "2024-10-14T16:51:28.069310Z",
            "url": "https://files.pythonhosted.org/packages/c4/d8/3ca6cb6b60a506ffa83252744469284390530b409156e96e2d09d002d6d3/reflex_plot-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-14 16:51:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lucianosrp",
    "github_project": "reflex-plot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "reflex-plot"
}
        
Elapsed time: 0.96074s