Skip to main content

A sarcastic color scheme for matplotlib.

Project description

Sarcastic Color Scheme

Color scheme for when you want to present some data visualization, but sarcastically.

This is useful for

  • presenting bad data where you aren't confident in the results,
  • turning in assignments you'd rather not do
  • annoying people who care about good dataviz

Features

The code for all the demos can be found here.

Afwul background

Yes, you saw that correctly, there are two different awful background colors for the plot background and the legend background.

Terrible plot colors

Yes, the colors on display here are cyan, grey, light blue, purple and orange. Yes, that looks terrible.

Bad spacing

You may have noticed the abysmal spacing of the title. Yes, that is deliberate.

Weird inexplicable borders / grid

Yes, you are right that the borders aren't all correctly there.

Colored axes

Yep, the axes are colored, different colors.

Inconsistent Style

This wouldn't be maximally awful if it was consistent, which is why running exactly the same code two more times yields these:

This way, not only is every graph terrible looking, but you can't get used to the style!

How to install and use

You can install this package using the following command

pip install sarcastic-color-scheme

To use it you can run

from sarcastic_color_scheme import sarcastic

and then either run

sarcastic.sarcastic()

to make all subsequent graphs sarcastic (sarcastic.normal() undoes the change), or to make a single graph sarcastic run

with sarcastic:
    # your graph code here

Configurable

If you look at the code you'll notice that you use a context manager to make sure that the sarcasm mode is enabled:

with sarcastic:
    test_graph()

You can also run

sarcastic.sarcastic()
test_graph()
sarcastic.normal()

to get the same effect, without the context manager. After the context manager is complete, the styles are reset to where they were before it ran as can be seen in the plot

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

sarcastic-color-scheme-0.2.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

sarcastic_color_scheme-0.2.0-py3-none-any.whl (17.3 kB view hashes)

Uploaded Python 3

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