Python: Document results and figures into tex document

120 Views Asked by At

I currently have written a script that produces several figures. I was wondering if there is a way to publish these figures directly into a tex file, say in eps format without including all of the python code verbatim. I also want to include the values of some variables. I looked at the module pweave (http://mpastell.com/pweave/) but I couldn't figure out a way to exclude code chunks. I'm new to python so any help would be much appreciated!

2

There are 2 best solutions below

0
On BEST ANSWER

You can use pweave. If you want a code chunk to be executed but not formatted, set the echo property to false. See http://mpastell.com/pweave/chunks.html#envvar-echo=Trueor(False)

0
On

Set echo to false before very code chunk, following the documentation: http://mpastell.com/pweave/defaults.html