|
|
|
|
|
by PythonNut
1598 days ago
|
|
Wow, this sounds really cool! Out of curiosity, did you get bad results with the pure PGF backend? (And can you link to your script by any chance?) I'm always amazed that including matplotlib plots in LaTeX documents is so fraught since it's such common use case. Also I read that matplotlib 3.5 has some sort of improved support for type 42 subsetting. I haven't had a chance to try it out yet but this could be a welcome improvement! |
|
And good point, the PGF works just as well (results should be identical), but since all the plot information has to be compiled by latex, it ends up ballooning the compilation time of the tex doc and the matplotlib PGF page suggests that you can run into memory issues as well. I was doing this for a thesis with 50+ plots and so still wanted compilation to be fast.
I've suggested this as an improvement to matplotlib, but unlikely to be merged since maybe it's a bit hacky (although it's very similar to what Inkscape's export to LaTeX option does): https://github.com/matplotlib/matplotlib/issues/22297 (the backend file can be found here: https://github.com/matplotlib/matplotlib/files/7921801/backe...)
And the gs script is below: