Skip to main content

BSIC Plotting Library

Project description

MPL BSIC Package

Installation

To install, run

pip install mpl_bsic

Then you can import the functions from the module, for example

The package supports all python versions starting from 3.9

from mpl_bsic import apply_bsic_style

Docs and TLDR

Read the docs on this link. All the functions are explained extensively and you can find example code/plots.

WARNING: Be sure to read the docs for apply_bsic_style, and in particular how it handles the title of the plot. If you don't follow that rule, the title of the plot will be rendered using Garamond and not Gill Sans MT (which is the correct font which should be used). And also read carefully the part about the figsize to use, especially when exporting to use in a Word file.

A brief overview of the functions of the module:

  • apply_bsic_style: applies the BSIC styles to a plot (font families, font sizes).
  • apply_bsic_logo: applies the BSIC logo to the plot. You can specify the size, location and logo type.
  • check_figsize: checks the figsize of your plot, to make sure it will be rendered correctly in MS Word. To learn more about this, look at the documentation
  • format_timeseries_axis: formats the x axis of a timeseries plot. You can specify the time unit (yearly, monthly, daily), the frequency (e.g. a tick every 3M), and the format (e.g. MM/YYYY or MMM YYYY)
  • preprocess_dataframe: preprocesses a dataframe, by setting the index to the date (and converting to datetime) and transforming all the columns to lowercase for easier use in the project
  • plot_trade: this function is WIP

If the matplotlib fonts do not work

Check the full guide on the documentation. Anyway, you need to install Garamond and Gill Sans MT and clear your matplotlib cache.

Coming Next / TODOs (if you have any ideas be sure to tell me)

  1. plot trade (as bloomberg with last price and stuff)

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

mpl_bsic-1.1.6.tar.gz (4.5 MB view details)

Uploaded Source

Built Distribution

mpl_bsic-1.1.6-py3-none-any.whl (4.5 MB view details)

Uploaded Python 3

File details

Details for the file mpl_bsic-1.1.6.tar.gz.

File metadata

  • Download URL: mpl_bsic-1.1.6.tar.gz
  • Upload date:
  • Size: 4.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for mpl_bsic-1.1.6.tar.gz
Algorithm Hash digest
SHA256 83fdb76c8f0c444991e8c90160a9687a15605ce3660ca3b829f7fadf610f5e4d
MD5 c51a92e40ca7f19c1657999fdffd9319
BLAKE2b-256 64c947c19128cf6d1c6df0edf1fa2ec5c5304b60b2c31a78a43b077f4daca006

See more details on using hashes here.

Provenance

File details

Details for the file mpl_bsic-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: mpl_bsic-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for mpl_bsic-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9227fbd1d3e3d9e544a59cd4889911d40146fdec86f85ef3d028824f9355e432
MD5 bdcaf17e620baab3c0c6f76f10301af5
BLAKE2b-256 c1d43dc30b349d6891a8ec98331b5a8085cf027b0d08bbe1624b17b64cb16c91

See more details on using hashes here.

Provenance

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