Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8
Render and include figures in Pandoc documents using your plotting toolkit of choice
License
LaurentRDC/pandoc-plot
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
pandoc-plot turns code blocks present in your documents (Markdown, LaTeX, etc.) into embedded figures, using your plotting toolkit of choice, including Matplotlib, ggplot2, MATLAB, Mathematica, and more.
This program is aPandoc filter. It can thereforebe used in the middle of conversion from input format to output format,replacing code blocks with figures.
The filter recognizes code blocks with classes that match plottingtoolkits. For example, using thematplotlib toolkit:
#My documentThis is a paragraph.```{.matplotlib}import matplotlib.pyplot as pltplt.figure()plt.plot([0,1,2,3,4], [1,2,3,4,5])plt.title('This is an example figure')```
Putting the above ininput.md, we can then generate the plot and embedit in an HTML page:
pandoc --filter pandoc-plot input.md --output output.html
The resultingoutput.html looks like this:
<h1id="my-document">My document</h1><p>This is a paragraph.</p><figure><imgsrc="plots\9671478262050082276.png"/></figure>
pandoc-plot currently supports the following plotting toolkits(installed separately):
matplotlib: plots using thematplotlibPython library;plotly_python: plots using theplotly Python library;plotly_r: plots using theplotly Rlibrarymatlabplot: plots usingMATLAB;mathplot: plots usingMathematica;octaveplot: plots usingGNUOctave;ggplot2: plots usingggplot2;gnuplot: plots usinggnuplot;graphviz: graphs usingGraphviz;bokeh: plots using theBokeh visualization library;plotsjl: plots using theJuliaPlots.jlpackage;plantuml: diagrams using thePlantUML software suite;sageplot: plots using theSage software system;d2: plots usingD2;asymptote: plots usingAsymptote;mermaid: plots using theMermaidJS.
To know which toolkits are useable onyour machine (and which ones arenot available), you can check with thetoolkits command:
pandoc-plot toolkits
Wish your plotting toolkit of choice was available? Pleaseraise anissue!
You can find more information in the documentation, available either in thesource repository fileMANUAL.md, on thewebpage, or via the commandpandoc-plot --manual.
Windows, Linux, and Mac OS binaries are available on theGitHub releasepage. There arealso Windows installers.
Likepandoc,pandoc-plot is available as a package installable withconda.Click here to see thepackage page.
To install in the current environment:
conda install -c conda-forge pandoc-plot
pandoc-plot is available as a package viaHomebrew.Click here to see the package page.
To install:
brew install pandoc-plot
You can installpandoc-plot from theWindows PackageManagerwinget (just likepandoc). To install:
winget install pandoc-plot
pandoc-plot is available onHackage andStackage. Usingthecabal-install tool:
cabal updatecabal install
Building from source can be done usingcabal:
git clone https://github.com/LaurentRDC/pandoc-plotcd pandoc-plotcabal install# Alternatively, `stack install`
About
Render and include figures in Pandoc documents using your plotting toolkit of choice
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.