Git Product home page Git Product logo

aesthema's Introduction

Aesthema

Aesthema provides modern & visually appealing colormaps for Matplotlib.

Matplotlib is a great package for visualizations, but we've all been there when you start creating your own colormaps because the default ones look not really appealing or you need to stick to your already existing theme. This is where this small package comes into play. Instead of creating your own colormaps all the time, you can use the provided colormaps or you can also easily create your own colormaps either by using the provided colors or any RGB color.

Currently available colors:

Available colors

Currently available colormaps:

Available colormaps

Quickstart

You can install the package using pip:

pip install aesthema

Let's take a look at some examples:

import numpy as np
import matplotlib.pyplot as plt

from aesthema import use_colormap


use_colormap()

x = np.linspace(0, 2 * np.pi, 100)

plt.figure()

plt.plot(x, np.sin(x))
plt.plot(x, np.cos(x))
plt.plot(x, np.sin(x + np.pi / 4))
plt.plot(x, np.cos(x + np.pi / 4))
plt.plot(x, np.sin(2 * x))
plt.plot(x, np.cos(2 * x))

plt.title("Sine and Cosine")
plt.xlabel("x")
plt.ylabel("Amplitude")
plt.show()

Line plot example

In this example, we use the default colormap. If you want to use a different colormap, just specify it when calling use_colormap, e.g.:

from aesthema import use_colormap, Colormaps


use_colormap(Colormaps.PASTEL)

You can also create your own custom colormap using either the colors provided in this package or any RGB color:

from aesthema import create_colormap, use_colormap, Colors


my_colormap = create_colormap(
    [
        Colors.RED,
        Colors.ORANGE,
        Colors.LEMON,
        (141, 215, 127),
        Colors.LIGHT_OCEAN,
        (47, 72, 88),
    ]
)
use_colormap(my_colormap)

Contributing

You created a nice colormap that you want to share with others? Awesome! Create a pull request and we will add it.

aesthema's People

Contributors

jspieler avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.