- Scilabヘルプ
- Graphics
- 2d_plot
- 3d_plot
- annotation
- axes_operations
- axis
- bar_histogram
- Color management
- Datatips
- figure_operations
- geometric_shapes
- handle
- interaction
- lighting
- load_save
- polygon
- property
- text
- transform
- Compound_properties
- GlobalProperty
- Graphics: Getting started
- graphics_entities
- object_editor
- pie
- multiscaled plots
- xchange
- xget
- xset
Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
See the recommended documentation of this function
GlobalProperty
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
,下記参照).
- "CData" または "ColorData":
Z行列で定義される各点における色を指定する実数行列. このプロパティはオブジェクトのdata.colorプロパティに リンクされています( surface_properties参照).
このプロパティは曲面(surface)でのみ使用可能であることに注意してください.- "CDataMapping" または "ColorDataMapping":
'scaled'または'direct'を値とする文字列.data.colorが設定された場合, color data の各インデックスは各頂点について単一の値を指定します.cdata_mappingはこれらのインデックスが カレントのカラーマップに線形にマップするためにスケーリングされる ('scaled'モード)か,もしくは, このカラーマップを直接指す('direct' モード) かのどちらとなるかを定義します. このプロパティは,color_flagが2,3または4の時に有用です.
このプロパティは,Fac3dエンティティのみに存在することに注意してください. また,plot3dでは'direct'モードがデフォルトで,surfでは'scaled'モードがデフォルトであることに も注意してください.- "Clipping":
文字列
"on"または"off"は, クリッピングモード (デフォルト:"on")を定義します. これは,clip_stateプロパティと等価です. このフィールドは,visibleプロパティを有します (polyline_properties参照).
このプロパティは surface エンティティではまだ利用できないことに注意してください.- "Color" または "Foreground" (polylines only):
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参照).- "EdgeColor" または "Foreground" (surfaces only):
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参照).- "FaceColor":
文字列で,値は
'none','flat'または'interp'. この値は,小平面の色をレンダリングする方法を指定します.'none'が選択された場合, 曲面のメッシュが描画されます.'flat'(デフォルトモード) が設定された場合,Fac3dcolor.dataの値が 小平面の最初の頂点の色により小平面毎に1つの色を定義します. 値が'interp'の場合, 小平面の各頂点における色を定義するcolor.dataを用いて 曲面上で補間シェーディングが実行されます.- "LineStyle":
このプロパティは線の形式を定義する文字列です. このプロパティは tje オブジェクトの
line_styleプロパティ にリンクしています (polyline_properties または surface_properties参照).指定子線の形式-実線 (デフォルト) --破線 :点線 -.一点鎖線 none線を描画しない - "Marker" または "MarkStyle":
マーカの型を定義する文字列. 線の形式を指定せずにマーカを 指定した場合,線(デフォルトでは実線モードが有効)とマーカが描画されます. このプロパティはオブジェクトの
mark_styleおよびmark_modeプロパティにリンクされています. ( polyline_propertiesまたは surface_properties参照).指定子マーカ型++記号 o円 *アスタリスク .点 x十字 'square'または's'正方形 'diamond'または'd'菱形 ^上向き三角形 v下向き三角形 >右向き三角形 <左向き三角形 'pentagram'星型五角形 (ペンタグラム) 'none'マーカなし (デフォルト) - "MarkerEdgeColor" または "MarkForeground":
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参照).- "MarkerFaceColor" または "MarkBackground":
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参照).- "MarkerSize" または "MarkSize":
pointユニットのマーカの大きさを定義するスカラー値. このプロパティはオブジェクトのmark_sizeプロパティに リンクされ,mark_size_unitの値は"point"に設定されています ( polyline_properties または surface_properties参照).- "Visible":
文字列で, 可視モード
"on"または"off"を定義します(デフォルト:"on"). このプロパティはオブジェクトのvisibleプロパティに リンクされています ( polyline_properties または surface_properties参照).- "X data":
実数のベクトルまたは行列で,プロット済みの全ての線または曲面に関する 指定データを(再)定義します. 次元について, この新しいデータは,過去に指定された
Xデータと 完全に一致する必要があることに注意してください: これはこれらのデータ行列を全て同じ次元とする必要があることを意味します. このプロパティはオブジェクトのdata.xプロパティに リンクされています ( polyline_properties または surface_properties参照).- "Y data":
実数のベクトルまたは行列で,プロット済みの全ての線または曲面に関する 指定データを(再)定義します. 次元について, この新しいデータは,前に指定された
Yデータと 完全に一致する必要があることに注意してください: これはこれらのデータ行列を全て同じ次元とする必要があることを意味します. このプロパティはオブジェクトのdata.yプロパティに リンクされています ( polyline_properties または surface_properties参照).- "Z data":
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)
参照
- LineSpec — プロットの線の外観を簡単にカスタマイズするための仕様
- plot — 2Dプロット
- surf — 3次元曲面プロット
- clf — Clears and resets a figure or a frame uicontrol
- polyline_properties — Polylineエンティティプロパティの説明
- surface_properties — 3次元エンティティプロパティの説明
履歴
| バージョン | 記述 |
| 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. |
| Report an issue | ||
| << Compound_properties | Graphics | Graphics: Getting started >> |