% 소스
\documentclass{article}
\usepackage{graphicx}
\begin{document}
<<>>=
import pylab as plt
import numpy as np
x = np.linspace(0, 10)
s = np.sin(x)
plt.p*l*ot(x, s)
plt.show()
@
\end{document}
# 컴파일
$ Pweave -f tex sine.texw
$ xelatex -shell-escape sine.tex
* 소스에 금지어가 있어서 plt.p*l*ot(x, s)으로 표기했으니 실행하려면 *를 제거할 것.
* pweave와 matplotlib이 설치되어 있어야 함.
KTUG 한국 텍 사용자 그룹
% 소스
\documentclass{article}
\usepackage{graphicx}
\begin{document}
<<>>=
import pylab as plt
import numpy as np
x = np.linspace(0, 10)
s = np.sin(x)
plt.p*l*ot(x, s)
plt.show()
@
\end{document}
# 컴파일
$ Pweave -f tex sine.texw
$ xelatex -shell-escape sine.tex
* 소스에 금지어가 있어서 plt.p*l*ot(x, s)으로 표기했으니 실행하려면 *를 제거할 것.
* pweave와 matplotlib이 설치되어 있어야 함.