Skip to main content

Wes Anderson film color palette extension for matplotlib

Project description

wes-palette

PyPI license issues build 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.1.tar.gz (7.9 kB view details)

Uploaded Source

File details

Details for the file wes_palette-0.1.1.tar.gz.

File metadata

  • Download URL: wes_palette-0.1.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for wes_palette-0.1.1.tar.gz
Algorithm Hash digest
SHA256 09d7502a8acb338697c68aa2493bc54d822f96cd57bb436fbf8ade8269804445
MD5 44ea7cc083f835b3e4e34c62c2273e0f
BLAKE2b-256 663392c9f75d6108061be4106ca893dad0783b412707416bf8b8ada1a25f9bf0

See more details on using hashes here.

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