本篇介绍IDL设置地图的方法,和一些常用的关键字、对象。
代码如下
IDL 8.5版本
PRO draw_sst, data, name_string, color_table, scale, offset ;这是我的一个函数
temp = data[*, *, 0]
index_valid = WHERE(temp LE 250, count_valid)
min_value = ROUND( MIN(temp[index_valid])*scale[0]+offset[0] )
max_value = ROUND( MAX(temp[index_valid])*scale[0]+offset[0] )
object = image(temp,rgb_table=color_table, title='GMI v8.2 '+name_string[0]+$
': 2019/08 - monthly average - Global', map_projection='geographic', image_dimensions=[360, 180], $
IMAGE_LOCATION=[0,-90],grid_units=2,/BOX_AXES) ;地图投影采用geographic
bar = colorbar(target=object, range=[min_value, max_value],$
position=[0.045,0.10,0.595,0.13],minor=5,title='Temperature $\deg C$')
object['Latitudes'].label_angle = 90 ;设置地图标注的角度
object['Longitudes