Skip to main content

Seamless LaTeX and Matplotlib integration for publication plots

Project description

pubplot makes easy to create publication quality plots that fit elegantly in your LaTeX document.


Start creating a document matching your LaTeX documentclass:

>>> from pubplot import Document
>>> from pubplot.document_classes import acm_sigconf
>>> doc = Document(acm_sigconf)

Now you can use your newly created doc to make plots that fit well in an ACM conference paper.

>>> fig, ax = doc.figure()
>>> ax.plot(range(11), range(11))

This will create two files plot_name.pdf and plot_name.pgf.

plot in a LaTeX document

If you are familiar with matplotlib you will have no problem using pubplot.




Make sure you have an updated LaTeX installation:

sudo apt update
sudo apt install texlive-base texlive-latex-recommended texlive-fonts-recommended texlive-publishers

Now install pubplot using pip:

pip install pubplot


You need a basic LaTeX installation. An easy way of getting LaTeX on a mac is through homebrew cask (although any other form of getting mactex should be fine):

brew cask install mactex

Now install pubplot using pip:

pip install pubplot

Optional but recommended. Matplotlib works better if you install some dependencies, if you use homebrew that can be accomplished with:

brew install libpng freetype pkg-config fontconfig

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pubplot-0.1.2.tar.gz (9.2 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page