KTUGFaq

KTUG FAQ

·Î±×ÀÎ:
ºñ¹Ð¹øÈ£:
°¡ÀÔ
Even the smallest candle burns brighter in the dark.
FrontPage › GNUPlot

¸ñÂ÷

1 ´Ù¿î·Îµå ¹× µ¿ÀÛÈ®ÀÎ
2 ÀÏ¹Ý »ç¿ë¹ý
3 LaTeX ¿¡¼­ »ç¿ë¹ý1 - function plot
3.1 Gnu plot(plt) ¼Ò½ºÆÄÀÏÀ» ¸¸µç´Ù
3.2 LaTeX ¼Ò½º ÆÄÀÏÀ» ¸¸µç´Ù.
3.3 latex -> dvipdfmx ¸¦ ÀÌ¿ëÇÏ¿© pdf¸¦ »ý¼ºÇÑ´Ù.
4 LaTeX ¿¡¼­ »ç¿ë¹ý2 - data plot
4.1 Ãâ·ÂÇÒ µ¥ÀÌÅ͸¦ ¸¸µç´Ù
4.2 Gnu plot(plt) ¼Ò½ºÆÄÀÏÀ» ¸¸µç´Ù
4.3 LaTeX ¼Ò½º ÆÄÀÏÀ» ¸¸µç´Ù.
4.4 latex -> dvipdfmx ¸¦ ÀÌ¿ëÇÏ¿© pdf¸¦ »ý¼ºÇÑ´Ù.
5 LaTeX¿¡¼­ÀÇ »ç¿ë¹ý (3) : gnuplottex
6 KTUGFaq WikiÀÇ GNUPlot Processor

GNU Plot Àº ÆíÇÏ°Ô »ç¿ëÇÒ ¼ö ÀÖ´Â °­·ÂÇÑ Plotting µµ±¸ÀÌ´Ù. À̸¦ ÀÌ¿ëÇÏ¿© 2Â÷¿ø/3Â÷¿ø ±×·¡ÇÁ¸¦ Ãâ·ÂÇÒ ¼ö ÀÖ´Ù. Ãâ·ÂÀº ¿©·¯°¡Áö ÇüÅ·Π°¡´ÉÇϸç ƯÈ÷ LaTeX À» À§ÇÑ Ãâ·Â¸ðµå°¡ ÀÖ´Ù. ƯÈ÷ LaTeX¿¡ ¾µ ±×·¡ÇÁ ¾È¿¡ ÇѱÛÀÌ ÇÊ¿äÇÏ´Ù¸é epslatexÀ¸·Î Ãâ·ÂÇÏ´Â °ÍÀÌ ÁÁ´Ù.

1 ´Ù¿î·Îµå ¹× µ¿ÀÛÈ®ÀÎ

  1. ´ÙÀ½ÀÇ À§Ä¡¿¡¼­ GNUPlot À» ´Ù¿î·Îµå ¹Þ´Â´Ù. Linux¿ëµµ ÀÖ°í Win32¿ëµµ ÀÖ´Ù.
  2. Unpack ÇÑ´ÙÀ½ Ưº°ÇÑ Install °úÁ¤¾øÀÌ ¿øÇÏ´Â µð·ºÅ丮¿¡ Á÷Á¢ Copy ÇÑ´Ù.
  3. Path¸¦ GNUPlot binary ÆÄÀÏÀÌ ÀÖ´Â À§Ä¡·Î Àâ¾Æ ÁØ´Ù.
    • ¿¹¸¦ µé¾î¼­ D:\prog\gnuplot\binaries ¸¦ PATH¿¡ Ãß°¡ÇÑ´Ù.
  4. demo µð·ºÅ丮·Î °¡¼­, dem ÆÄÀÏÀ» ¾Æ¹«°Å³ª ½ÇÇà½ÃŲ´Ù.
    • ¿¹¸¦ µé¾î¼­ wgnuplot simple.dem ÇÏ¸é ½ÇÇàµÇ°í, ±×·¡ÇÁ¸¦ º¸¿©ÁØ´Ù.
    • gnuplot.jpg
  5. wgnuplot À» stand-aloneÀ¸·Î »ç¿ëÇÒ¶§ ÆùÆ®ÀÇ Å©±â°¡ ³Ê¹«À۾Ƽ­ º¸ÀÌÁö ¾Ê´Âµ¥, À̶§´Â È­¸é¿¡ ¸¶¿ì½º Ä¿¼­¸¦ ³õ°í, ¿ìÃø ¸¶¿ì½º ¹öÆ°À» ´©¸¥´ÙÀ½, Choose Font¸¦ ¼±ÅÃÇÏ¿© ÆùÆ®ÀÇ Å©±â¸¦ Å°¿î´Ù.

2 ÀÏ¹Ý »ç¿ë¹ý

  1. install µÈ µð·ºÅ丮ÀÇ docs¿¡ gnuplot.pdf ÆÄÀÏÀÌ ÀÖ´Ù.
  2. Introduction [http]http://www.cs.uni.edu/Help/gnuplot/
  3. FAQ [http]http://www.gnuplot.info/faq/
  4. gnuplot tips (not so Frequently Asked Questions) [http]http://t16web.lanl.gov/Kawano/gnuplot/index-e.html
  5. [http]Çѱ۸Ŵº¾ó

3 LaTeX ¿¡¼­ »ç¿ë¹ý1 - function plot

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}

3.3 latex -> dvipdfmx ¸¦ ÀÌ¿ëÇÏ¿© pdf¸¦ »ý¼ºÇÑ´Ù.

  • »ý¼ºµÈ pdf ÆÄÀÏÀº ´ÙÀ½°ú °°´Ù.
    gnuplotpdf.jpg

4 LaTeX ¿¡¼­ »ç¿ë¹ý2 - data plot

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} ¸¦ Ãß°¡ÇØ¾ß ÇÑ´Ù.

4.4 latex -> dvipdfmx ¸¦ ÀÌ¿ëÇÏ¿© pdf¸¦ »ý¼ºÇÑ´Ù.

  • »ý¼ºµÈ pdf ÆÄÀÏÀº ´ÙÀ½°ú °°´Ù.
    gnuplotpdf2.jpg

5 LaTeX¿¡¼­ÀÇ »ç¿ë¹ý (3) : gnuplottex

gnuplot Äڵ带 Á÷Á¢ LaTeX ¼Ò½º¿¡ ½á³Ö¾î¼­ ±×¸²À¸·Î Æ÷ÇÔ½ÃÅ°´Â ¹æ¹ý.
\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}
½ÇÇà½Ã¿¡ --shell-escape ¿É¼ÇÀ» ÁØ´Ù.
#> pdflatex --shell-escape example

6 KTUGFaq WikiÀÇ GNUPlot Processor

gnuplot
 - #!gnuplot
- plot [0:10*pi] [-1:1] sin(x)*exp(-0.1*x)

ÀÌ·¸°Ô Wiki»ó¿¡¼­ gnuplot ¸í·É¾î¸¦ Ä¡¸é ÀÚµ¿À¸·Î GNUPlot °á°ú°¡ »ý¼ºÀ̵˴ϴÙ.

Contributors: smcho

See KLE:GnuPlot


^
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2006-04-04 09:32:27
Processing time 0.0535 sec