Skip to main content

Some charts I prepared earlier

Project description

Ideal Forms

"Some charts I prepared earlier."

Matplotlib charts formatted according to The Data Visualization Catalogue.

Install

pip install idealforms

Bar

from idealforms.bar import bar
from idealforms.formatters import money_formatter

categorical_data = dict(apples=500000,
                        oranges=1200000,
                        mangos=2200005)

fig, ax = bar(categorical_data,
              x_label='revenue',
              y_label='fruit',
              title='Fruit Revenue',
              formatter=money_formatter)

ideal bar chart image

Pie

import matplotlib.pyplot as plt
from idealforms.pie import pie
from collections import Counter
my_pi = "3.1415926535897"
pi_digits_count = Counter(str(my_pi).replace('.',''))

fig, ax = pie(
    pi_digits_count, 
    title='Py Pi Pie', 
    reverse_color_order=True,
    largest_color='xkcd:macaroni and cheese',
    figsize=(4,4)
)
plt.show()

ideal pie chart image

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

idealforms-0.0.14.tar.gz (72.0 kB view hashes)

Uploaded Source

Built Distribution

idealforms-0.0.14-py3-none-any.whl (7.1 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