Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.2 - 日本語

Change language to:
English - Français - Português

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Graphics > 2d_plot > Matplot1

Matplot1

行列の2次元カラープロット

呼び出し手順

Matplot1(a,rect)

パラメータ

a

大きさ (n1,n2)の実数行列.

rect

[xmin,ymin,xmax,ymax]

説明

行列 int(a) のエントリはカレントのカラーマップの カラーマップエントリとして使用されます. rect はカレントのスケールで矩形を指定します. 行列はこの矩形の中に描画されます. 各行列のエントリはその色で塗られた小さな矩形として描画されます. ある行列のエントリがカラーマップの外側の場合, 対応する矩形は表示されません.

//--- 最初の例
clf();
ax=gca();//カレントの軸のハンドルを取得
ax.data_bounds=[0,0;10,10];//data_boundsを設定
ax.box='on'; //ボックスを描画 
a=5*ones(11,11); a(2:10,2:10)=4; a(5:7,5:7)=2;
// 矩形 [1,1,3,3]に最初の行列をプロット
Matplot1(a,[1,1,3,3])
a=ones(10,10); a= 3*tril(a)+ 2*a; 
// 矩形 [5,6,7,8]に二番目の行列をプロット
Matplot1(a,[5,6,7,8])

//--- 二番目の例  (アニメーション)
n=100;

clf();
f=gcf();//カレントの図のハンドルを取得
f.pixmap='on';//ダブルバッファモード
ax=gca();//カレントの軸のハンドルを取得
ax.data_bounds=[0,0;10,10];//data_boundsを設定
ax.box='on'; //ボックスを描画 
show_pixmap()
for k=-n:n,
  a=ones(n,n);
  a= 3*tril(a,k)+ 2*a;
  a= a + a';
  k1= 3*(k+100)/200;
  if k>-n then delete(gce()),end
  Matplot1(a,[k1,2,k1+7,9])
  show_pixmap() //ダブルバッファを画面に送信
end
f.pixmap='off';

参照

  • colormap — カラーマップを定義
  • plot2d — 2Dプロット
  • Matplot — 行列のカラー二次元プロット
  • grayplot — 曲面の2次元カラープロット
  • Matplot_properties — Matplotエンティティプロパティの説明

作者

J.Ph.C.

<< Matplot 2d_plot Matplot_properties >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu May 12 11:45:56 CEST 2011