An open API service indexing awesome lists of open source software.

https://github.com/rose-stl-lab/rose_colormap

Colormap inspired by rose for Python matplotlib or plotly visualization
https://github.com/rose-stl-lab/rose_colormap

Last synced: 11 months ago
JSON representation

Colormap inspired by rose for Python matplotlib or plotly visualization

Awesome Lists containing this project

README

          


The Rose Colormap - Rose-inspired Python Colormaps


For Spatiotemporal Visualization


license
python
version

## What is the Rose Colormap?

The Rose Colormap is a series of Python colormaps / colorscales including *Rose*, *Rose Muted* and *Rose Vivid*. The pink tops and the green basis constitute a sharp contrast such that it is perfect for visualizing peaks in spatiotemporal dynamics.


intensity



Visualizing spatiotemporal event arrival rate using Rose Vivid

## How do I install the Rose Colormap?

The Rose Colormap can be installed via pip from [PyPI](https://pypi.org/).

```
pip install rose_colormap
```

## How do I use the Rose Colormap?

The Rose colormap can be used with either **Matplotlib** or **Plotly.py**.

**(1) Matplotlib example usage**

```python
import matplotlib.pyplot as plt
import numpy as np
from rose_colormap import rose, rose_muted, rose_vivid

x = np.random.rand(100)
y = np.random.rand(100)
t = np.arange(100)
plt.scatter(x, y, c=t, cmap=rose_vivid)
plt.colorbar()
plt.show()
```

**(2) Plotly Express example usage**

```python
import plotly.express as px
import numpy as np
from rose_colormap.plotly import rose, rose_muted, rose_vivid

x = np.random.rand(100)
y = np.random.rand(100)
t = np.arange(100)
fig = px.scatter(x=x, y=y, color=t, color_continuous_scale=rose_vivid)
fig.show()
```

**(3) Plotly Graph Object example usage**

```python
import plotly.graph_objects as go
import numpy as np
from rose_colormap.plotly import rose, rose_muted, rose_vivid

x = np.outer(np.linspace(-3, 3, 32), np.ones(32))
y = x.copy().T
z = (np.sin(x ** 2) + np.cos(y ** 2))
fig = go.Figure(go.Surface(x=x, y=y, z=z, colorscale=rose_vivid))
fig.show()
```

## Uninstall

```
pip uninstall rose_colormap
```

### Thanks To:

Members of the Rose lab for supporting this work.