PyX

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.

Aug 29, 2006
ÇÑ±Û PDF ¸¦ ¸¸µå´Â PyX ¿¹Á¦
Submitted by phk @ 08-29 [09:09 am]

´ÙÀ½Àº hangul ÆÐÅ°Áö¸¦ »ç¿ëÇϹǷΠeuc-kr ÀÎÄÚµùÀ¸·Î ÀúÀåµÇ¾î¾ß ÇÏ´Â Python ¼Ò½º ÄÚµåÀÔ´Ï´Ù. ´ÙÀ½À» ½ÇÇàÇϸé hangulTest.eps ÆÄÀÏ°ú hangulTest.pdf ÆÄÀÏÀÌ »ý¼ºµË´Ï´Ù.

#!/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")


Çѱ۰ú ±×·¡ÇÈÀÌ Æ÷ÇÔµÈ PDF ¸¦ ¸¸µå´Â PyX ¿¹Á¦
Submitted by phk @ 08-29 [09:09 am]

À̹ø¿¡´Â Çѱ۰ú ±×·¡ÇÈÀÌ Æ÷ÇÔµÈ PDF ÆÄÀÏ¿ï ¸¸µå´Â Python ¼Ò½º ÄÚµåÀÔ´Ï´Ù. ´ÙÀ½À» ½ÇÇàÇϸé painterHangul.eps ÆÄÀÏ°ú painterHangul.pdf ÆÄÀÏÀÌ »ý¼ºµË´Ï´Ù.

#!/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")
Retrieved from http://faq.ktug.org/faq/PyX
last modified 2006-08-29 12:06:27