Skip to main content

Live rendering of python code using matplotlib

Project description

Mkdocs-Matplotlib

PyPI version Test Release Pipeline Code Quality Documentation Status Python version License: MIT pre-commit Black

Mkdocs-Matplotlib is a plugin for mkdocs which allows you to automatically generate matplotlib figures and add them to your documentation. Simply write the code as markdown into your documention.

screenshot

Quick Start

This plugin can be installed with pip

pip install mkdocs-matplotlib

To enable this plugin for mkdocs you need to add the following lines to your mkdocs.yml.

plugins:
  - mkdocs_matplotlib

To render a code cell using matplotlib you simply have to add the comment # mkdocs: render at the top of the cell.

# mkdocs: render
import matplotlib.pyplot as plt
import numpy as np

xpoints = np.array([1, 8])
ypoints = np.array([3, 10])

plt.plot(xpoints, ypoints)

In addition you can add the comment # mkdocs: hidecode to hide the code and and # mkdocs: hideoutput to hide the output image of the cell.

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

mkdocs_matplotlib-0.10.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_matplotlib-0.10.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_matplotlib-0.10.0.tar.gz.

File metadata

  • Download URL: mkdocs_matplotlib-0.10.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.12 Linux/5.13.0-1023-azure

File hashes

Hashes for mkdocs_matplotlib-0.10.0.tar.gz
Algorithm Hash digest
SHA256 a05d72625fedb2ae145a4256cdedc20d6f0991a76b189d9f36a64a24b0fb1678
MD5 9fba23fe6b0b046062d52c8dd4733dec
BLAKE2b-256 85da0e1bc2f336f1a22703e323e82606bbe75642b6200b6f26a68eb8eb8da98f

See more details on using hashes here.

File details

Details for the file mkdocs_matplotlib-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_matplotlib-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.12 Linux/5.13.0-1023-azure

File hashes

Hashes for mkdocs_matplotlib-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99d36f26112a3d206ba581261f353f1db035cd1586a20b2a112befec09c3bc59
MD5 93815f31dab40a20167da3c6088a0f95
BLAKE2b-256 46db158dbb8dc56f6b1570abfd98db26c840fc561d2920b9becce09e49c663c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page