0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

NCL > マーカー > 塗りつぶした星形を配置する

Last updated at Posted at 2019-02-15
動作環境
Xeon E5-2620 v4 (8コア) x 2
32GB RAM
GeForce GT 730 1GB GDDR5
CentOS 6.9 (64bit)
NCAR Command Language Version 6.3.0
for WRF3.7.1, WPS3.7.1
  openmpi-1.8.x86_64 とその-devel
  mpich.x86_64 3.1-5.el6とその-devel
  gcc version 4.4.7 (とgfortran)
for WRF3.9, WPS3.9
  Open MPI v2.1.1
  gcc version 4.9.2 (とgfortran; devtoolset-3使用)
 NetCDF v4.4.1.1, NetCDF (Fortran API) v4.4.4
Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
Python 3.6.0 on virtualenv
GNU bash, version 4.1.2(2)-release (x86_64-redhat-linux-gnu)
date (GNU coreutils) 8.4 
tmux 1.6-3.el6

NCL(NCAR Command Language)関連。

内容

  • 塗りつぶした星形を配置する
    • predefined makersには塗りつぶした星形はない
    • フォントテーブルにある塗りつぶした星形を使う

参考実装

https://www.ncl.ucar.edu/Document/Functions/Built-in/NhlNewMarker.shtml
のExample4をもとにした

  • 余分な処理の除去
  • 星形仕様のためのパラメータ

実装

filledMarker_190215.ncl
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"

begin
  wks = gsn_open_wks("x11","marker")
  gsn_define_colormap(wks,"rainbow+gray")

  canvas = create "canvas" logLinPlotClass wks
    "vpXF"                  : 0.0
    "vpYF"                  : 1.0
    "vpWidthF"              : 1.0
    "vpHeightF"             : 1.0
  end create

  mstring = "z"
  fontnum = 35
  xoffset = 0.0
  yoffset = 0.0
  ratio   = 1.0
  size    = 1.0
  angle   = 0.0
  new_index = NhlNewMarker(wks, mstring, fontnum, xoffset, yoffset, ratio, size, angle)

  mkres               = True
  mkres@gsMarkerSizeF = 0.2
  mkres@gsMarkerColor = "black"
  mkres@gsMarkerIndex = new_index
  datx = (/0.2, 0.6, 0.2, 0.6/)
  daty = (/0.2, 0.2, 0.6, 0.6/)
  gsn_polymarker(wks, canvas, datx, daty, mkres)

  frame(wks)   ; Advance the frame.
end

実行

$ ncl filledMarker_190215.ncl

2019-02-15_10h31_47.png

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?