gnuplotプロット例 : 方位の図示

gnuplotによるプロット例 : 方位の図示

方位の図示

プロットソースコード


set size square
set angles degrees
unset key
unset tics
l = 3.0
l2 = l*0.85
d = 360.0/16.0

n=1; set label n "東北東" at cos(n*d)*l, sin(n*d)*l center font ",10"
n=2; set label n "北東" at cos(n*d)*l, sin(n*d)*l center font ",16"
n=3; set label n "北北東" at cos(n*d)*l, sin(n*d)*l center font ",10"
n=4; set label n "北" at cos(n*d)*l, sin(n*d)*l center font ",22"
n=5; set label n "北北西" at cos(n*d)*l, sin(n*d)*l center font ",10"
n=6; set label n "北西" at cos(n*d)*l, sin(n*d)*l center font ",16"
n=7; set label n "西北西" at cos(n*d)*l, sin(n*d)*l center font ",10"
n=8; set label n "西" at cos(n*d)*l, sin(n*d)*l center font ",22"
n=9; set label n "西南西" at cos(n*d)*l, sin(n*d)*l center font ",10"
n=10; set label n "南西" at cos(n*d)*l, sin(n*d)*l center font ",16"
n=11; set label n "南南西" at cos(n*d)*l, sin(n*d)*l center font ",10"
n=12; set label n "南" at cos(n*d)*l, sin(n*d)*l center font ",22"
n=13; set label n "南南東" at cos(n*d)*l, sin(n*d)*l center font ",10"
n=14; set label n "南東" at cos(n*d)*l, sin(n*d)*l center font ",16"
n=15; set label n "東南東" at cos(n*d)*l, sin(n*d)*l center font ",10"
n=16; set label n "東" at cos(n*d)*l, sin(n*d)*l center font ",22"

m=1; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'brown' lw 2 empty
m=2; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'dark-red' lw 2 filled
m=3; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'brown' lw 2 empty
m=4; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'red' lw 5 filled
m=5; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'brown' lw 2 empty
m=6; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'dark-red' lw 2 filled
m=7; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'brown' lw 2 empty
m=8; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'red' lw 5 filled
m=9; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'brown' lw 2 empty
m=10; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'dark-red' lw 2 filled
m=11; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'brown' lw 2 empty
m=12; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'red' lw 5 filled
m=13; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'brown' lw 2 empty
m=14; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'dark-red' lw 2 filled
m=15; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'brown' lw 2 empty
m=16; set arrow m from 0,0 to cos(m*d)*l2, sin(m*d)*l2 lc 'red' lw 5 filled

set object 1 circle at 0,0 size 0.2 fillstyle solid 1.0 fillcolor 'gray30' front

plot [-3.5:3.5][-3.5:3.5] -5
pause -1



gnuplot関連のブログ記事

コメント

スポンサーリンク


このブログの人気の投稿

gnuplotでプロットなどの色をcolornameの指定で変更する

catコマンドの出力を行番号付きにするためのコマンドラインオプション(-n, -b)

Ubuntu Softwareが起動しないのでいろいろと調べてみる(Ubuntu 20.04.1 LTS)

gnuplot : グラフにグリッド線を描く方法(set grid)

gnuplot : プロット画像のサイズ指定について(set sizeとの違い)