ÇÑ±Û PDF ¸¦ ¸¸µå´Â
PyX ¿¹Á¦
¶
Submitted by phk @ 08-29 [09:09 am]
´ÙÀ½Àº hangul ÆÐÅ°Áö¸¦ »ç¿ëÇϹǷΠeuc-kr ÀÎÄÚµùÀ¸·Î ÀúÀåµÇ¾î¾ß ÇÏ´Â
Python ¼Ò½º ÄÚµåÀÔ´Ï´Ù. ´ÙÀ½À» ½ÇÇàÇϸé hangulTest.eps ÆÄÀÏ°ú hangulTest.pdf ÆÄÀÏÀÌ
»ý¼ºµË´Ï´Ù.
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 ÆÄÀÏÀÌ »ý¼ºµË´Ï´Ù.
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")