GNUPlot 


논문을 보다보면, 유명 대학들의 경우 Excel의 그래프를 사용 하지 않는다.

그들은 스크립트 기반의 그래프 그리는 도구인 GNUPlot을 사용한다.


별거 아니지만, 그래프가 아마추어 수러우면, 뭔가 열심히한 실험 데이터도 의심스럽고 신뢰감이 떨어지는것이 사실이다.


따라서 앞으로는 GNU Plot으로 그래프를 그려야 할것 같다.




Ubuntu에 GnuPlot 설치 하기


기본적으로 우분투에는 gnuplot이 설치 되어있다.

하지만, 오래된 버전의 경우 아닐 수도 있다.

필자는 10.04 버전을 쓰기 때문에 없었다. 따라서 설치를 해야했다.


설치를 위해선 아래의 3가지를 해야한다.

  • update package (최신 우분투의 경우 package 서버가 유요하므로 구지 변경할 필요 없음)
  • apt-get 설치

update package

/etc/apt/source.list의 내용에서 archive.ubuntu.com을 old-releases.ubuntu.com으로 변경 해야함.


아래의 명령어를 사용함.

sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list


그리고 리스트를 업데이트

sudo apt-get update && sudo apt-get dist-upgrade


참고 사이트: here


GNUPlot Install


apt-get install gnuplot rlwrap


만약, 우분투 12.04 이상을 쓴다면, 상세한 gnuplot의 버전을 설정해 주어야 한다.

(qt 또는 x11 둘중에 하나를 선택 한다.)


apt-get install gnuplot-qt riwrap


참고

qt가 새로나온 버전이고, x11이 예전것이라고 하는데, 차이는 잘 모르겠다.


Then open your bash configuration file (if using the default bash shell)

gedit ~/.bashrc &

and add the following lines to the file somewhere near the bottom

# enable autocomplete in gnuplot 
alias gnuplot="rlwrap -a -c -b\"\\\"\\\"\\\'\\\'\" gnuplot"

save the file and exit.

First we need some data for plotting, for instance the file


http://www.maths.manchester.ac.uk/~pjohnson/Gnuplot/testResults.dat 


may be downloaded from my website.

Now open a new terminal and type gnuplot into the command line. You should see the following:





p 'testResults.data' w l









'Project > 그래프 그리기' 카테고리의 다른 글

엑셀 단축키  (0) 2014.11.27
빈도분석, 중복성 제거, CDF (Excel)  (0) 2014.11.03

+ Recent posts