Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

matplot-fmt-pi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

matplot-fmt-pi

Format numbers as multiples of Pi

  • 2.1.0
  • PyPI
  • Socket score

Maintainers
1

Matplotlib Format Pi

DOCS

Branches

Master

VersionUpload StatusDownloads
PyPIUpload Python PackagePyPI - Downloads

Release

VersionUpload StatusSize
GitHub tag (latest by date)Test Upload Python PackageGitHub code size in bytes

Format multiples of pi as strings on Matplotlib axes.

The MultiplePi class creates a Locator to place ticks at desired multiples and a Formatter to format all tick labels.

The base (π or τ) can be divided by any Natural Number.

Multiples of one-π or one-τ can be placed/formatted too. (2π, 3π, 2τ, 3τ, etc.)

Installing

pip install matplot-fmt-pi

Examples

from matplot_fmt_pi.ticker import MultiplePi

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

Y-Axis Example

Running Examples

Clone, then from the repo,

cd examples/
python *.py

Put the repo's directory in the python path to import the matplot_fmt_pi folder not the installed package.

PYTHONPATH=/home/user/py-pros/format-pi python examples/pi_graph.py

Todo

  • Add testing option once installed (Like numpy.test())
  • Windows make.bat?

Meta

PyPI - License

Inspired by this post on StackOverflow.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc