4 ms·
I find Pgfplots quite hacky since TeX is really not made for handling data (it doesn't even support floating-point arithmetic). A much cleaner solution is to en
by fsh 3y ago
I find Pgfplots quite hacky since TeX is really not made for handling data (it doesn't even support floating-point arithmetic). A much cleaner solution is to enable LaTeX text rendering in Matplotlib (https://matplotlib.org/stable/users/explain/text/usetex.html https://matplotlib.org/stable/users/explain/text/usetex.html). In this way, TeX is used for what it is good at (text rendering), and everything else is handled by Matplotlib.
- blt 3y agoOr use Matplotlib's PGF backend. You can even import a preamble so the notation macros from your paper are usable in the legend, axes labels, etc.
- aborsy 3y agoThe idea is to process it all in Python and export the final data points to text files to be plotted by pgfplots. Then you can import the pgfplots code directly in the latex document or slide, and adjust it there. It will all be latex in one document, and you will have full control over the plot and its annotation. With Tikz, you can superimpose diagrams.