Main Content

feather

  • Arrows along the x-axis

説明

feather(U,V)x 軸から発生する矢印をプロットします。直交座標成分 UV を使用して矢印の方向を指定します。Ux 成分を示し、Vy 成分を示します。n 番目の矢印には x 軸の n に起点があります。矢印の数は UV の要素数と一致します。

feather(Z) は、Z で指定された複素数値を使用して矢印をプロットします。実数部は x 成分を示し、虚数部は y 成分を示します。この構文は feather(real(Z),imag(Z)) と等価です。

feather(___,LineSpec) は、矢印のライン スタイル、マーカー記号および色を設定します。

feather(ax,___) は、現在の座標軸ではなく、指定された座標軸に矢印をプロットします。

f = feather(___) は、length(U)+1 要素をもつ Line オブジェクトのベクトルを返します。最初の length(U) 要素は個々の矢印を表し、最後の要素は x 軸に沿った水平線を表します。これらの Line オブジェクトを使用して、プロットを作成した後の外観を制御します。

すべて折りたたむ

各矢印の成分を直交座標の値として指定して、フェザー プロットを作成します。n 番目の矢印は x 軸の n から発生します。

t = -pi/2:pi/8:pi/2;
u = 10*sin(t);
v = 10*cos(t);
feather(u,v)

Figure contains an axes object. The axes object contains 10 objects of type line.

最初に極座標を直交座標に変換することにより、極座標を使用してフェザー プロットを作成します。

これを行うには、極座標をもつベクトルを作成します。関数 pol2cart を使用して直交座標に変換します。次に、プロットを作成します。

th = -pi/2:pi/16:0;
r = 10*ones(size(th));
[u,v] = pol2cart(th,r);
feather(u,v)

Figure contains an axes object. The axes object contains 10 objects of type line.

複素数値のベクトルを作成します。次に、フェザー プロットを使用してそれらを表示します。各矢印の実数部は x 成分を決定し、虚数部は y 成分を決定します。

Z = [2+3i -1-3i -1+i 2i 3-4i -2-2i -2+4i 0.5-i -3i 1+i];
feather(Z)

Figure contains an axes object. The axes object contains 11 objects of type line.

赤色の矢印でフェザー プロットを作成します。

t = -pi/2:pi/8:pi/2;
u = 10*sin(t);
v = 10*cos(t);
feather(u,v,'r')

Figure contains an axes object. The axes object contains 10 objects of type line.

矢印を変数に割り当ててからそのプロパティを設定することにより、単一の矢印のライン幅と色を指定します。これを行うには、最初にフェザー プロットを作成して、Line オブジェクトの配列を返します。

t = -pi/2:pi/8:pi/2;
u = 10*sin(t);
v = 10*cos(t);
f = feather(u,v);

最初の矢印を変数に割り当てます。最初の矢印は uv の最初の要素に対応します。次に、ライン幅と色を変更します。

f1 = f(1);
f1.Color = 'r';
f1.LineWidth = 2;

Figure contains an axes object. The axes object contains 10 objects of type line.

R2019b 以降、関数 tiledlayout および nexttile を使用して、プロットをタイル表示できます。関数 tiledlayout を呼び出して、1 行 2 列のタイル表示チャート レイアウトを作成します。関数 nexttile を呼び出して axes オブジェクトを作成し、オブジェクトを ax1 として返します。ax1 を関数 feather に渡し、左のプロットを作成します。座標軸を関数 title に渡し、プロットにタイトルを追加します。このプロセスを繰り返して右のプロットを作成します。

tiledlayout(1,2)

% Left plot
ax1 = nexttile;
t = 0:pi/8:pi/2;
u1 = 10*sin(t);
v1 = 10*cos(t);
feather(ax1,u1,v1)
title(ax1,'Left Plot')

% Right plot
ax2 = nexttile;
u2 = zeros(5,1);
v2 = [1 -2 3 -4 5];
feather(ax2,u2,v2)
title(ax2,'Right Plot')

Figure contains 2 axes objects. Axes object 1 with title Left Plot contains 6 objects of type line. Axes object 2 with title Right Plot contains 6 objects of type line.

入力引数

すべて折りたたむ

x 成分。スカラー、ベクトルまたは行列として指定します。直交座標の値を指定します。極座標から直交座標にデータを変換するには、pol2cart を使用します。

U のサイズは V のサイズと同じでなければなりません。

y 成分。スカラー、ベクトルまたは行列として指定します。直交座標の値を指定します。極座標から直交座標にデータを変換するには、pol2cart を使用します。

V のサイズは U のサイズと同じでなければなりません。

複素数値。スカラー、ベクトルまたは行列として指定します。Z の実数部は矢印の x 成分を示し、虚数部は y 成分を示します。

ライン スタイル、マーカー、および色。記号を含む string スカラーまたは文字ベクトルとして指定します。記号の順番は任意です。3 つの特性 (ライン スタイル、マーカーおよび色) をすべて指定する必要はありません。たとえば、ライン スタイルを省略してマーカーを指定する場合、プロットはラインなしでマーカーのみを表示します。

例: "--or" は円形マーカー付きの赤い破線です。

ライン スタイル説明結果として得られる線
"-"実線

Sample of solid line

"--"破線

Sample of dashed line

":"点線

Sample of dotted line

"-."一点鎖線

Sample of dash-dotted line, with alternating dashes and dots

マーカー説明結果のマーカー
"o"

Sample of circle marker

"+"プラス記号

Sample of plus sign marker

"*"アスタリスク

Sample of asterisk marker

"."

Sample of point marker

"x"十字

Sample of cross marker

"_"水平線

Sample of horizontal line marker

"|"垂直線

Sample of vertical line marker

"square"正方形

Sample of square marker

"diamond"菱形

Sample of diamond marker

"^"上向き三角形

Sample of upward-pointing triangle marker

"v"下向き三角形

Sample of downward-pointing triangle marker

">"右向き三角形

Sample of right-pointing triangle marker

"<"左向き三角形

Sample of left-pointing triangle marker

"pentagram"星形五角形

Sample of pentagram marker

"hexagram"星形六角形

Sample of hexagram marker

色名省略名RGB 3 成分外観
"red""r"[1 0 0]

Sample of the color red

"green""g"[0 1 0]

Sample of the color green

"blue""b"[0 0 1]

Sample of the color blue

"cyan" "c"[0 1 1]

Sample of the color cyan

"magenta""m"[1 0 1]

Sample of the color magenta

"yellow""y"[1 1 0]

Sample of the color yellow

"black""k"[0 0 0]

Sample of the color black

"white""w"[1 1 1]

Sample of the color white

ターゲット座標軸。Axes オブジェクトとして指定します。

拡張機能

バージョン履歴

R2006a より前に導入

参考

関数

プロパティ