#author("2021-04-30T19:15:40+09:00","default:Miyashita","Miyashita")
#author("2021-04-30T19:26:21+09:00","default:Miyashita","Miyashita")
*Attributes メモ [#p4274554]
#contents

** Attributes? [#wd151580]
GMTコマンドの中で,manを読むと
#codeprettify{{
gmt pscoast [other options] -Wpen -Gfill 
}}
というような表記が出てくる.~
この pen や fill は,線や色のスタイルの指定子の集合を指しており,GMT のコマンド間で記法が統されている.~
記法を覚えると様々な GMT コマンドで使える.~
~

**pen attributes [#ne79e090]
**Pen Attributes [#ne79e090]
pen は
#codeprettify{{
-W1p,red,-   # -W はoptionの識別子
+pthin,blue,..-    # +p はoptionの識別子
}}
のように,互いに "," で区切られ,[width],[color],[style] の3つの属性からなる.~
それぞれデフォルトの設定で良い場合は省略可能.例えば -W[color] など.^
~

***width [#i16142d5]
数値に [p,c,i] (ポイント,センチメートル,インチ) のいずれかを付して太さを指定するか,キーワードで表現する.~
数値の後に pci のいずれも付記しない場合,(デフォルトでは)ポイントを意味する.~
キーワードは,細い方から順に thin, thick, fat とこれらの比較級・最上級の単語で9個,~
さらに faint (線なし), default, obese で合計12個ある.~
最も太い obese は18pで,thick は1.0p, default と thinnest は 0.25p になっている.~
確認用に図を作成してみた.ブラウザ上では png に変換し縮小表示しているので,実際に出力される PostScript ファイルでの太さは異なる.~
同じ図を作成するスクリプトは &ref(https://main-t-miyashita.ssl-lolipop.jp/hydrocoast/image/GMT/ex_thickness.sh); から.
~
#ref(https://main-t-miyashita.ssl-lolipop.jp/hydrocoast/image/GMT/example_thickness.png,577x273)
~

***color [#w66c881f]
色の指定方法は5種類あるが,ここではキーワードで指定する方法に絞る.~
数多くのキーワードの中からいくつか絞って図にしてみた.~
&ref(https://main-t-miyashita.ssl-lolipop.jp/hydrocoast/image/GMT/colornames_num.png,480x401);
&ref(https://main-t-miyashita.ssl-lolipop.jp/hydrocoast/image/GMT/colornames.png,480x401);
~
~

***style [#f8d4cb09]
線種の指定方法は,
-solid や dashed などのキーワードを入れる~
-"-", "." の組み合わせで表現する~
-実線と空白の長さを "_" で区切って指定する~

のいずれか.下に図を示す.
#ref(https://main-t-miyashita.ssl-lolipop.jp/hydrocoast/image/GMT/linestyle.png,652x273)
~
~


**vector attributes [#eb31a24e]
**Vector Attributes [#eb31a24e]
公式doc を参照.~
[[plot - Vector Attributes>https://docs.generic-mapping-tools.org/latest/plot.html#vector-attributes]]~
難しい.~

Front page   Edit Diff Attach Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes