org.mklab.tool.graph.gnuplot
クラス Gnuplot

java.lang.Object
  上位を拡張 org.mklab.tool.graph.gnuplot.Gnuplot

public class Gnuplot
extends Object

Gnuplotクラスはgnuplotでグラフを描画するためのラッパークラスです。

バージョン:
$Revision: 1.38 $, 2004/04/30
作成者:
koga

コンストラクタの概要
Gnuplot()
          コンストラクター オプションなしでGnuplotオブジェクトを生成します。
Gnuplot(Environment env, String options)
          コンストラクター ウインドウオプションを指定してGnuplotオブジェクトを生成します。
Gnuplot(String options)
          新しく生成されたGnuplotオブジェクトを初期化します。
 
メソッドの概要
 void clear()
          グラフ描画を消去します。
 void close()
          グラフ表示を終了します。
 Canvas createCanvas()
          メインキャンバスを返します。
 void createCanvas(int rowSize, int columnSize)
          マルチキャンバスを生成します。
 void destroy()
          グラフを強制終了します。
 void doCommand(String command)
          コマンドを実行します。
 void export(String fileName, String mode)
          現在持っているグラフ情報を各種ファイルに出力します。
 void export(String fileName, String mode, String command)
          現在持っているグラフ情報を各種ファイルに出力します。
protected  void finalize()
           
 Canvas getCanvas()
          メインキャンバスを返します。
 Canvas getCanvas(int row, int column)
          指定されたキャンバスを返します。
 Environment getEnvironment()
          gnuplot実行環境を取得します。
 boolean isBuffering()
          バッファリングの設定を返します。
 boolean isRunning()
          Gnuplotプロセスが起動中であるか判定します。
 void redraw()
          グラフを再描画します。
 void reset()
          リセットします。
 void setBuffering(boolean buffering)
          出力のバッファリングを設定します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Gnuplot

public Gnuplot()
        throws IOException
コンストラクター

オプションなしでGnuplotオブジェクトを生成します。

例外:
IOException - gnuplotプロセスを起動できない場合

Gnuplot

public Gnuplot(String options)
        throws IOException
新しく生成されたGnuplotオブジェクトを初期化します。

パラメータ:
options - ウィンドウオプション
例外:
IOException - gnuplotプロセスを起動できない場合

Gnuplot

public Gnuplot(Environment env,
               String options)
        throws IOException
コンストラクター

ウインドウオプションを指定してGnuplotオブジェクトを生成します。

パラメータ:
env - gnuplotの実行環境
options - ウインドウオプション
例外:
IOException - gnuplotプロセスを起動できない場合
メソッドの詳細

getEnvironment

public Environment getEnvironment()
gnuplot実行環境を取得します。

戻り値:
gnuplot実行環境

doCommand

public void doCommand(String command)
コマンドを実行します。

パラメータ:
command - コマンド

clear

public void clear()
グラフ描画を消去します。


getCanvas

public Canvas getCanvas()
メインキャンバスを返します。

戻り値:
メインキャンバス

reset

public void reset()
リセットします。


redraw

public void redraw()
グラフを再描画します。


export

public void export(String fileName,
                   String mode)
現在持っているグラフ情報を各種ファイルに出力します。

パラメータ:
fileName - 出力ファイル名
mode - ファイルの種類{"ps", "eps", "psplus", "epsplus", "fig"}

export

public void export(String fileName,
                   String mode,
                   String command)
現在持っているグラフ情報を各種ファイルに出力します。

パラメータ:
fileName - 出力ファイル名
mode - ファイルの種類{"ps", "eps", "psplus", "epsplus", "fig"}
command - コマンド

finalize

protected void finalize()
オーバーライド:
クラス Object 内の finalize
関連項目:
Object.finalize()

close

public void close()
グラフ表示を終了します。


destroy

public void destroy()
グラフを強制終了します。


isRunning

public boolean isRunning()
Gnuplotプロセスが起動中であるか判定します。

戻り値:
Gnuplotプロセスが起動中ならばtrue、そうでなければfalse

createCanvas

public Canvas createCanvas()
メインキャンバスを返します。

戻り値:
メインキャンバス

createCanvas

public void createCanvas(int rowSize,
                         int columnSize)
マルチキャンバスを生成します。

パラメータ:
rowSize - 縦方向の分割数
columnSize - 横方向の分割数

getCanvas

public Canvas getCanvas(int row,
                        int column)
指定されたキャンバスを返します。

パラメータ:
row - 行番号(0から始まります)
column - 列番号(0から始まります)
戻り値:
指定されたキャンバス

setBuffering

public void setBuffering(boolean buffering)
出力のバッファリングを設定します。

パラメータ:
buffering - バッファリングするならばtrue、そうでなければfalse

isBuffering

public boolean isBuffering()
バッファリングの設定を返します。

戻り値:
バッファリングするならばtrue、そうでなければfalse