* [http://www.gnuplot.info/ 홈페이지] Gnuplot으로 플로팅한 그림을 LaTeX에서 활용하는 방법은 몇 가지가 있다. * [http://texdoc.net/texmf-dist/doc/latex/gnuplottex/gnuplottex.pdf gnuplottex] * [http://texdoc.net/texmf-dist/doc/latex/pgfplots/pgfplots.pdf pgfplots]의 raw gnuplot 또는 tikz plots의 raw gnuplot === 설치 === LaTeX에서 gnuplot을 활용하기 위해서는 반드시 명령행에서 gnuplot이 동작해야 한다. 독립적으로 실행되는 애플리케이션으로 설치하면 PATH등을 걸어서 이것이 되도록 하여야 하므로, 다음과 같이 설치하는 것이 가장 좋다. (즉, 아래 설치 지침은 여러 가지 gnuplot 설치 방법 중 LaTeX에 적합한 방법만을 소개한다.) * Linux (Debian/Ubuntu) {{{ $ sudo apt-get install gnuplot }}} * Mac Homebrew {{{ $ brew install gnuplot }}} * Windows [http://www.tatsuromatsuoka.com/gnuplot/Eng/winbin/ Windows binaries] * '''중요''': 인스톨러 실행 시에 '''반드시''' Add application directory to your PATH environment variable을 '''체크할 것''' * http://www.ktug.org/xe/files/attach/images/5213/578/185/6710396af5ab527af1e6802a461442a6.PNG?width=300 === shell escape === * gnuplot을 외부 실행하려 하는 경우, 즉 gnuplottex이나 pgfplots에서 gnuplot을 부르는 경우 반드시 컴파일러에 {{{--shell-escape}}}를 주어야 한다. EnablingShellEscape 참조. === 사용례 === gnuplottex: [http://www.ktug.org/xe/index.php?mid=KTUG_open_board&document_srl=209694 출처] {{{ % arara: xelatex: { shell: yes } \documentclass{standalone} \usepackage{gnuplottex} \begin{document} \begin{gnuplot} set zeroaxis set xtics(-2*pi, -pi, -pi/2, 0, pi/2, pi, 2*pi) plot [-5:5] sin(x) \end{gnuplot} \end{document} }}} tikz plots: {{{ \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw plot[raw gnuplot] function{ plot [0:6.5] sin(x) }; \end{tikzpicture} \end{document} }}}