by masasin

masasin / latexipy

Generate beautiful plots for LaTeX using your existing matplotlib-based code.

126 Stars 12 Forks Last release: Not found MIT License 129 Commits 2 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:



.. image:: :target: :alt: PyPI version

.. image:: :target: :alt: Test status

.. image:: :target: :alt: Documentation Status

.. image:: :target: :alt: Updates

.. image:: :target: :alt: MIT License

Generate beautiful plots for LaTeX using your existing Matplotlib-based code.

You can also use this package to generate plots without using LaTeX. Just don't run

  • Free software: MIT license
  • Documentation:


To plot in Python:

.. code-block:: python

import latexipy as lp

lp.latexify() # Change to a serif font that fits with most LaTeX.

with lp.figure('filename'): # saves in img/ by default. draw_the_plot()

.. image::

To display in LaTeX:

.. code-block:: latex


See the examples_ directory for some example code, their resulting images, as well as an example LaTeX file and its output PDF_.

.. _examples: .. _PDF:


  • Automatically generate multiple plot types, such as PDF, PNG, and PGF for LaTeX.
  • Works with all Matplotlib-based packages, including Seaborn and Pandas.
  • Allows for easily changing the style temporarily.


This package was created with Cookiecutter_ and the

_ project template.

.. _Cookiecutter: .. _


We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.