Functions and shortcuts to create latex-ready images from matplotlib
Project description
matplotlib-latex-bridge
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:
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for matplotlib-latex-bridge-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91ea8f36ce79fc2ad55745eb2e2d2f878941dfafa56c59be2d760f2f0514f1d2 |
|
MD5 | efc1393603728c730df811f6020880f8 |
|
BLAKE2b-256 | 2b1dc8eeabb55b4e51c9ae59e56a0637f4a47cd083a2c36c9511a1cd285d3666 |
Hashes for matplotlib_latex_bridge-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2aa77ba2191eeac9ed2d14bf695ea326f4b48b0e2b7186ade7ac15bd220364af |
|
MD5 | d5a7277b93e5ed0b9a1773ba18431a29 |
|
BLAKE2b-256 | 142722bb29786a0d1733f76d6eabc8dfe8372d8a7def03d166fd15a06041f12e |