[[Applications]] #topicpath * 目次 [#a5de0af9] #contents ///////////////////////////////////////////////////////////////////////////////// * Link [#ja40c7ec] - [[マニュアルページへのリンク集>http://lagendra.s.kanazawa-u.ac.jp/ogurisu/manuals/index-gnuplot.html]] - [[GNUPLOT 日本語リファレンス・ガイド>http://lagendra.s.kanazawa-u.ac.jp/ogurisu/manuals/gnuplot/index.html]] - [[GNUPLOT入門>http://t16web.lanl.gov/Kawano/gnuplot/index.html]] ///////////////////////////////////////////////////////////////////////////////// * その他の文書 [#a55fc226] //////////////////////////////////////////////////////////////////////////////// * グラフの描画 [#a20da7e9] + 起動画面 $ gnuplot G N U P L O T Version 4.0 patchlevel 0 last modified Thu Apr 15 14:44:22 CEST 2004 System: Linux 2.6.9-5.ELsmp Copyright (C) 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley and many others This is gnuplot version 4.0. Please refer to the documentation for command syntax changes. The old syntax will be accepted throughout the 4.0 series, but all save files use the new syntax. Type `help` to access the on-line reference manual. The gnuplot FAQ is available from http://www.gnuplot.info/faq/ Send comments and requests for help to <gnuplot-info@lists.sourceforge.net> Send bugs, suggestions and mods to <gnuplot-bugs@lists.sourceforge.net> Terminal type set to 'x11' gnuplot> + 関数の入力 -- 今のところ、乗数の表記(^)は使えない -- 三角関数 sin(x) gnuplot> plot sin( x ) -- 三角関数での単位は、degree, radian が使用可。変更するには gnuplot> set angles degree (またはradian) のようにする。 -- 円周率は "pi" を使う + 値域を指定する。 値域の指定は、 "[最小値:最大値]" の型式で指定出来る。 gnuplot> plot [-0:2*pi] sin(x) //////////////////////////////////////////////////////////////////////////////// * 描画後のグラフ [#xcd54a79] ** 画像として保存したい場合 [#t3ee3090] xwd というコマンドを使って、画像ファイル化して保存出来る。 ++ gnuplotで何某かのグラフを描画する gnuplot> plot [-0:2*pi] sin(x) ++ 別shell からxwd を起動する。 $ xwd -frame -out image.xwd |~Option|~備考| |-frame|WindowManagerのWindow枠も一緒に加える場合は指定する。| |-out <file-name>|保存先の画像ファイル名| |-root| ルートウィンドウも保存したい場合に指定する。| ++ 画像ファイルにしたいウィンドウを指定。 xwd が起動すると、マウスカーソルが十字になるので、画像ファイルに落したいウィンドウをクリックする。画像ファイルは xwd型式で保存される。 ++ xwdの画像を見る $ xwud -in image.xwd ++ 一般的な型式に変換する。 ImageMagickの convert、若しくは GIMPなどで変換する。 $ convert image.xwd image.png --- jpgにすると、画質がかなり劣化する。 --- pngなら、まぁまぁの画質。