PlotSample2.java
01 /*
02  * $Id: Plot2dSample.java,v 1.7 2008/02/02 03:06:29 koga Exp $
03  *
04  * Copyright (C) 2004 Koga Laboratory. All rights reserved.
05  *
06  */
07 package matxbook.chap12old;
08 
09 import org.mklab.nfc.matrix.DoubleMatrix;
10 import org.mklab.tool.graph.mgplot.Mgplot;
11 
12 
13 /**
14  * グラフをタイトル付きで描画するサンプルです。
15  @author koga
16  @version $Revision: 1.7 $, 2004/05/01
17  */
18 public class PlotSample2 {
19 
20   /**
21    * メインメソッド
22    
23    @param args コマンドライン引数
24    @throws InterruptedException 強制終了された場合
25    */
26   public static void main(String[] argsthrows InterruptedException {
27     DoubleMatrix t = DoubleMatrix.series(0* Math.PI, 0.05);
28     DoubleMatrix s = t.sinElementWise();
29     Mgplot.plot(1, t, s);
30     Thread.sleep(3000);
31     Mgplot.plot(1, t, s, new String[] {"sin(t)"})//$NON-NLS-1$
32     Thread.sleep(3000);
33     Mgplot.key(1false);
34     Thread.sleep(3000);
35     Mgplot.quit();
36   }
37 }