Skip to main content

Plotting utilities

Project description

wunplots

Automating plot formatting

Basic Usage

from pathlib import Path

from wuncolors import ColorPalette, utils
from wunplots import Plotting

# See wuncolors package
palpath = Path(__file__)/"color_palette.toml"
colors = ColorPalette.from_toml(palpath, "example")

p = Plotting()

n = 1000
p.cycler_colors = utils.gradient(colors.all_colors("blue"), colors.all_colors("red"), n=n)
fig, ax = p.new(width=3, nrows=3, ncols=3)

for x in range(0, n):
    ax[0, 0].plot([x/n, x/n], [0, 1], label=x)

p.show()

It can also be used by creating a new class inheriting from Plotting with more attributes and it can contain all your plotting boilerplate code to be later re-used.

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

wunplots-0.1.1.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

wunplots-0.1.1-py3-none-any.whl (4.4 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