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


colormap

カラーマップを定義

説明

カラーマップ cmap はm x 3行列で定義されます. m は色の数です. 色番号 i は, それぞれ赤, 緑, 青の彩度(範囲は0から1)を表す cmap(i,1), cmap(i,2), cmap(i,3) の組で指定されます.

最初,カラーマップには32種類の色が定義されています. 特定の図のカラーマップを set(f,"color_map",cmap) により変更することが可能です. ただし, fは図のハンドルです.

カラーマップの各色は,多くのプロット関数で色を指定するために使用する 際に使用されるIDを有しています. このIDを参照するには,関数getcolor を使用してください.

A set of functions from autumncolormap(n) to wintercolormap(n) provide swatches that can be set to colormaps. They are illustrated here-below.

The colormap of the current figure can be retrieved with cmap = gcf().color_map.

The current default colormap can be retrieved with cmap = gdf().color_map.

The factory default colormap can be retrieved with cmap = sdf().color_map.

Sample

n = 64;
r = linspace(0,1,n)';
g = linspace(1,0,n)';
b = ones(r);
cmap = [r g b];
f = gcf(); f.color_map = cmap;
plot3d1()
f.color_map = gdf().color_map; // restores to the default colormap

gdf().color_map
--> gdf().color_map
 ans  =
   0.          0.          0.
   0.          0.          1.
   0.          1.          0.
   0.          1.          1.
   1.          0.          0.
   1.          0.          1.
   1.          1.          0.
   1.          1.          1.
   0.          0.          0.5647059
   0.          0.          0.6901961
   0.          0.          0.8156863
   0.5294118   0.8078431   1.
   0.          0.5647059   0.
   0.          0.6901961   0.
   0.          0.8156863   0.
   0.          0.5647059   0.5647059
   0.          0.6901961   0.6901961
   0.          0.8156863   0.8156863
   0.5647059   0.          0.
   0.6901961   0.          0.
   0.8156863   0.          0.
   0.5647059   0.          0.5647059
   0.6901961   0.          0.6901961
   0.8156863   0.          0.8156863
   0.5019608   0.1882353   0.
   0.627451    0.2509804   0.
   0.7529412   0.3764706   0.
   1.          0.5019608   0.5019608
   1.          0.627451    0.627451
   1.          0.7529412   0.7529412
   1.          0.8784314   0.8784314
   1.          0.8431373   0.

参照

  • autumncolormap — 赤からオレンジを経由して黄までのカラーマップ
  • bonecolormap — ライトブルー色調のグレーカラーマップ
  • coolcolormap — シアンからマゼンタに至るカラーマップ
  • coppercolormap — 黒から明るい銅色へのカラーマップ
  • graycolormap — 線形グレイカラーマップ
  • hotcolormap — 赤から黄色までのカラーマップ
  • hsvcolormap — Hue-saturation-value カラーマップ
  • jetcolormap — 青から赤へのカラーマップ
  • oceancolormap — 線形青カラーマップ
  • pinkcolormap — 白黒画像のセピア調カラー化
  • rainbowcolormap — 赤からオレンジ,黄色,緑,青を経て紫に至るカラーマップ
  • springcolormap — マゼンタから黄色へのカラーマップ
  • summercolormap — 緑から黄色へのカラーマップ
  • whitecolormap — 完全に白のカラーマップ
  • wintercolormap — 青から緑へのカラーマップ
  • color — 色の色IDを取得
  • getcolor — カレントのカラーマップの色を示すダイアログをオープンする
  • colordef — Set the color look-and-feel of a given or of all forthcoming graphic figures
Report an issue
<< colorbar Color management getcolor >>

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:
Mon May 22 12:43:11 CEST 2023