メインコンテンツ

このページは機械翻訳を使用して翻訳されました。元の英語を参照するには、ここをクリックします。

plotm

axesmベースのマップに 2D のラインと点を投影する

説明

plotm(lat,lon) は、現在の axesm ベースのマップ上に投影された line オブジェクトを表示します。latlon を使用して、ラインの緯度と経度の座標を指定します。

地理軸またはマップ軸に 2D 折れ線グラフを表示するには、代わりに geoplot 関数を使用します。

plotm([lat lon]) を使用すると、緯度と経度の座標を 1 つの 2 列の行列にまとめることができます。

plotm(lat,lon,LineSpec) はライン スタイル、マーカー、色を指定します。

plotm(lat,lon,Name,Value) は、名前と値のペアの引数を使用して、XDataYData、および ZData を除く任意の数の Line のプロパティ を指定します。Name はプロパティ名であり、Value は対応する値です。Name は一重引用符で囲む必要があります (' ')。Name1,Value1,...,NameN,ValueN のように、複数の名前と値のペアの引数を、任意の順番で指定できます。プロパティ名は省略可能であり、大文字と小文字は区別されません。

h = plotm(___) は、表示されているラインへのハンドルを返します。

すべて折りたたむ

まず、ワークスペースに海岸線データを読み込み、マップを作成します。次に、データをプロットします。plotm 関数は、coastlatcoastlonNaN 値を使用して、データを個別のラインに分割します。

load coastlines
ax = axesm('sinusoid','Frame','on');
plotm(coastlat,coastlon,'g')

Figure contains an axes object. The axes object contains 2 objects of type patch, line.

入力引数

すべて折りたたむ

数値ベクトルとして指定された緯度または経度ベクトル。axesm ベースのマップの AngleUnits プロパティに一致する単位で値を指定します。latlon は同じサイズである必要があります。

NaN 値を使用して、ラインまたはポリゴンにブレークを作成します。たとえば、このコードは最初の 3 つの要素をプロットし、4 番目の要素をスキップし、最後の 3 つの要素を使用して別のラインを描画します。

lat = [0 1 2 NaN 4 5 6];
lon = [0 1 2 NaN 3 4 5];
axesm('UTM','Zone','31N','Frame','on')
plotm(lat,lon)

ライン スタイル、マーカー、および色。記号を含む 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

出力引数

すべて折りたたむ

表示されたラインへのハンドル。MATLAB® グラフィックス オブジェクトへのハンドルとして返されます。

ヒント

plotm 関数に 2 つのポイントを渡すと、関数は地図投影やポイント間の距離に関係なく、各ポイントの位置をマップ上に投影し、それらを結ぶ直線を表示します。2 点間の投影された測地線または等角線曲線を表示するには、まず track2 関数を使用して中間点を挿入します。

バージョン履歴

R2006a より前に導入

参考

| |