Skip to main content

Functions and shortcuts to create latex-ready images from matplotlib

Project description

matplotlib-latex-bridge

Documentation Status

This library provides a set of functions and shortcuts to create latex-ready images with matplotlib.

This library is not a replacement for matplotib, it can just be used to set sensible settings in order to have figures with readable text and with a font size that is consistent both among various figures and with the rest of the text in the document.

Example:

example

Quickstart

Initialize the library using one of the presets provided:

import matplotlib_latex_bridge as mlb

mlb.setup_page(**mlb.formats.article_letterpaper_10pt_singlecolumn)

Create a new figure and use it as normal:

mlb.figure_textwidth()  # for full page images
mlb.figure_linewidth()  # for full column images

plt.plot(...)  # use matplotlib as normal

fig.savefig("image.png")

Include it in the latex file without scaling:

\begin{figure}
    \centering
    \includegraphics[scale=1]{image.png}
\end{figure}

That's it!

For more options please refer to the online documentation.

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

matplotlib-latex-bridge-0.1.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matplotlib_latex_bridge-0.1.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file matplotlib-latex-bridge-0.1.0.tar.gz.

File metadata

  • Download URL: matplotlib-latex-bridge-0.1.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for matplotlib-latex-bridge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 91ea8f36ce79fc2ad55745eb2e2d2f878941dfafa56c59be2d760f2f0514f1d2
MD5 efc1393603728c730df811f6020880f8
BLAKE2b-256 2b1dc8eeabb55b4e51c9ae59e56a0637f4a47cd083a2c36c9511a1cd285d3666

See more details on using hashes here.

File details

Details for the file matplotlib_latex_bridge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: matplotlib_latex_bridge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for matplotlib_latex_bridge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2aa77ba2191eeac9ed2d14bf695ea326f4b48b0e2b7186ade7ac15bd220364af
MD5 d5a7277b93e5ed0b9a1773ba18431a29
BLAKE2b-256 142722bb29786a0d1733f76d6eabc8dfe8372d8a7def03d166fd15a06041f12e

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