Skip to main content

Format numbers as multiples of Pi

Project description

Matplotlib Format Pi

Upload Python Package Downloads PyPI version

Create locator and formatter instances to make x/y labels and ticks correspond to multiples of pi.

The MultiplePi class provides methods to seamlessly tell matplotlib to create and format tick labels as multiples of pi.

In addition, the MultiplePi class allows a user to change the denominator of pi.

Multiples of π/{2, 3, 4, ...} can be represented if needed.

Examples

Simply, the instance can be asssigned a denominator of pi then passed to matplotlib.

Graph Example

The parameters can also be modified to adjust the output to something more sophisticated.

Tau Graph Example

Todo

  1. Raise error for improper usage (plugging in 1/4 for a multiple of 1/3)

Meta

Inspired by this post on StackOverflow.

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

matplot-fmt-pi-1.5.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

matplot_fmt_pi-1.5.0-py3-none-any.whl (5.0 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