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 matplotlib, 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:
Install
The latest stable version can be installed via pip:
pip install matplotlib-latex-bridge
Otherwise, the library can be installed from sources:
git clone https://github.com/loreucci/matplotlib-latex-bridge.git
cd matplotlib-latex-bridge
pip install -e .
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_columnwidth() # 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.
Release files for matplotlib-latex-bridge 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| matplotlib-latex-bridge-0.2.0.tar.gz | 18.4 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| matplotlib_latex_bridge-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
| matplotlib_latex_bridge-0.2.0-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 55.6 kB
Release files / matplotlib-latex-bridge-0.2.0.tar.gz
| Download URL | matplotlib-latex-bridge-0.2.0.tar.gz |
|---|---|
| Size | 18.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7270f4c8f380a6ad30db263c98acd09cf1e86023251a365a997d714c3d54b849
|
|
BLAKE2b-256 checksum How to use checksums |
608166748a7796fa190f826df669f90aceab6ca308cbb6f3712e14e2bee931f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Release files / matplotlib_latex_bridge-0.2.0-py3-none-any.whl
| Download URL | matplotlib_latex_bridge-0.2.0-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56df566d18f2c874362b49d149077c52357e942ec3e38f714c90a5c327cd0a81
|
|
BLAKE2b-256 checksum How to use checksums |
fc11f39eea37e3815443b0abcc8354da1d6ae0f82ef8c9eb4ac47ac7e30387e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Release files / matplotlib_latex_bridge-0.2.0-py2-none-any.whl
| Download URL | matplotlib_latex_bridge-0.2.0-py2-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
3174b107b51add37541c2f0aafd950102cec4ea8be6c242880801b10a8c550ad
|
|
BLAKE2b-256 checksum How to use checksums |
7b7eae00243eacf16f18c5b5dddf7c8877b50ed8635a74d2ca47c4176681ff56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|