KTUGFaq
KTUG FAQ
Some men are discovered; others are found out.
GNU Plot Àº ÆíÇÏ°Ô »ç¿ëÇÒ ¼ö ÀÖ´Â °·ÂÇÑ Plotting µµ±¸ÀÌ´Ù. À̸¦ ÀÌ¿ëÇÏ¿© 2Â÷¿ø/3Â÷¿ø ±×·¡ÇÁ¸¦ Ãâ·ÂÇÒ ¼ö ÀÖ´Ù.
Ãâ·ÂÀº ¿©·¯°¡Áö ÇüÅ·Π°¡´ÉÇϸç ƯÈ÷ LaTeX À» À§ÇÑ Ãâ·Â¸ðµå°¡ ÀÖ´Ù. ƯÈ÷ LaTeX¿¡ ¾µ ±×·¡ÇÁ ¾È¿¡ ÇѱÛÀÌ ÇÊ¿äÇÏ´Ù¸é epslatexÀ¸·Î Ãâ·ÂÇÏ´Â °ÍÀÌ ÁÁ´Ù.
[ÆíÁý]
1 ´Ù¿î·Îµå ¹× µ¿ÀÛÈ®ÀÎ ¶
- ´ÙÀ½ÀÇ À§Ä¡¿¡¼ GNUPlot À» ´Ù¿î·Îµå ¹Þ´Â´Ù. Linux¿ëµµ ÀÖ°í Win32¿ëµµ ÀÖ´Ù.
- Unpack ÇÑ´ÙÀ½ Ưº°ÇÑ Install °úÁ¤¾øÀÌ ¿øÇÏ´Â µð·ºÅ丮¿¡ Á÷Á¢ Copy ÇÑ´Ù.
- Path¸¦ GNUPlot binary ÆÄÀÏÀÌ ÀÖ´Â À§Ä¡·Î Àâ¾Æ ÁØ´Ù.
- ¿¹¸¦ µé¾î¼ D:\prog\gnuplot\binaries ¸¦ PATH¿¡ Ãß°¡ÇÑ´Ù.
- demo µð·ºÅ丮·Î °¡¼, dem ÆÄÀÏÀ» ¾Æ¹«°Å³ª ½ÇÇà½ÃŲ´Ù.
- wgnuplot À» stand-aloneÀ¸·Î »ç¿ëÇÒ¶§ ÆùÆ®ÀÇ Å©±â°¡ ³Ê¹«À۾Ƽ º¸ÀÌÁö ¾Ê´Âµ¥, À̶§´Â ȸ鿡 ¸¶¿ì½º Ä¿¼¸¦ ³õ°í, ¿ìÃø ¸¶¿ì½º ¹öÆ°À» ´©¸¥´ÙÀ½, Choose Font¸¦ ¼±ÅÃÇÏ¿© ÆùÆ®ÀÇ Å©±â¸¦ Å°¿î´Ù.
[ÆíÁý]
2 ÀÏ¹Ý »ç¿ë¹ý ¶
- install µÈ µð·ºÅ丮ÀÇ docs¿¡ gnuplot.pdf ÆÄÀÏÀÌ ÀÖ´Ù.
- Introduction http://www.cs.uni.edu/Help/gnuplot/
- FAQ http://www.gnuplot.info/faq/
- gnuplot tips (not so Frequently Asked Questions) http://t16web.lanl.gov/Kawano/gnuplot/index-e.html
- Çѱ۸Ŵº¾ó
[ÆíÁý]
3.1 Gnu plot(plt) ¼Ò½ºÆÄÀÏÀ» ¸¸µç´Ù ¶
- . ´ÙÀ½°ú °°ÀÌ GNUPlot ¼Ò½ºÆÄÀÏÀ» ¸¸µé°í test.plt ¶ó°í ÇÏÀÚ.
- wgnuplot test.plt ·Î ÄÄÆÄÀÏÇϸé hello.tex ÀÌ ¸¸µé¾î Áø´Ù.
set terminal latex set output "hello.tex" plot [0:2*pi] [-1.2:1.2] sin(x)
[ÆíÁý]
3.2 LaTeX ¼Ò½º ÆÄÀÏÀ» ¸¸µç´Ù. ¶
\documentclass{article} \usepackage{hfont} \begin{document} \begin{figure}[htb] \centering \input{hello.tex} \vspace{-.3in} \caption{GNUPlot À» ÀÌ¿ëÇÑ µ¥¸ð} \label{plt:testplt} \end{figure} \end{document}
[ÆíÁý]
4.1 Ãâ·ÂÇÒ µ¥ÀÌÅ͸¦ ¸¸µç´Ù ¶
1 2 3 4 5 4 3 4 3 2 1
- À̶§ Ãâ·ÂÇÏ·Á´Â µ¥ÀÌÅ͸¦ data.dat ¿¡ ÀúÀåÇØ¾ß ÇÑ´Ù.
[ÆíÁý]
4.2 Gnu plot(plt) ¼Ò½ºÆÄÀÏÀ» ¸¸µç´Ù ¶
set terminal latex set output "hello2.tex" plot "data.dat"
[ÆíÁý]
4.3 LaTeX ¼Ò½º ÆÄÀÏÀ» ¸¸µç´Ù. ¶
- À̶§ \Diamond ¸í·ÉÀÌ »ç¿ëµÇ¹Ç·Î \usepackage{latexsym} ¸¦ Ãß°¡ÇØ¾ß ÇÑ´Ù.
[ÆíÁý]
5 LaTeX¿¡¼ÀÇ »ç¿ë¹ý (3) : gnuplottex ¶
gnuplot Äڵ带 Á÷Á¢ LaTeX ¼Ò½º¿¡ ½á³Ö¾î¼ ±×¸²À¸·Î Æ÷ÇÔ½ÃÅ°´Â ¹æ¹ý.
½ÇÇà½Ã¿¡ --shell-escape ¿É¼ÇÀ» ÁØ´Ù.
\documentclass[a4paper]{article} \usepackage[pdf]{gnuplottex} \begin{document} \begin{gnuplot}[width=.3\textwidth] plot sin(x) \end{gnuplot} \begin{gnuplot} set grid set title 'gnuplottex test' set ylabel 'y' set xlabel 'x' plot exp(x) with linespoints \end{gnuplot} \end{document}
#> pdflatex --shell-escape example