You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to render plots directly to TikZ for embedding as native graphics in (La/Con)TeX(t). There are random, small projects across the web that I've found that offer provisional translation from EPS or SVG to TikZ, but nothing really complete. In fact, given a simple test case
but I'd rather have something that I can script, or better yet, have matplotlib output plots directly into TikZ code.
SourceForge Comments
On Sat May 8 06:27:11 2010, None wrote:
I've started a matplotlib2tikz converter some time ago at GitHub, as a proper backend is not really suitable for the task: Backends only have access to basic information like "draw a line from a to b" instead of "draw x-tick at 0.4", which is what TikZ/Pgfplots needs. Anyway, most of this stuff can really be fetched from all those get_* methods.
I've been working this morning on it a bit, and right now the converter should be in okay shape for simple plots, some colored graphs with labels, legends, this kind of stuff.
Just poke me on GitHub or so if you're still motivated. :)
Cheers,
Nico
The text was updated successfully, but these errors were encountered:
The pgf backend should indeed resolve the issue, except if you expected the output to be human readable or editable.
This is probably what matplotlib2tikz is supposed to do, but as Nico said, this cannot be realized as a backend. Also, since matplotlib2tikz must interpret and recreate the whole figure from matplotlib it will never exactly reproduce the result you'll see with a backend, which is why I started the pgf-backend.
Original report at SourceForge, opened Thu Aug 20 12:42:48 2009
It would be nice to render plots directly to TikZ for embedding as native graphics in (La/Con)TeX(t). There are random, small projects across the web that I've found that offer provisional translation from EPS or SVG to TikZ, but nothing really complete. In fact, given a simple test case
http://matplotlib.sourceforge.net/examples/api/histogram_demo.html
that matplotlib rendered in SVG or EPS, each one failed in one way or another. The most promising seems to be an inkscape plugin,
http://code.google.com/p/inkscape2tikz/
but I'd rather have something that I can script, or better yet, have matplotlib output plots directly into TikZ code.
SourceForge Comments
On Sat May 8 06:27:11 2010, None wrote:
I've started a matplotlib2tikz converter some time ago at GitHub, as a proper backend is not really suitable for the task: Backends only have access to basic information like "draw a line from a to b" instead of "draw x-tick at 0.4", which is what TikZ/Pgfplots needs. Anyway, most of this stuff can really be fetched from all those get_* methods.
I've been working this morning on it a bit, and right now the converter should be in okay shape for simple plots, some colored graphs with labels, legends, this kind of stuff.
Just poke me on GitHub or so if you're still motivated. :)
Cheers,
Nico
The text was updated successfully, but these errors were encountered: