Skip to main content

Taylor Swift inspired Matplotlib colormaps.

Project description

Taylor Swift color map collection.

DOI

Quick start: pip install swiftascmaps

Includes color maps based on the following albums:

  • Red (red, red_r)
  • 1989 (nineteen_eighty_nine, nineteen_eighty_nine_r)
  • Reputation (reputation, reputation_r)
  • Lover (lover, lover_r)
  • Folklore (folklore, folklore_r)
  • Evermore (evermore, evermore_r, evermore_shifted, evermore_shifted_r)
  • Fearless: Taylor's Version (fearless_tv, fearless_tv_r)
  • Red: Taylor's Version (red_tv, red_tv_r)
  • Midnights (midnights, midnights_r)
  • Speak Now: Taylor's Version (speak_now_tv, speak_now_tv_r)
  • 1989: Taylor's Version (nineteen_eighty_nine_tv, nineteen_eighty_nine_tv_r)

License: LGPLv3 Author: Josh Borrow (josh@joshborrow.com)

If you prefer to use R, there is an alternative package maintained as taloRswift.

Usage

To use these, you can import them and use them with matplotlib as you would with any other color map.

from swiftascmaps import red
from matplotlib.pyplot import imshow
from numpy import random

imshow(random.rand(128, 128), cmap=red)

The color maps can also be accessed in matplotlib using strings by prefixing swift, e.g.

import swiftascmaps

imshow(random.rand(128, 128), cmap="swift.red")

Examples

Note

Of course, these aren't necessarily designed to be colorblind friendly, or perceptually uniform, so use them with caution. They are quite pretty though. To underline how much you should not use these in a real scientific publication (apart from perhaps qualitative imaging), the lightness values are shown below.

For quantitative comparisons, please ensure that you use a perceptually uniform colour map (see e.g. those available directly through matplotlib).

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

swiftascmaps-1.5.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

swiftascmaps-1.5.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file swiftascmaps-1.5.0.tar.gz.

File metadata

  • Download URL: swiftascmaps-1.5.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for swiftascmaps-1.5.0.tar.gz
Algorithm Hash digest
SHA256 622b90d0a4f6cc4899f6b5a9ba6cd5de5118d349d538f6ca4064262be3a6262f
MD5 e7d0760b0ec48c465c6ff0d99ce60175
BLAKE2b-256 0a9337022ba5519b70b24448a316af18cf2dd9a50f24fcad400c8ef0d1507a10

See more details on using hashes here.

File details

Details for the file swiftascmaps-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for swiftascmaps-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d63e0c95cc44a923bda73ade1ae368a0411d6f6bae2178fa7c93cf7184b1f45
MD5 4275ae1b277b766ddc65ae1a23a5675d
BLAKE2b-256 6c23ceaa3fd95e44914b1324d0c2ee45a0f96aa0a839f0de62dfbfe09c4ae751

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