爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5004|回复: 1

画多幅散点图,散点在图外

[复制链接]

新浪微博达人勋

发表于 2018-4-16 09:41:42 | 显示全部楼层 |阅读模式
NCL
系统平台:
问题截图:
问题概况: 想将散点画到三张小图上,但是散点在图外
画单张图时是正常的
我看过提问的智慧: 看过
自己思考时长(天): 3

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
主要代码如下:
wks = gsn_open_wks("ps",get_script_prefix_name())            
  gsn_define_colormap(wks,"WhViBlGrYeOrRe")      

  plot = new(3,graphic)  
if(True)then
   mpres              = True
  mpres@gsnMaximize  = False             ; Maximize plot in frame.
  mpres@gsnFrame     = False            ; Don't advance the frame
  mpres@gsnDraw      = False

   mpres@mpMinLatF   = 29.2
   mpres@mpMaxLatF   = 32.8
   mpres@mpMinLonF   = 119.2
   mpres@mpMaxLonF   = 123.


   mpres@mpDataSetName       = "Earth..4"
   mpres@mpDataBaseVersion   = "MediumRes"
   mpres@mpOutlineOn         = True
   mpres@mpOutlineSpecifiers = (/"China:states","Taiwan"/)
   mpres@mpGeophysicalLineThicknessF = 1.5

   mpres@mpFillOn              = True
   mpres@mpFillDrawOrder       = "PostDraw"
   mpres@mpFillAreaSpecifiers  = (/"Water","Land"/)
   mpres@mpSpecifiedFillColors = (/"White","transparent"/)

   mpres@gsnLeftStringFontHeightF = 0.023
   mpres@tmXBLabelFontHeightF     = 0.017
   mpres@tmYLLabelFontHeightF     = 0.017
   mpres@mpOutlineBoundarySets       = "NoBoundaries"   
   mpres@pmTickMarkDisplayMode       = "Always"   

  mpres@mpFillColors = (/"transparent","transparent", \
  "lightgray","transparent"/)    ;assign light gray to land masses
end if

  mpres@tiMainString = "obs_PRE"
  plot(0) = gsn_csm_map(wks,mpres)
  mpres01=mpres
  mpres01@tiMainString ="1p5km_PRE"
  plot(1)= gsn_csm_map(wks,mpres01)
  mpres09=mpres
  mpres09@tiMainString ="9km_PRE"
  plot(2)= gsn_csm_map(wks,mpres09)

  lat=fspan(30.,32.,15)
  lon=fspan(119.5, 120.0, 15)

   gsn_polymarker(wks,plot(0),lon,lat,True)
   gsn_polymarker(wks,plot(1),lon+0.1,lat+0.1,True)
   gsn_polymarker(wks,plot(2),lon+0.04,lat+0.04,True)

        panelres             = True
        panelres@gsnMaximize = True

        gsn_panel(wks,plot,(/1,3/),panelres)


密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-4-16 14:33:30 | 显示全部楼层
用gsn_add_polymarker代替gsn_polymarker后问题解决了。
但是有个新问题 ,我同样方法的另一个程序在小图上的点缺失了很多
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表