Live rendering of python code using matplotlib
Project description
Mkdocs-Matplotlib
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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mkdocs_matplotlib-0.10.1.tar.gz
.
File metadata
- Download URL: mkdocs_matplotlib-0.10.1.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-1029-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c1e6b765d9025a3ca4cc9d55b6826d1eee8e67128f1aeb06c278e4256504aa9 |
|
MD5 | 58519dbb0b3fdcab290eba6ce8443fd5 |
|
BLAKE2b-256 | a5146246fc058f3c12e9d2077a9f046e90d3c944ce1b97823b2b4e2f14616365 |
File details
Details for the file mkdocs_matplotlib-0.10.1-py3-none-any.whl
.
File metadata
- Download URL: mkdocs_matplotlib-0.10.1-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-1029-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5c3337b4b3588d6f7bbe059db85cd9d05dcaf72f71281938d8fea7df090d16a |
|
MD5 | 27f2ed7bff0d9719f79d8f413040d54a |
|
BLAKE2b-256 | 4411e189173d0ba2061a3f551779c8fb92aedccb37dfece51951c9a54e571b6e |