plotly3d


Nameplotly3d JSON
Version 0.4.12 PyPI version JSON
download
home_pagehttps://github.com/xingzhis/plotly3d
SummaryA helper for ploting scatter plots and trajectory plots with plotly
upload_time2024-06-07 21:36:48
maintainerNone
docs_urlNone
authorXingzhi Sun
requires_pythonNone
licenseMIT
keywords plotly plotly 3d 3d plotting 3d scatter 3d trajectory
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # plotly3d
A helper for ploting scatter plots and trajectory plots with plotly.

[Krishnaswamy Lab](https://krishnaswamylab.org/members), Yale University

[![Latest PyPI version](https://img.shields.io/pypi/v/plotly3d.svg)](https://pypi.org/project/plotly3d/)
[![PyPI license](https://img.shields.io/pypi/l/plotly3d.svg)](https://pypi.python.org/pypi/plotly3d/)
[![PyPI download month](https://img.shields.io/pypi/dm/plotly3d.svg)](https://pypi.python.org/pypi/plotly3d/)
[![PyPI download day](https://img.shields.io/pypi/dd/plotly3d.svg)](https://pypi.python.org/pypi/plotly3d/)
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)


## Install

The package can be directly installed via pip:
```
pip install plotly3d
```

## APIs

<details><summary>
Scatter Plots
</summary>

```
def scatter(points, colors=None, **kwargs):
    """
    Plots 3D scatter plot with optional rescaling, coloring, and customization.

    Parameters:
    - points: Array of points to plot.
    - colors: Optional array of colors for each point.
    - scaler: Optional scaler object to rescale points. If None and rescaling is enabled, MinMaxScaler is used.
    - **kwargs: Additional optional arguments:
        - s (float): Size of the markers.
        - alpha (float): Opacity of the markers.
        - force_continuous (bool): Force treating colors as continuous even if they seem categorical.
        - title (str): Title of the plot.
        - filename (str): If provided, saves the plot to this file.
        - rescale (bool): If True, rescales points using the provided or default scaler.
        - fig (go.Figure): Plotly figure object to which the scatter plot will be added. If None, a new figure is created.
        - xtitle (str), ytitle (str), ztitle (str): Titles for the X, Y, and Z axes.

    Returns:
    - Plotly figure containing the scatter points plotted in 3D space.
    """
```

</details>

<details><summary>
Trajectory Plots
</summary>

```
def trajectories(trajs, colors=None, **kwargs):
    """
    Plots trajectories in 3D space using Plotly, with unique colors for each category and a single legend entry per category.

    Parameters:
    - trajs: numpy array of shape (a, b, c), where
      a: time bins, b: trajectory index, c: space dimension (c=3 for 3D).

    Returns:
    - Plotly figure containing the trajectories plotted in 3D space.
    """
```

</details>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xingzhis/plotly3d",
    "name": "plotly3d",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "plotly, plotly 3d, 3d plotting, 3d scatter, 3d trajectory",
    "author": "Xingzhi Sun",
    "author_email": "xingzhi.sun@yale.edu",
    "download_url": "https://files.pythonhosted.org/packages/03/1e/54dfc16a680149d5496e1a21f2464bae3468df0072718aa2dea062d711e3/plotly3d-0.4.12.tar.gz",
    "platform": null,
    "description": "# plotly3d\nA helper for ploting scatter plots and trajectory plots with plotly.\n\n[Krishnaswamy Lab](https://krishnaswamylab.org/members), Yale University\n\n[![Latest PyPI version](https://img.shields.io/pypi/v/plotly3d.svg)](https://pypi.org/project/plotly3d/)\n[![PyPI license](https://img.shields.io/pypi/l/plotly3d.svg)](https://pypi.python.org/pypi/plotly3d/)\n[![PyPI download month](https://img.shields.io/pypi/dm/plotly3d.svg)](https://pypi.python.org/pypi/plotly3d/)\n[![PyPI download day](https://img.shields.io/pypi/dd/plotly3d.svg)](https://pypi.python.org/pypi/plotly3d/)\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)\n\n\n## Install\n\nThe package can be directly installed via pip:\n```\npip install plotly3d\n```\n\n## APIs\n\n<details><summary>\nScatter Plots\n</summary>\n\n```\ndef scatter(points, colors=None, **kwargs):\n    \"\"\"\n    Plots 3D scatter plot with optional rescaling, coloring, and customization.\n\n    Parameters:\n    - points: Array of points to plot.\n    - colors: Optional array of colors for each point.\n    - scaler: Optional scaler object to rescale points. If None and rescaling is enabled, MinMaxScaler is used.\n    - **kwargs: Additional optional arguments:\n        - s (float): Size of the markers.\n        - alpha (float): Opacity of the markers.\n        - force_continuous (bool): Force treating colors as continuous even if they seem categorical.\n        - title (str): Title of the plot.\n        - filename (str): If provided, saves the plot to this file.\n        - rescale (bool): If True, rescales points using the provided or default scaler.\n        - fig (go.Figure): Plotly figure object to which the scatter plot will be added. If None, a new figure is created.\n        - xtitle (str), ytitle (str), ztitle (str): Titles for the X, Y, and Z axes.\n\n    Returns:\n    - Plotly figure containing the scatter points plotted in 3D space.\n    \"\"\"\n```\n\n</details>\n\n<details><summary>\nTrajectory Plots\n</summary>\n\n```\ndef trajectories(trajs, colors=None, **kwargs):\n    \"\"\"\n    Plots trajectories in 3D space using Plotly, with unique colors for each category and a single legend entry per category.\n\n    Parameters:\n    - trajs: numpy array of shape (a, b, c), where\n      a: time bins, b: trajectory index, c: space dimension (c=3 for 3D).\n\n    Returns:\n    - Plotly figure containing the trajectories plotted in 3D space.\n    \"\"\"\n```\n\n</details>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A helper for ploting scatter plots and trajectory plots with plotly",
    "version": "0.4.12",
    "project_urls": {
        "Homepage": "https://github.com/xingzhis/plotly3d"
    },
    "split_keywords": [
        "plotly",
        " plotly 3d",
        " 3d plotting",
        " 3d scatter",
        " 3d trajectory"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07a22f94489533a2fed37fb22ff52b615fbab9ef1c35152c42d4b2a09292f76b",
                "md5": "e29f268436b68917cb50bd29eb43e5c0",
                "sha256": "66adbca21118342b480cc9107e700dfc55b9092a23fcfea27209efa1b12dc809"
            },
            "downloads": -1,
            "filename": "plotly3d-0.4.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e29f268436b68917cb50bd29eb43e5c0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5703,
            "upload_time": "2024-06-07T21:36:45",
            "upload_time_iso_8601": "2024-06-07T21:36:45.504024Z",
            "url": "https://files.pythonhosted.org/packages/07/a2/2f94489533a2fed37fb22ff52b615fbab9ef1c35152c42d4b2a09292f76b/plotly3d-0.4.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "031e54dfc16a680149d5496e1a21f2464bae3468df0072718aa2dea062d711e3",
                "md5": "4420b0ca5c78e37d4b9efc91146b8609",
                "sha256": "79cc3cfad63c3d2e34597aa7f4983c49400f17be9d7215913eeb0d49eeccfd35"
            },
            "downloads": -1,
            "filename": "plotly3d-0.4.12.tar.gz",
            "has_sig": false,
            "md5_digest": "4420b0ca5c78e37d4b9efc91146b8609",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4955,
            "upload_time": "2024-06-07T21:36:48",
            "upload_time_iso_8601": "2024-06-07T21:36:48.170185Z",
            "url": "https://files.pythonhosted.org/packages/03/1e/54dfc16a680149d5496e1a21f2464bae3468df0072718aa2dea062d711e3/plotly3d-0.4.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-07 21:36:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xingzhis",
    "github_project": "plotly3d",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "plotly3d"
}
        
Elapsed time: 0.27051s