Ask Your Question

lahwaacz's profile - activity

2020-03-30 19:16:47 +0100 received badge  Famous Question (source)
2016-11-16 01:44:08 +0100 received badge  Notable Question (source)
2016-04-05 08:25:57 +0100 received badge  Popular Question (source)
2015-05-18 09:32:36 +0100 commented answer How to set matplotlib backend from SageTeX?

Since Matplotlib is used internally by Sage for plotting, I was asking how to configure this instance of Matplotlib. It's a shame if that's not possible.

As for producing "LaTeX-like" plots, I was interested in the PGF output format (i.e. plt.savefig(MyPic.pgf) instead of plt.savefig(MyPic.pdf)), which is then \input in the LaTeX document and plotting is done using the TikZ package. Since this avoids assembling the tikzpicture environment by hand, the motivation for all this is pretty clear I think.

2015-05-17 22:47:57 +0100 asked a question How to set matplotlib backend from SageTeX?

The text labels in plots made from SageTeX support some LaTeX formatting, but this is done internally before writing to the output file, even in eps format. Multiple programs for vector graphics (e.g. Inkscape and Gnuplot) support a "eps+latex" format, where the text is left as-is to be typeset when included in a LaTex document. Is something like this possible with Matplotlib, Sage and finally SageTeX?

Since Matplotlib supports the PGF backend, I was thinking about using it with SageTeX to include plots as TikZ figures. Unfortunately I have not figured out a way to do this, the technical problem is that I'm not able to access the matplotlib module from SageTeX to even specify the font size. The solutions suggested in this question does not work for me, the font style and size remain constant (default).