Skip to content

Repository files navigation

Mkdocs-Matplotlib

PyPI versionTestRelease PipelineCode QualityDocumentation StatusPython versionLicense: MITpre-commitBlack

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: renderimportmatplotlib.pyplotaspltimportnumpyasnpxpoints=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.

About

A mkdocs plugin to automatically render matplotlib figure in your documenation

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages