3 ms·
I use Matplotlib for my publications written in latex. Matplotlib can also render via a latex backend, which gives you then matching fonts and symbols in the te
by sonium 12y ago
I use Matplotlib for my publications written in latex. Matplotlib can also render via a latex backend, which gives you then matching fonts and symbols in the text and figure by using something as simple as:
rc('text', usetex=True)
matplotlib.rcParams['text.latex.preamble'] = ['\\usepackage{siunitx}']
Here is an example from my own publication, with 100% Matplotlib and latex:
http://scitation.aip.org/content/aip/journal/apl/104/9/10.1063/1.4867908 http://scitation.aip.org/content/aip/journal/apl/104/9/10.10...
A clear advantage using Matplotlib is reusability as opposed to the time needed to set the plotting parameters right for every single figure over and over. I would really recommend this kind of workflow to anyone in academic publishing.
- yannis 12y agoCan you post a link that is not behind a $28 paywall for having to look at an example?
- fdh 12y agoI found pgfplots delivers great results for plots in academic papers written in latex and also enables reusability. You can reuse templates for similar plots and simply switch out the .csv file containing the data.
- privong 12y agoAnother way to do this (if one wants all plots to be rendered throug LaTeX) is to modifiy the matplotlibrc to include: text.usetex : True And something similar for the text.latex.preamble section.