Closed wtbarnes closed 5 years ago
I think you need this block: https://github.com/Cadair/texfigure/blob/master/examples/texfigure_intro.tex#L45 specifically the pytex.formatter = texfigure.repr_latex_formatter
line.
Also depending on your version of pythontex (i.e. if it has the patch for gpoore/pythontex#65 or not) you will need this: https://github.com/Cadair/texfigure/blob/master/examples/texfigure_intro.tex#L7 block as well. (I think that might be for the mpl latex config and not to fix the repr now I think about it)... :thinking:
Thanks! I needed that last patch as well.
It's also worth noting that gpoore/pythontex#66 would render the pytex.formatter
line redundant as well.
Instead of the figure in the document, I get the matplotlib
Figure
repr, i.e. the memory address of the or what you get when you just print aFigure
at the command line.Version Info
Python: 3.6.4 TeXLive 2018 pythontex: 0.16 texfigure: master matplotlib: 2.2.2
MWE
test_texfigure.tex
and the resulting document looks like this,