plotまたはsurfコマンドでオブジェクト(曲線,曲面...)の外観をカスタマイズ.
GlobalProperty
は,
plot()
または surf
コマンドの内部で
使用可能なオプション引数です.
これにより,新規にプロットされる全ての線(または平面)のグローバルなカスタマイズが
可能となります.
値は, {PropertyName
, PropertyValue
}の
対で指定する必要があります.
plot
または surf
を
コールする際に一度に複数の対を設定できます.
PropertyName
は,設定するプロパティを定義する文字列と
する必要があります.
PropertyValue
は,使用するプロパティの型により
実数, 整数または文字列 (スカラーまたは行列)とすることができます.
例えば,菱形のマーカ(マーカ)が付いた赤(色)の長い破線+ドット(線の形式)
を指定する場合,このシーケンスは以下のようになります :
'Colo'
, 'red'
,
'LineSt'
, '-.'
,
'Marker'
, 'diam'
.
見てわかるように,各プロパティ名および値の綴り全体を指定する
必要はなく,順序も任意ですが,一義的である必要があります.
更に,文字列の指定は大文字と小文字を区別しません.
GlobalProperty
は過去に記述された全ての
LineSpec
に優先します.
以下に全ての(plot
または surf
により)
指定可能なPropertyName
の一覧と
関連するPropertyValue
を示します.
指定されない場合,これらのプロパティは
(それぞれ plot または surfにより作成された)
Polyline
および Fac3d
オブジェクトの両方で利用可能で,前記のように
新規に作成されるオブジェクト(線または曲面)に適用されます.
時々,1つのプロパティに2つの PropertyName
が
対応する場合があります :
最初の1つはデフォルトMatlabの名前に等価なもので,
2番目のものはScilabにより使用されるデフォルトの名前です.
(線の場合 Color
または Foreground
,下記参照).
Z
行列で定義される各点における色を指定する実数行列.
このプロパティはオブジェクトのdata.color
プロパティに
リンクされています(
surface_properties参照).
![]() | このプロパティは曲面(surface)でのみ使用可能であることに注意してください. |
'scaled'
または
'direct'
を値とする文字列. data.color
が設定された場合,
color data の各インデックスは各頂点について単一の値を指定します.
cdata_mapping
はこれらのインデックスが
カレントのカラーマップに線形にマップするためにスケーリングされる
('scaled'
モード)か,もしくは,
このカラーマップを直接指す('direct
' モード)
かのどちらとなるかを定義します.
このプロパティは,color_flag
が
2
,3
または 4
の時に有用です.
![]() | このプロパティは, Fac3d エンティティのみに存在することに注意してください.
また,plot3d では 'direct' モードがデフォルトで,
surf では'scaled' モードがデフォルトであることに
も注意してください. |
文字列 "on"
または "off"
は,
クリッピングモード (デフォルト: "on"
)を定義します.
これは, clip_state
プロパティと等価です.
このフィールドは,visible
プロパティを有します
(polyline_properties参照).
![]() | このプロパティは surface エンティティではまだ利用できないことに注意してください. |
A color specified by its name (text) among the predefined named
colors list), or by its
"#RRGGBB"
hexadecimal code (text), or by its index in the
color map (integer), or by the vector [r,g,b]
of its
Red-Green-Blue intensities in the [0,1] interval.
このプロパティはオブジェクトのforeground
プロパティに リンクされています
(polyline_properties参照).
A color specified by its name (text) among the predefined named
colors list), or by its
"#RRGGBB"
hexadecimal code (text), or by its index in the
color map (integer), or by the vector [r,g,b]
of its
Red-Green-Blue intensities in the [0,1] interval.
このプロパティはオブジェクトのforeground
プロパティに
リンクされています
(surface_properties参照).
文字列で,値は 'none'
, 'flat'
または
'interp'
.
この値は,小平面の色をレンダリングする方法を指定します.
'none'
が選択された場合, 曲面のメッシュが描画されます.
'flat'
(デフォルトモード) が設定された場合,
Fac3d
color.data
の値が
小平面の最初の頂点の色により小平面毎に1つの色を定義します.
値が'interp'
の場合,
小平面の各頂点における色を定義するcolor.data
を用いて
曲面上で補間シェーディングが実行されます.
このプロパティは線の形式を定義する文字列です.
このプロパティは tje オブジェクトのline_style
プロパティ
にリンクしています
(polyline_properties または
surface_properties参照).
指定子 |
線の形式 |
- |
実線 (デフォルト) |
-- |
破線 |
: |
点線 |
-. |
一点鎖線 |
none |
線を描画しない |
マーカの型を定義する文字列. 線の形式を指定せずにマーカを
指定した場合,線(デフォルトでは実線モードが有効)とマーカが描画されます.
このプロパティはオブジェクトのmark_style
およびmark_mode
プロパティにリンクされています.
(
polyline_propertiesまたは
surface_properties参照).
指定子 |
マーカ型 |
+ |
+記号 |
o |
円 |
* |
アスタリスク |
. |
点 |
x |
十字 |
'square' または
's' |
正方形 |
'diamond' または
'd' |
菱形 |
^ |
上向き三角形 |
v |
下向き三角形 |
> |
右向き三角形 |
< |
左向き三角形 |
'pentagram' |
星型五角形 (ペンタグラム) |
'none' |
マーカなし (デフォルト) |
A color specified by its name (text) among the predefined named
colors list), or by its
"#RRGGBB"
hexadecimal code (text), or by its index in the
color map (integer), or by the vector [r,g,b]
of its
Red-Green-Blue intensities in the [0,1] interval.
このプロパティはオブジェクトのmark_foreground
プロパティに
リンクされています
(polyline_propertiesまたは
surface_properties参照).
A color specified by its name (text) among the predefined named
colors list), or by its
"#RRGGBB"
hexadecimal code (text), or by its index in the
color map (integer), or by the vector [r,g,b]
of its
Red-Green-Blue intensities in the [0,1] interval.
このプロパティはオブジェクトのmark_background
プロパティに
リンクされています
(polyline_propertiesまたは
surface_properties参照).
point
ユニットのマーカの大きさを定義するスカラー値.
このプロパティはオブジェクトのmark_size
プロパティに
リンクされ,mark_size_unit
の値は"point"
に設定されています
(
polyline_properties または
surface_properties参照).
文字列で, 可視モード "on"
または "off"
を定義します(デフォルト: "on"
).
このプロパティはオブジェクトの visible
プロパティに
リンクされています
(
polyline_properties または
surface_properties参照).
実数のベクトルまたは行列で,プロット済みの全ての線または曲面に関する
指定データを(再)定義します.
次元について,
この新しいデータは,過去に指定されたX
データと
完全に一致する必要があることに注意してください:
これはこれらのデータ行列を全て同じ次元とする必要があることを意味します.
このプロパティはオブジェクトのdata.x
プロパティに
リンクされています (
polyline_properties または
surface_properties参照).
実数のベクトルまたは行列で,プロット済みの全ての線または曲面に関する
指定データを(再)定義します.
次元について,
この新しいデータは,前に指定されたY
データと
完全に一致する必要があることに注意してください:
これはこれらのデータ行列を全て同じ次元とする必要があることを意味します.
このプロパティはオブジェクトのdata.y
プロパティに
リンクされています (
polyline_properties または
surface_properties参照).
plot
と共に使用した場合は実数のベクトルまたは行列
で,全てのプロット済みの線にZ
を追加します.
surf
と共に使用した場合は実数行列で,
全ての平面に関する指定データを再定義します.
次元について,
この新しいデータは前に指定されたX
およびY
データと完全に位置する必要があります.
このプロパティはオブジェクトのdata.z
プロパティに
リンクされています (polyline_properties または
surface_properties参照).
// -------------------- // With the plot command : // -------------------- x=1:10; // Init. plot(x,sin(x),'colo','red','linest','-.','marker','>','markeredg','cyan','markerFace','yellow','markersize',5) clf(); // combinations' order in {PropertyName,PropertyValue} does not matter plot(x,sin(x),'marker','p','markerfac','cyan','markersiz',10) clf(); // combination of LineSpec and GlobalProperty shows the GlobalProperty predominance plot(x, x.*x, '*cya--', 'color','gr', 'linestyle','-', .. 'marker','sq', 'markersize',6, 'markforegroun','red', 'markbackgro',[0.2 0.5 0.6]) clf(); //multiple plots with different LineSpecs and finally some global GlobalProperty clf(); t=0:%pi/20:2*%pi; plot(t,sin(t),'ro-.',t,cos(t),'cya+',t,abs(sin(t)),'--mo','markstyl','diam') // -------------------- // With the plot2d command : // -------------------- function draw_marks(title) a=gca(); a.title.text=title; a.mark_size=8; a.data_bounds=[-1.5 1.5 -1.5 1.5]; theta=(1/15)*(2*%pi)*[0:15]; plot2d(cos(theta),sin(theta)); for i=0:14 do theta=(i/15)*(2*%pi); plot2d(cos(theta),sin(theta),style=-i); end endfunction clf(); subplot(2,2,1) draw_marks("black foreground / white background") subplot(2,2,2) a=gca(); a.mark_foreground=-1; a.mark_background=4; draw_marks("black foreground / cyan background") subplot(2,2,3) a=gca(); a.mark_background=0; draw_marks("black foreground / invisible background") subplot(2,2,4) a=gca(); a.mark_foreground=0; a.mark_background=4; draw_marks("invisible foreground / cyan background") // -------------------- // With the surf command : // -------------------- Z= [ 0.0001 0.0013 0.0053 -0.0299 -0.1809 -0.2465 -0.1100 -0.0168 -0.0008 -0.0000 0.0005 0.0089 0.0259 -0.3673 -1.8670 -2.4736 -1.0866 -0.1602 -0.0067 0.0000 0.0004 0.0214 0.1739 -0.3147 -4.0919 -6.4101 -2.7589 -0.2779 0.0131 0.0020 -0.0088 -0.0871 0.0364 1.8559 1.4995 -2.2171 -0.2729 0.8368 0.2016 0.0130 -0.0308 -0.4313 -1.7334 -0.1148 3.0731 0.4444 2.6145 2.4410 0.4877 0.0301 -0.0336 -0.4990 -2.3552 -2.1722 0.8856 -0.0531 2.6416 2.4064 0.4771 0.0294 -0.0137 -0.1967 -0.8083 0.2289 3.3983 3.1955 2.4338 1.2129 0.2108 0.0125 -0.0014 -0.0017 0.3189 2.7414 7.1622 7.1361 3.1242 0.6633 0.0674 0.0030 0.0002 0.0104 0.1733 1.0852 2.6741 2.6725 1.1119 0.1973 0.0152 0.0005 0.0000 0.0012 0.0183 0.1099 0.2684 0.2683 0.1107 0.0190 0.0014 0.0000]; clf(); f=gcf(); f.figure_size = [610,724]; subplot(211) surf(Z,'facecol','interp','ydat',101:110,'edgecol','mage') subplot(212) surf(Z,'edgeco','b','marker','d','markersiz',9,'markerfac','k','xdata',-50:-41) | ![]() | ![]() |
Version | Description |
6.0.2 | The "Foreground", "markForeground", and "markBackground" colors can now be specified as named colors chosen in the full predefined colors list, or by their "#RRGGBB" hexadecimal codes, or by their indices in the colormap. |