awk와 xgraph를 이용한 출력
#awk '{print $1,$4}' input_file.tr | xgraph
이렇게 하면 input_file.tr 의 첫번째와 네번째 인자를 가지고 xgraph로 그려준다. 이때, xgraph의 옵션도 줄수 있다.
xgraph의 옵션을 살펴보자.
Usage: xgraph [-device <ps|X|hpgl|idraw|tgif>]
[-bd border_color] [-bg background_color] [-fg foreground_color]
[-bar] [-brb bar_base] [-brw bar_width] [-bof bar_offset] [-stk]
[-bw bdr_width] [-db] [-gw grid_size] [-fitx] [-fity]
[-gs grid_style] [-lf label_font] [-lnx] [-lny] [-lw line_width]
[-lx x1,x2] [-ly y1,y2] [-m] [-M] [-nl] [-ng] [-nb] [-p] [-P]
[-rv] [-t title] [-tf title_font] [-tk] [-scale factor]
[-x x_unit_name] [-y y_unit_name] [-fmtx format] [-fmty format]
[[-geometry |=]W=H+X+Y] [[-display] <host>:<disp>.<screen>]
[-Pprinter|-o output_file|-O output_file] [[-<digit> set_name]
[-zg zero_color] [-zw zero_size] [-a] [-dl <delay>] input_files...
-bar Draw bar graph with base -brb, width -brw, and offset -bof
-stk Draw bar graph stacking data sets.
-fitx Scale all sets to fit the x-axis [0,1].
-fity Scale all sets to fit the y-axis [0,1].
-fmtx Printf format for the x-axis
-fmty Printf format for the y-axis
-scale Scale the output file with factor
-O fn Printer ready output file
-o fn Encapsulated (document) output file
-bb Draw bounding box around data
-db Turn on debugging
-lnx Logarithmic scale for X axis
-lny Logarithmic scale for Y axis
-m -M Mark points distinctively (M varies with color)
-nl Don't draw lines (scatter plot)
-ng Don't draw legend
-nb Don't draw buttons
-p -P Mark points with dot (P means big dot)
-rv Reverse video on black and white displays
-tk Draw tick marks instead of full grid
-a Start in animation mode
-dl Animation delay. Default is 2
[-bd border_color] [-bg background_color] [-fg foreground_color]
[-bar] [-brb bar_base] [-brw bar_width] [-bof bar_offset] [-stk]
[-bw bdr_width] [-db] [-gw grid_size] [-fitx] [-fity]
[-gs grid_style] [-lf label_font] [-lnx] [-lny] [-lw line_width]
[-lx x1,x2] [-ly y1,y2] [-m] [-M] [-nl] [-ng] [-nb] [-p] [-P]
[-rv] [-t title] [-tf title_font] [-tk] [-scale factor]
[-x x_unit_name] [-y y_unit_name] [-fmtx format] [-fmty format]
[[-geometry |=]W=H+X+Y] [[-display] <host>:<disp>.<screen>]
[-Pprinter|-o output_file|-O output_file] [[-<digit> set_name]
[-zg zero_color] [-zw zero_size] [-a] [-dl <delay>] input_files...
-bar Draw bar graph with base -brb, width -brw, and offset -bof
-stk Draw bar graph stacking data sets.
-fitx Scale all sets to fit the x-axis [0,1].
-fity Scale all sets to fit the y-axis [0,1].
-fmtx Printf format for the x-axis
-fmty Printf format for the y-axis
-scale Scale the output file with factor
-O fn Printer ready output file
-o fn Encapsulated (document) output file
-bb Draw bounding box around data
-db Turn on debugging
-lnx Logarithmic scale for X axis
-lny Logarithmic scale for Y axis
-m -M Mark points distinctively (M varies with color)
-nl Don't draw lines (scatter plot)
-ng Don't draw legend
-nb Don't draw buttons
-p -P Mark points with dot (P means big dot)
-rv Reverse video on black and white displays
-tk Draw tick marks instead of full grid
-a Start in animation mode
-dl Animation delay. Default is 2
xgraph에서 와일드카드인 ?를 이용하면 여러 파일에 대한 내용을 그래프 하나에 표시할 수 있다. 예를 들어,
test1.tr, test2.tr, test3.tr 파일이 있다면
#xgraph test?.tr
이렇게 해주면 세 파일의 내용을 하나에 그려준다.
http://www.joon.pe.kr/blog/trackback/32

무례하게 질문하나 더 드릴게요..
out1.tr 파일을 하나 만들고나서..
awk '{print $1 $4}' out1.tr | xgraph 의 명령으로 실행을 하여보니..
Problems found with input data 라고 뜨고 실행이 되지를 않습니다..
그리고..
out1.tr 의 파일을 xgraph를 이용해 그리려면.. out1.tr -> out1.xg로
바꾼다음 그려야 한다고 하고.. 실제로도 그렇더라고요..
어떠한 차이가 있는지 궁금해서요..
계속 질문드려서 죄송합니다..
저 명령은 그냥 간단하게 awk 스크립트를 통해서 tr파일에서 데이터를 추출해서 바로 xgraph로 그려주는 역할을 합니다.
세화출판사에서 나온 ns2 관련 책에서 본거 같네요...그 책 있으면 한번 참고해 보세요...
awk '{print $1, $4}' out1.tr | xgraph 로 하시면 될듯 싶습니다.
혹시 오시는 분들 중에 와이브로(802.16)하시는 분 있으시면 의견 공유하고 싶습니다.
dhmyoung@naver.com
연락부탁드립니다.^^