Skip to main content

Wes Anderson film color palette extension for matplotlib

Project description

wes-palette

PyPI license issues Build Status docs coverage

wes-palette is a Wes Anderson film color palettes for matplotlib based on vapeplot

Installation

pip install wes-palette

Examples

wes anderson palettes

Basic Usage

Import the package

import wes_palette as wes

Generate a custom diverging colormap

cmap = wes.cmap('budapest')

Create your graph with matplotlib and then display the plot:

plt.show()

Example

# Create a visualization
sns.set_theme(style="white")

# Generate a large random dataset
rs = np.random.RandomState(33)
d = pd.DataFrame(data=rs.normal(size=(100, 26)),
             columns=list(ascii_letters[26:]))

# Compute the correlation matrix
corr = d.corr()

# Generate a mask for the upper tria#ngle
mask = np.triu(np.ones_like(corr, dtype=bool))

# Set up the matplotlib figure
f, ax = plt.subplots(figsize=(11, 9))

# Generate a custom diverging colormap
cmap = wes.cmap('dispatch')

# Draw the heatmap with the mask and correct aspect ratio
sns.heatmap(corr, mask=mask, cmap=cmap, vmax=.3, center=0,
        square=True, linewidths=.5, cbar_kws={"shrink": .5})

plt.show()

example example example

Contributing

See CONTRIBUTING.md

License

Protected under MIT Liscense.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wes_palette-0.1.2.tar.gz (3.6 MB view hashes)

Uploaded Source

Built Distribution

wes_palette-0.1.2-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page