Skip to main content

Seamless LaTeX and Matplotlib integration for publication plots

Project description

https://travis-ci.com/hugombarreto/pubplot.svg?token=WbvxSoxYCEXuq2yHcffB&branch=master

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

Usage

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))
>>> fig.save('plot_name')

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.

usepackage{pgf}

Installing

Ubuntu/Debian

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

macOS

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.

Source Distribution

pubplot-0.1.2.tar.gz (9.2 kB view details)

Uploaded Source

File details

Details for the file pubplot-0.1.2.tar.gz.

File metadata

  • Download URL: pubplot-0.1.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pubplot-0.1.2.tar.gz
Algorithm Hash digest
SHA256 33eea1ad28a82fccab57088ef1e1b72a104939778cd58696a953cc3ce347daa9
MD5 85de45859b71b962b24c38fd2beadba0
BLAKE2b-256 71fd4d15e8fe1b1b5ea16107af2939137802f50eb3311aa0d7cc3148e4ff64c0

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