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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: wes_palette-0.1.2.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • 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.2.tar.gz
Algorithm Hash digest
SHA256 9a455f66c5723a68e3a00d5a3e8931fed9ee937594b16de67fe28e8e596e9e67
MD5 db26eb20410d070552a99b3462cfa962
BLAKE2b-256 9b98168adc9848ace10e573f5393ec82de73773c71b6d2910e405f0a7e3c48ad

See more details on using hashes here.

File details

Details for the file wes_palette-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: wes_palette-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for wes_palette-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 13bdef27987aa8090e58cab0671b644782465b3fdf5b856501445692189c6009
MD5 a3fa2f7f2343062d94ae29c3d58f9f6a
BLAKE2b-256 6d3e75e5ec128ff07cca169688ca7c2dc708ddefed7f778bbc3b61bd6446618d

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