Dear Dani, thank you for your example, by which I could reproduce the issue. It turns out that you don't need to plot a whole graph, but just access some math text:
from pyx import *
text.set(cls=text.LatexRunner)
text.preamble(r'\usepackage{lmodern}')
c = canvas.canvas()
c.text(0, 0, "$x$")
c.writePDFfile()
And, its a plain bug. Here's the fix:
andre@mbp:~/python/pyx$ svn diff pyx/text.py
Index: pyx/text.py
===================================================================
--- pyx/text.py (revision 3627)
+++ pyx/text.py (working copy)
@@ -318,7 +318,7 @@
while m:
if not os.path.isfile(config.get("text", "chroot", "") +
m.group("filename")):
return msg
- r, m = remove_pattern(texmessage.quoted_file_pattern, r)
+ r, m = remove_pattern(p, r)
return r
quoted_graphics_pattern = re.compile(r'<"(?P<filename>[^"]+\.eps)">')
Please check whether this resolves your issue.
I will probably make a 0.14.1 release, as this is a simple fix for a rather
unfortunate bug. However, it will take some time, as I'm on vacation right now
and online by a weak cellphone link only.
Best,
André
Am 12.06.2015 um 10:33 schrieb Mico Filós <[email protected]>:
> Hi André
>
> That's interesting. This other example based on minimal.py doesn't work,
> though:
>
> from pyx import *
> text.set(cls=text.LatexRunner)
> text.preamble(r'\usepackage{lmodern}')
>
> g = graph.graphxy(width=8)
> g.plot(graph.data.file("minimal.dat", x=1, y=2))
> g.writePDFfile("minimal")
>
>
> Strange...
>
> Best,
> dani
--
by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim
/ \ \ / ) [email protected], http://www.wobsta.de/
/ _ \ \/\/ / PyX - High quality PostScript and PDF figures
(_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------
_______________________________________________ PyX-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyx-user
