plotly3d


Nameplotly3d JSON
Version 0.4.8 PyPI version JSON
download
home_pagehttps://github.com/xingzhis/plotly3d
SummaryA helper for ploting scatter plots and trajectory plots with plotly
upload_time2024-04-29 14:39:12
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/a9/03/bb5751338c244c45b87b0641043a14cbe99760a8ccb7b8abd9e065a1c859/plotly3d-0.4.8.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.8",
    "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": "c788ba79a83ce6e2fef218ec871f013d6e1bce7ed96bbbba171f9d6b47f2ab8c",
                "md5": "0ff6deee1b276208948d9c8f5dcf809a",
                "sha256": "e15af6599433c3ea6a569d572e8f0eacd3e2613630722c7eeb2e4340c9e64f25"
            },
            "downloads": -1,
            "filename": "plotly3d-0.4.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0ff6deee1b276208948d9c8f5dcf809a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5679,
            "upload_time": "2024-04-29T14:39:11",
            "upload_time_iso_8601": "2024-04-29T14:39:11.241796Z",
            "url": "https://files.pythonhosted.org/packages/c7/88/ba79a83ce6e2fef218ec871f013d6e1bce7ed96bbbba171f9d6b47f2ab8c/plotly3d-0.4.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a903bb5751338c244c45b87b0641043a14cbe99760a8ccb7b8abd9e065a1c859",
                "md5": "5a079598143cd780a6a0c5fc7a5bca2d",
                "sha256": "ed41af6d154938fa7440ae7cc8056ad7b52c5e10d68be1f45c045de56ed57660"
            },
            "downloads": -1,
            "filename": "plotly3d-0.4.8.tar.gz",
            "has_sig": false,
            "md5_digest": "5a079598143cd780a6a0c5fc7a5bca2d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4926,
            "upload_time": "2024-04-29T14:39:12",
            "upload_time_iso_8601": "2024-04-29T14:39:12.906358Z",
            "url": "https://files.pythonhosted.org/packages/a9/03/bb5751338c244c45b87b0641043a14cbe99760a8ccb7b8abd9e065a1c859/plotly3d-0.4.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-29 14:39:12",
    "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.25246s