Skip to main content

Matplotlib-based library for the creation of block diagrams

Project description

name name

Blockplotlib

Matplotlib-based library for the creation of block diagrams. Besides this core functionality, blockplotlib provides a workflow to include all kinds of matplotlib figures with the correct font size into latex documents. While latex is also often used to render text inside figures/block diagrams, blockplotlib (as matplotlib) depends not on latex.

The functionality of the library is limited to the features demonstrated in the examples but can be extended quite easily.

Examples

How to draw a simple control loop is illustrated with the example blockplotlib/examples/control_loop_one_dof.py.

control_loop_one_dof.pdf

A more complex example is the block diagram of the so-called hyperbolic observer canonical form: blockplotlib/examples/hyperbolic_ocf.py

hyperbolic_ocf.pdf

The inclusion of matplotlib figures with the correct font size into a latex document can be adapted from the example under blockplotlib/examples/tex_article. It basically relies on two measurements of the height of a string. One measurement is performed in the latex preamble and the other one in the respective matplotlib figure using a blockplotlib function.

More examples can be found under blockplotlib/examples/.

Installation

One way to use blockplotlib is to install it via pip (pip install blockplotlib). Another way to use it is to copy the file blockplotlib.py in the folder of the Python script from which it is to be imported.

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

blockplotlib-2023.1.4.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

blockplotlib-2023.1.4-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file blockplotlib-2023.1.4.tar.gz.

File metadata

  • Download URL: blockplotlib-2023.1.4.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for blockplotlib-2023.1.4.tar.gz
Algorithm Hash digest
SHA256 80de3e6ec8ece07221bd39cbf308d47ad2166add91cc0c9acf2a613bf4e4ad74
MD5 626446b6181c693d4c9847058e243c37
BLAKE2b-256 2fb93b1d4ff1b68b72d5574ccbdf450ef81d2f18e52eb3888ee4dd09553fc057

See more details on using hashes here.

File details

Details for the file blockplotlib-2023.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for blockplotlib-2023.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 74b6c7ac9d607c3a096145d81396cacc279537ba641b18b6098f2d6b84199bfb
MD5 a9a0af8ef4b3e80e787c71c78aa29dd2
BLAKE2b-256 c6a04a1a5279585206602febf8c79b9fd0a6371e8a66c3c2d6f20d4e664be5c4

See more details on using hashes here.

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