- 积分
 - 1110
 
	- 贡献
 -  
 
	- 精华
 
	- 在线时间
 -  小时
 
	- 注册时间
 - 2014-3-27
 
	- 最后登录
 - 1970-1-1
 
 
 
 
 
 
 | 
	
 
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册 
 
 
 
x
 
 
 
请问怎么加上两根线的图例.. 
 
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"    
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"    
begin 
  data1 = asciiread("/home/lhz/annual_var/pre.txt",(/15/),"float") 
  data2 = asciiread("/home/lhz/annual_var/hazard.txt",(/15/),"float") 
  data3 = asciiread("/home/lhz/annual_var/zero.txt",(/15/),"float") 
  time = asciiread("/home/lhz/annual_var/time.txt",(/15/),"float") 
  y_pre    = data1(:) 
  y_haz    = data2(:) 
  y_zero   = data3(:) 
  x        = time(:) 
 
  wks = gsn_open_wks("png","stand_anom")  
 
  resp                         = True  
  resp@gsnDraw                 = False 
  resp@gsnFrame                = False 
  resp@tiYAxisString           = "Standardized_Anom"  
  resp@tiXAxisString           = "Annual_order"   
  resp@xyLineThicknesses       = 7.0              
  resp@trYMaxF                 =  3.                      
  resp@trYMinF                 = -3.                      
  resp@trXMaxF                 = 2013 
  resp@trXMinF                 = 1999 
;  resp@xyLabelStrings          = "S" 
  resp@xyMarkLineModes         = "MarkLines"     
  resp@xyMarkers               = 16       
  resp@xyMarkerSizeF           = 0.01      
  resp@xyMarkerColors          = "blue4"                    
  resp@xyLineColors            = "blue4"        
      
  plot_pre = gsn_csm_xy(wks,x,y_pre,resp) 
 
  resh                         = True  
  resh@gsnDraw                 = False 
  resh@gsnFrame                = False 
  resh@xyLineThicknesses       = 7.0              
  resh@xyMarkLineModes         = "MarkLines"     
  resh@xyMarkers               = 16          
  resh@xyMarkerSizeF           = 0.01                  
  resh@xyMarkerColors          = "black"                        
  resh@xyLineColors            = "black"    
  plot_haz = gsn_csm_xy(wks,x,y_haz,resh) 
 
  overlay(plot_pre,plot_haz) 
 
  resz                         = True  
  resz@gsnDraw                 = False 
  resz@gsnFrame                = False 
  resz@xyLineThicknesses       = 7.0              
  resz@xyLineColors            = "red" 
  resz@xyDashPattern           = 4  
  
  plot_zero = gsn_csm_xy(wks,x,y_zero,resz) 
   
  overlay(plot_pre,plot_zero) 
 
  draw(plot_pre) 
  frame(wks) 
end 
 
 
 
 
 |   
 
 
 
 |