Tips and tricks to write LaTeX papers in with figures generated in Python
1–10 of 68 posts
Re: Tips and tricks to write LaTeX papers in with figures generated in Python
#2It’s worth pointing out that the figures are made using the matplotlib library, which is primarily based on Matlab’s plotting functionality. This is perhaps just as useful for new researchers as many of them are taught Matlab exclusively throughout their undergraduate courses.
Re: Tips and tricks to write LaTeX papers in with figures generated in Python
#3An approach I have adopted recently is Knitr[1], so this layer of indirection goes away. With knitr, my data goes directly into the paper repository, and then my Makefile has something like this:
%.tex: graphs/%.Rnw
Rscript -e "library(knitr); knit('$?')"
The nice thing is exactly what the authors recommend: it's much easier to enforce a standard appearance across all the figures, and automatically incorporate more recent data into the paper as part of the compilation process.Re: Tips and tricks to write LaTeX papers in with figures generated in Python
#4Re: Tips and tricks to write LaTeX papers in with figures generated in Python
#5Thanks for the write-up! Two notes from my experience: pgf output works well with latex as well (although will slowdown compilation), and I recommend not using the pyplot submodule, especially if you'll be running things remotely over ssh and don't have a display
Re: Tips and tricks to write LaTeX papers in with figures generated in Python
#6Not a native speaker, though.
Re: Tips and tricks to write LaTeX papers in with figures generated in Python
#7Meta: there seems to be an extra "in" in the title, that makes no sense to me, at least. Not a native speaker, though.
Re: Tips and tricks to write LaTeX papers in with figures generated in Python
#8Thanks for the write-up! Two notes from my experience: pgf output works well with latex as well (although will slowdown compilation), and I recommend not using the pyplot submodule, especially if you'll be running things remotely over ssh and don't have a display
Would you suggest an alternative to pyplot? What problems does it cause for you?
Re: Tips and tricks to write LaTeX papers in with figures generated in Python
#9I found this helpful when writing a paper where the appendix needed over 35 different tables of regression results, all with the same format but populated with data from different subpopulations, which would need to be regenerated (including updated captions, etc.) any time data cleaning or methodology was changed.