Skip to main content

Some tools for making colormaps

Project description

rainbowpy

some of my own custom color tools

quick intro

rainbowpy is a simple tool to handle building color maps from a list of colors. There will likely me more features in the future.

You can create a YAML file and place it in:

$HOME/.rainbowpy/custom_maps.yml

which will be read on import will add the created color maps to your mpl library:

The format is

apples:
  - "#28CC5F"
  - "#29D48"
  - "#F3232"

iri:
  - "#FEFBE9"
  - "#FCF7D5"
  - "#f5f3c1"
  - "#eaf0b5"
  - "#ddecb5"
  - "#d0e7ca"
  - "#c2e3d2"
  - "#b5ddd8"
  - "#a8d8dc"
  - "#9bd2e1"
  - "#8dcbe4"
  - "#81c4e7"
  - "#7bbce7"
  - "#7eb2e4"
  - "#88a5dd"
  - "#9398d2"
  - "#9b8ac4"
  - "#9d7db2"
  - "#9a709e"
  - "#906388"
  - "#805770"
  - "#684957"
  - "#46353a"
import matplotlib.pyplot as plt
import rainbowpy

quick intro

rainbowpy is a simple tool to handle building color maps from a list of colors. There will likely me more features in the future.

You can create a YAML file and place it in:

$HOME/.rainbowpy/custom_maps.yml

which will be read on import will add the created color maps to your mpl library:

The format is

apples:
  - "#28CC5F"
  - "#29D48"
  - "#F3232"

iri:
  - "#FEFBE9"
  - "#FCF7D5"
  - "#f5f3c1"
  - "#eaf0b5"
  - "#ddecb5"
  - "#d0e7ca"
  - "#c2e3d2"
  - "#b5ddd8"
  - "#a8d8dc"
  - "#9bd2e1"
  - "#8dcbe4"
  - "#81c4e7"
  - "#7bbce7"
  - "#7eb2e4"
  - "#88a5dd"
  - "#9398d2"
  - "#9b8ac4"
  - "#9d7db2"
  - "#9a709e"
  - "#906388"
  - "#805770"
  - "#684957"
  - "#46353a"
import matplotlib.pyplot as plt
import rainbowpy
N = 1000
array_dg = np.random.uniform(0, 10, size=(N, 2))
colors = np.random.uniform(-2, 2, size=(N,))
fig, ax = plt.subplots()


ax.scatter(array_dg[:, 0], array_dg[:, 1], c=colors, cmap="iri")
<IPython.core.display.Javascript object>
<matplotlib.collections.PathCollection at 0x10f740890>

N = 1000
array_dg = np.random.uniform(0, 10, size=(N, 2))
colors = np.random.uniform(-2, 2, size=(N,))
fig, ax = plt.subplots()


ax.scatter(array_dg[:, 0], array_dg[:, 1], c=colors, cmap="iri")

png

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

rainbowpy-0.3.0.tar.gz (710.6 kB view details)

Uploaded Source

Built Distribution

rainbowpy-0.3.0-py3-none-any.whl (247.2 kB view details)

Uploaded Python 3

File details

Details for the file rainbowpy-0.3.0.tar.gz.

File metadata

  • Download URL: rainbowpy-0.3.0.tar.gz
  • Upload date:
  • Size: 710.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1

File hashes

Hashes for rainbowpy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 94265916390d6ee61caf6d00be48fa12e07e471d16485af33b4417fd06285b72
MD5 f246b84eeafa716fb16df51c26ac5f1d
BLAKE2b-256 e577a945afc3066e43a64b2b46472c8494789ecffd62f2f2aff2436cf2e1d3eb

See more details on using hashes here.

File details

Details for the file rainbowpy-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: rainbowpy-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 247.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1

File hashes

Hashes for rainbowpy-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01c636389e1b4dd035780095bcd1c5dd53111f01732ac5e4cf546b459ab8a4d3
MD5 4f4129f6840d3c5aa7f3d8c0a55cae67
BLAKE2b-256 9980f17c8ba18e31f503002147ee4f773274de423ce59aa941148b1a774f090b

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