https://github.com/itsluketwist/plotly-utils
Some simple patterns/defaults that I like to use alongside Plotly.
https://github.com/itsluketwist/plotly-utils
graphing plotly
Last synced: 3 months ago
JSON representation
Some simple patterns/defaults that I like to use alongside Plotly.
- Host: GitHub
- URL: https://github.com/itsluketwist/plotly-utils
- Owner: itsluketwist
- License: mit
- Created: 2024-01-16T15:52:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-19T19:53:59.000Z (over 1 year ago)
- Last Synced: 2025-01-24T22:29:23.677Z (4 months ago)
- Topics: graphing, plotly
- Language: Python
- Homepage:
- Size: 68.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **plotly-utils**

## *usage*
Some simple patterns/defaults that I like to use alongside Plotly (my chosen graphing library).
Requires plotly (obviously), once installed just import into your code and use,
mostly alongside the `graph_objects` module.```python
from random import randintimport plotly.graph_objects as go
from plotly_utils import default_figure, write_and_display
figure = default_figure(
title="New Example Graph",
data=go.Scatter(
x=list(range(10)),
y=[randint(1, 5) for _ in range(10)],
mode="lines+markers"
)
)write_and_display(
figure=figure,
name="example",
)```

## *installation*
Install directly from GitHub, using pip:
```shell
pip install git+https://github.com/itsluketwist/plotly-utils
```## *development*
Clone the repository code:
```shell
git clone https://github.com/itsluketwist/plotly-utils.git
```Once cloned, install the package locally in a virtual environment:
```shell
python -m venv venv. venv/bin/activate
pip install -e ".[dev]"
```Install and use pre-commit to ensure code is in a good state:
```shell
pre-commit installpre-commit autoupdate
pre-commit run --all-files
```