* http://pyx.sourceforge.net/ PyX is a Python package for the creation of PostScript and PDF files. It combines an abstraction of the PostScript drawing model with a TeX/LaTeX interface. Complex tasks like 2d and 3d plots in publication-ready quality are built out of these primitives. {{{#!blog phk 2006-08-29T00:09:43 ÇÑ±Û PDF ¸¦ ¸¸µå´Â PyX ¿¹Á¦ ´ÙÀ½Àº hangul ÆÐÅ°Áö¸¦ »ç¿ëÇϹǷΠeuc-kr ÀÎÄÚµùÀ¸·Î ÀúÀåµÇ¾î¾ß ÇÏ´Â Python ¼Ò½º ÄÚµåÀÔ´Ï´Ù. ´ÙÀ½À» ½ÇÇàÇϸé hangulTest.eps ÆÄÀÏ°ú hangulTest.pdf ÆÄÀÏÀÌ »ý¼ºµË´Ï´Ù. {{{#!vim python #!/usr/bin/python # -!- coding: euc-kr -!- # # ÆÄÀϸí: hangulTest.py from pyx import * text.set(mode="latex") text.preamble(r"\usepackage{hangul}") text.preamble(r"\usepackage{times}") c = canvas.canvas() c.text(0, 0, r"\LaTeX ÇÑ±Û Å×½ºÆ®: \ $y = \frac{1}{\sqrt{x}} \ \mbox{(´Ü, $x > 0$)} $ \ by PyX.") c.writeEPSfile("hangulTest") c.writePDFfile("hangulTest") \}}} }}} {{{#!blog phk 2006-08-29T00:09:43 Çѱ۰ú ±×·¡ÇÈÀÌ Æ÷ÇÔµÈ PDF ¸¦ ¸¸µå´Â PyX ¿¹Á¦ À̹ø¿¡´Â Çѱ۰ú ±×·¡ÇÈÀÌ Æ÷ÇÔµÈ PDF ÆÄÀÏ¿ï ¸¸µå´Â Python ¼Ò½º ÄÚµåÀÔ´Ï´Ù. ´ÙÀ½À» ½ÇÇàÇϸé painterHangul.eps ÆÄÀÏ°ú painterHangul.pdf ÆÄÀÏÀÌ »ý¼ºµË´Ï´Ù. {{{#!vim python #!/usr/bin/python # -!- coding: euc-kr -!- # # ÆÄÀϸí: painterHangul.py from pyx import * text.set(mode="latex") text.preamble(r"\usepackage{hangul}") mypainter = graph.axis.painter.regular(outerticklength=graph.axis.painter.ticklength.normal) c = graph.axis.pathaxis(path.curve(0, 0, 3, 0, 1, 4, 4, 4), graph.axis.linear(min=0, max=10, title="°î¼± axis by \LaTeX", painter=mypainter)) c.writeEPSfile("painterHangul") c.writePDFfile("painterHangul") \}}} }}}