Package to output matplotlib figures to latex.
Project description
mpl2tex
Description
This repository converts matplotlib plots to a latex document. Enabling the annotation of figures in an organized manner. It is not meant to generate beautiful figures, but rather keep one's plots a bit more organized.
Components
Currently the package is composed of three different classes.
- TextoFig - Helper classe the manages latex files as well as directory organization.
- TexFig - A class which handles generating latex syntax and saving matplotlib figures in the right directory.
- MPTexFig - A class which creates a multiple panel figure from a list of TexFig.
mpl2tex.TexFig()
Class to generate a single panel figure.
figure:Takes anmpl.Figurecaption:Longer description of data presented in figure.title:Short title used for table of contents.figure_filenameDefault file name is lower case title.subfigure:Boolean - default is False.output_type:File suffix - defual is.pdffigure_size:Float relative to\textwidth
mpl2tex.TexFig(figure, caption, title, subfigure)
mpl2tex.MPTexFig()
Class to generate a multipanel figure.
figures:List ofmpl2tex.TexFigtitle:Short title used for table of contents.caption:Longer description of data presented in figure.
mpl2tex.MPTexFig(Figures = figures, caption, title)
mpl2tex.figtotex()
Function that generates and runs the methods of MPTexFig. To add figure to LaTex document.
plot_type: Name for type of plots (e.g. experimentA_replicate_correlations)
figures: List of TexFig or MPTexFig
outpath: Path to output directory
mpl2tex.figtotex(plot_type, figures, outpath)
Organization of output directory
output\
inputs\plot_type.tex
plots\plot_type\plot.pdf
main.tex
- Plots are labeled with the date. The package will not overwrite existing plots.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mpl2tex-0.0.1.tar.gz.
File metadata
- Download URL: mpl2tex-0.0.1.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c9ddf22e68aa9ada616b5c4f4e098c9f7d3c6a7e4333d77b77fdcb602f7ada3
|
|
| MD5 |
b48acf0ae0688e94db22ff47e660275e
|
|
| BLAKE2b-256 |
9f139da695ccdd6fe69ee7cfa9e71d0e987e9f727dc817e2533c0539d237d99e
|
File details
Details for the file mpl2tex-0.0.1-py3-none-any.whl.
File metadata
- Download URL: mpl2tex-0.0.1-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f808480356955bd7f08f7a47e4ed7eb447f809cadddb9bab6d3fd753786c130
|
|
| MD5 |
03ffb1dd213b585d160d7f35d7019264
|
|
| BLAKE2b-256 |
14f887ff85f87e2c651478cc5a8791e9232c9ebe1075af04d2d1863d9dbfe9ad
|