Gnuplot OX server マニュアル

Edition : auto generated by oxgentexi on March 28, 2024

OpenXM.org

@overfullrule=0pt

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1 GNUPLOT 函数

この節では GNUPLOT の ox サーバ ox_sm1_gnuplot とのインタフェース関数を解説する. これらの関数はファイル ‘gnuplot.rr’ で定義されている. gnuplot.rr は ‘$(OpenXM_HOME)/lib/asir-contrib/’ にある.

[255] gnuplot.start();
0
[257] gnuplot.gnuplot("plot sin(x**2);");
0

関数 gnuplot.heat(dt,step) はわれわれの GNUPLOT インタフェース関数のデモ である. この関数は熱伝導方程式 区間 [0,1] は Heat_N 個に分割される. static 変数 Heat_N は 関数 gnuplot.set_heat_N で設定する. 有名な Courant-Friedrichs-Levi 数 dt*Heat_N*Heat_N が 0.5 以下であれば, 陽的差分スキームは安定である. CFL を変えることにより, 不安定性が生じるのを観察できる.

  gnuplot.set_heat_N(20); gnuplot.heat(0.001,30);   (CFL number is 0.4)
  gnuplot.set_heat_N(20); gnuplot.heat(0.003,30);   (CFL > 0.5 unstable)

Author of GNUPLOT: Thomas Williams, Colin Kelley. http://www.gnuplot.info


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1 函数一覧


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.1 gnuplot.start

gnuplot.start()

:: Localhost で ox_sm1_gnuplot を起動する.

return

整数

P = gnuplot.start();
参照

ox_launch, gnuplot


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.2 gnuplot

gnuplot.gnuplot(s|proc=p)

:: GNUPLOT にコマンド s を実行してもらう.

return

なし

p

s

文字列

[232] P = gnuplot.start();
0
*Plot 3 dimensional graph.
[233] gnuplot.gnuplot("splot x**2-y**2;"|proc=P);
0
*Plot 2 dimensional graph.
[234] gnuplot.gnuplot("plot [-pi:pi] [-2:2] cos(x);");
0
*Output a graph as a postscript figure.
[235] gnuplot.output(|file="hoge.eps");
0
[236] gnuplot.gnuplot("plot sin(x)*cos(x);");
0
[237] gnuplot.gnuplot(|file="x11");
0

*Plot 3 dimensional graph hiding unvisible lines.
[236] gnuplot.gnuplot("set hidden3d");
0
[237] gnuplot.gnuplot("splot (x**2+y**2)*sin(x**2+y**2)");
0
[238] gnuplot.gnuplot("set isosamples 50");
0
[239] gnuplot.gnuplot("splot (x**2+y**2)*sin(x**2+y**2)");

参照

ox_launch, gnuplot.start, rtostr, gnuplot.plot_dots

参考書

矢吹道郎, 大竹つよし; 使いこなす GNUPLOT, テクノプレス, ISBN4-924998-11-7


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.3 gnuplot.plot_dots

gnuplot.plot_dots(d,s|proc=p)

:: 点の集合 d をスタイル s でプロットする.

return

なし

p

d

リスト

s

文字列 または 0

[239] P = gnuplot.start();
0
[240] gnuplot.plot_dots([ ],0);            
0
[241] for (I=0; I<10; I++) gnuplot.plot_dots([[I,I^2]]," lines ");
[242] A = [ ];
[]
[243] for (I=0; I<10; I++) A = append(A,[ [I,I^2]]);
[244] A;
[[0,0],[1,1],[2,4],[3,9],[4,16],[5,25],[6,36],[7,49],[8,64],[9,81]]
[245] gnuplot.plot_dots(A," lines ");
0
参照

gnuplot.start, plot "fileName" with options(GNUPLOT command), gnuplot.clean, gnuplot


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.4 gnuplot.heat

gnuplot.heat(dt,step)

:: 熱伝導方程式を数値的に解く.

return

なし

dt

浮動小数点数

step

整数

[232] gnuplot.set_heat_N(20)$ 
[233] gnuplot.heat(0.001,30)$

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.5 gnuplot.output

gnuplot.output(|file=s)

:: GNUPLOT にファイル s へポストスクリプトで出力するように頼む.

return

Void

s

String

[273] gnuplot.output(|file="hoge.eps");
Graphic output of GNUPLOT will be written to hoge.eps as a Poscript file.
0
[274] gnuplot.gnuplot("plot tan(x)+sin(x);");
0
[275] gnuplot.output();
Usage of gnuplot.output: gnuplot.output(|file="string")
                         gnuplot.output(|file="x11")
Output device is set to X11
参照

gnuplot


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.6 gnuplot.plot_function

gnuplot.plot_function(f|proc=p)

:: gnuplot サーバに f のグラフを書くように頼む.

戻り値

なし

p

f

多項式または多項式のリスト

[290] gnuplot.plot_function((x+sin(x))^2);
0
[291] gnuplot.plot_function([x,x^2,x^3]);
0
参照

gnuplot.to_gnuplot_format


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.7 gnuplot.stop

gnuplot.stop()

:: GNUPLOT を停止し, 通信用の fifo ファイルを消す.

return

Void

s

String

[273] gnuplot.stop()
参照

gnuplot.start


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1.8 gnuplot.setenv

gnuplot.setenv(key,value)

::

return

Void

key

String

value

Object

   Use the old method to communicate with gnuplot (version 3).
   This method does not use mkfifo, but we need a patched version of gnuplot.
[273] gnuplot.setenv("gnuplot.callingMethod",0);
[274] gnuplot.setenv("plot.gnuplotexec",getenv("OpenXM_HOME")+"/bin/gnuplot4ox");

   Calling your own gnuplot binary. 
[274] gnuplot.setenv("plot.gnuplotexec","/cygdrive/c/program files/gnuplot/pgnuplot.exe");
参照

gnuplot.start


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Index

Jump to:   G  
Index Entry  Section

G
gnuplot 1.1.2 gnuplot
gnuplot.heat 1.1.4 gnuplot.heat
gnuplot.output 1.1.5 gnuplot.output
gnuplot.plot_dots 1.1.3 gnuplot.plot_dots
gnuplot.plot_function 1.1.6 gnuplot.plot_function
gnuplot.setenv 1.1.8 gnuplot.setenv
gnuplot.start 1.1.1 gnuplot.start
gnuplot.stop 1.1.7 gnuplot.stop

Jump to:   G  

[Top] [Contents] [Index] [ ? ]

Table of Contents


[Top] [Contents] [Index] [ ? ]

Short Table of Contents


[Top] [Contents] [Index] [ ? ]

About This Document

This document was generated on March 28, 2024 using texi2html 5.0.

The buttons in the navigation panels have the following meaning:

Button Name Go to From 1.2.3 go to
[ << ] FastBack Beginning of this chapter or previous chapter 1
[ < ] Back Previous section in reading order 1.2.2
[ Up ] Up Up section 1.2
[ > ] Forward Next section in reading order 1.2.4
[ >> ] FastForward Next chapter 2
[Top] Top Cover (top) of document  
[Contents] Contents Table of contents  
[Index] Index Index  
[ ? ] About About (help)  

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:


This document was generated on March 28, 2024 using texi2html 5.0.