2次元プロット上に曲面の塗りつぶした等高線を描画
contourf(x, y, z, nz, [style, strf, leg, rect, nax, fpf])
大きさ n1 および n2 の実数行ベクトル: グリッド.
大きさ(n1,n2)の実数行列, 関数の値.
等高線の値または数.
nz が整数の場合, その値は等高線の数を
指定し, zmin から zmax
の間で以下のように等間隔に配置されます:
z= zmin + (1:nz)*(zmax-zmin)/(nz+1)
![]() | 注意:
zmin および zmaxの等高線は描画されません (
通常,これらは点に縮小されます)が,以下のコマンドで追加できることに
注意してください. |
nz がベクトルの場合,
nz(i)はi
番目の等高線の値を指定します.
plot2d参照. 引数
style は等高線で使用される色を指定します.
これは等高線の数と同じ大きさである必要があります.
You can change the format of the floating point number printed on
the levels where fpf is the format in C format syntax
(for example fpf="%.3f").
Set fpf to " " implies that the level are not drawn on the level curves.
If not given, the default format of contour2d is used.
contourf は,2次元プロット上の
曲面z=f(x,y)の
連続する2つの等高線の間の曲面を塗りつぶします.
f(x,y)の値はx
およびyで定義されたグリッド点で
行列zにより指定されます.
コマンド contourf()を入力することでデモを
参照できます.
contourf(1:10,1:10,rand(10,10),5,1:5,"011"," ",[0,0,11,11]) | ![]() | ![]() |
z = peaks(-4:0.1:4); levels = [-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8]; m = size(levels,'*'); n = fix(3/8*m); r = [(1:n)'/n; ones(m-n,1)]; g = [zeros(n,1); (1:n)'/n; ones(m-2*n,1)]; b = [zeros(2*n,1); (1:m-2*n)'/(m-2*n)]; h = [r g b]; gcf().color_map = h; clf(); contourf([],[],z',levels,zeros(1,m)); | ![]() | ![]() |
