taylor/taylor_diagram.ncl.1
author Forrest Hoffman <forrest@climatemodeling.org>
Thu, 26 Mar 2009 14:02:21 -0400
changeset 1 4be95183fbcd
permissions -rw-r--r--
Modifications to scoring and graphics production for the final version of code for the C-LAMP paper in GCB.
     1 function taylor_diagram (wks:graphic ,RATIO[*][*]:numeric, CC[*][*]:numeric \
     2                                      ,rOpts:logical)
     3 ;--------------------------------------------------------------------
     4 ; This version of taylor_diagram supports "paneling"
     5 ; It requires NCL version 4.2.0.a034 because it uses "gsn_create_legend"
     6 ;--------------------------------------------------------------------
     7 
     8 ;
     9 ; Generate a Taylor Diagram:
    10 ; Generate Multiple Aspects of Model Performance in a Single Diagram
    11 ; Taylor, K. E., J. Geophys. Res., 106, D7, 7183-7192, 2001
    12 ;
    13 ; An example:
    14 ; http://www.grida.no/climate/ipcc_tar/wg1/fig8-4.htm
    15 ;
    16 ; This expects one or more datasets. The left dimension 
    17 ; is the number of datasets. The rightmost is the number of pts.
    18 ;
    19 ; Markers are at: 
    20 ; http://www.ncl.ucar.edu/Document/Graphics/Resources/gs.shtml
    21 ;
    22 ; By default, the function can handle up to 10 variable comparisons..
    23 ; To expand ...  modify the 'Colors' and 'Markers' attributes.
    24 ; The user can change / add some default settings.
    25 ;
    26 ; The defaults that the user can modify:
    27 ;
    28 ; rOpts                 = True 
    29 ;                                  ; 'made-up' resources
    30 ; rOpts@Colors          =  (/ "blue" , "red", "green", "cyan", "black" \
    31 ;                           , "torquoise", "brown", "yellow"/)
    32 ; rOpts@Markers         =  (/ 2, 3, 6, 14, 9, 12, 7, 4/) ; Marker Indices
    33 ; rOpts@markerTxOffset  = 0.0175   ; offset for text above marker
    34 ; rOpts@stnRad          = (/ 1. /) ;  (/ 0.50, 0.75, 1.5 /) 
    35 ; rOpts@centerDiffRMS   = False    ;  True mean draw additional radii from REF 
    36 ; rOpts@caseLabelsFontHeightF = 0.05
    37 ; rOpts@varLabelsFontHeightF  = 0.013
    38 ; rOpts@varLabelsYloc         = 0.65
    39 ; rOpts@legendWidth           = 0.015
    40 ; rOpts@legendHeight          = 0.030*nCase
    41 ; rOpts@taylorDraw            = True
    42 ; rOpts@taylorFrame           = True
    43 ;
    44 ;                                  ; standard NCL resources
    45 ; rOpts@tiMainString    = "Taylor" ; not using title makes plot bigger
    46 ; rOpts@gsMarkerSizeF   = 0.0085   ; marker size   
    47 ; rOpts@gsMarkerThicknessF = 1.0
    48 ; rOpts@txFontHeightF   = 0.0125   ; text size 
    49 ; rOpts@tiMainFontHeightF = 0.0225 ; tiMainString size
    50 ;
    51 ; It returns to the user a graphic object containing the 
    52 ; Taylor background and plotted x/y pts.
    53 ; This graphic object contains a simple Taylor background appropriate
    54 ; for standardized data and the markers for the datasets.
    55 ; ==================================================================
    56 ; This version allows paneling:
    57 ;      The 'cumbersome' "dum" variables were added by 
    58 ;      Adam Phillips to allow paneling via "gsn_add_?".
    59 ; ==================================================================
    60 begin
    61   dimR                  = dimsizes(RATIO)
    62   nCase                 = dimR(0)    ; # of cases [models] 
    63   nVar                  = dimR(1)    ; # of variables
    64 
    65                                      ; x/y coordinates for plotting
    66   X    = new ( (/nCase,nVar/) , typeof(RATIO) )
    67   Y    = new ( (/nCase,nVar/) , typeof(RATIO) )
    68 
    69   do nc=0,nCase-1
    70      angle      = acos( CC(nc,:) )   ; array operation                                    
    71      X(nc,:)    = RATIO(nc,:)*cos( angle )     
    72      Y(nc,:)    = RATIO(nc,:)*sin( angle )    
    73   end do
    74 
    75   xyMin                 = 0.  
    76   xyOne                 = 1.00
    77   xyMax                 = 1.65
    78   xyMax_Panel           = xyMax+ 0.10            ; paneling purposes
    79  
    80   if (rOpts .and. isatt(rOpts,"txFontHeightF"))  then 
    81       FontHeightF       = rOpts@txFontHeightF    ; user wants to specify size
    82   else
    83       FontHeightF       = 0.0175
    84   end if
    85  
    86 ; ----------------------------------------------------------------
    87 ; Part 1:
    88 ; base plot: Based upon request of Mark Stevens
    89 ; basic x-y and draw the 1.0 observed and the outer curve at 1.65
    90 ; ----------------------------------------------------------------
    91   
    92   rxy                   = True       
    93   rxy@gsnDraw           = False
    94   rxy@gsnFrame          = False
    95   rxy@vpHeightF         = 0.65
    96   rxy@vpWidthF          = 0.65
    97   rxy@tmYLBorderOn      = False
    98   rxy@tmXBBorderOn      = False
    99 
   100 ; rxy@tiYAxisString     = "Standardized Deviations (Normalized)"
   101   rxy@tiYAxisString     = "Standardized Deviations"
   102   rxy@tiYAxisFontHeightF= FontHeightF                        ; default=0.025 
   103   
   104   rxy@tmXBMode          = "Explicit" 
   105   rxy@tmXBValues        = (/0.0,0.25,0.50,0.75,1.00,1.25,1.5/)    ; major tm
   106                                                                   ; default  "OBS" or "REF"
   107  ;rxy@tmXBLabels        = (/"0.00","0.25","0.50","0.75","REF" ,"1.25","1.50"/)
   108   rxy@tmXBLabels        = (/"    ","0.25","0.50","0.75","REF" ,"1.25","1.50"/)
   109   if (rOpts .and. isatt(rOpts,"OneX") )  then                     ; eg: rOpts@OneX="1.00" 
   110      ;rxy@tmXBLabels        = (/"0.00","0.25","0.50","0.75",rOpts@OneX,"1.25","1.50"/)
   111       rxy@tmXBLabels        = (/"    ","0.25","0.50","0.75",rOpts@OneX,"1.25","1.50"/)
   112   end if
   113 
   114   rxy@tmXBMajorLengthF  = 0.015      ; default=0.02 for a vpHeightF=0.6
   115   rxy@tmXBLabelFontHeightF = FontHeightF
   116   rxy@tmXBMinorOn       = False
   117   rxy@trXMaxF           = xyMax_Panel
   118 
   119   rxy@tmYLMode          = "Manual"
   120   rxy@tmYLMinorOn       = False
   121   rxy@tmYLMajorLengthF  = rxy@tmXBMajorLengthF
   122   rxy@tmYLLabelFontHeightF = FontHeightF
   123   rxy@tmYLMode          = "Explicit" 
   124   rxy@tmYLValues        = (/0.0, .25,0.50, 0.75, 1.00, 1.25, 1.5/) ; major tm
   125   rxy@tmYLLabels        = (/"0.00","0.25","0.50","0.75","1.00","1.25","1.50"/)
   126  ;rxy@tmYLLabels        = (/"    ","0.25","0.50","0.75","1.00","1.25","1.50"/)
   127   rxy@trYMaxF           = xyMax_Panel
   128 
   129   rxy@tmYRBorderOn      = False
   130   rxy@tmYROn            = False      ; Turn off right tick marks.
   131 
   132   rxy@tmXTBorderOn      = False
   133   rxy@tmXTOn            = False      ; Turn off right tick marks.
   134 
   135   rxy@xyDashPatterns    = (/ 0 /)    ; line characteristics (dash,solid)
   136   rxy@xyLineThicknesses = (/ 2./)    ; choose line thickness
   137 
   138   rxy@gsnFrame          = False      ; Don't advance the frame.
   139 
   140                                             ; create outer 'correlation axis'
   141   npts    = 200                        ; arbitrary
   142   xx      = fspan(xyMin,xyMax,npts) 
   143   yy      = sqrt(xyMax^2 - xx^2    )   ; outer correlation line (xyMax)
   144 
   145   sLabels = (/"0.0","0.1","0.2","0.3","0.4","0.5","0.6" \ ; correlation labels
   146              ,"0.7","0.8","0.9","0.95","0.99","1.0"     /); also, major tm
   147   cLabels = stringtofloat(sLabels)
   148   rad     = 4.*atan(1.0)/180.
   149   angC    = acos(cLabels)/rad                     ; angles: correlation labels
   150                                                                        
   151   if (rOpts .and. isatt(rOpts,"tiMainString")) then
   152       rxy@tiMainString      = rOpts@tiMainString
   153      ;rxy@tiMainOffsetYF    = 0.015               ; default  0.0
   154       if (isatt(rOpts,"tiMainFontHeightF")) then
   155            rxy@tiMainFontHeightF = rOpts@tiMainFontHeightF
   156       else
   157            rxy@tiMainFontHeightF = 0.0225         ; default  0.025              
   158       end if
   159   end if
   160 ;;if (rOpts .and. isatt(rOpts,"gsnCenterString")) then
   161 ;;    rxy@gsnCenterString  = rOpts@gsnCenterString      ; only gsn_csm_xy
   162 ;;end if
   163 
   164   taylor  = gsn_xy(wks,xx,yy,rxy)                 ; Create and draw XY plot.
   165 
   166   rsrRes  = True
   167   rsrRes@gsLineThicknessF  = rxy@xyLineThicknesses(0)  ; line thickness
   168   rsrRes@gsLineDashPattern = 0                    ; solid line pattern
   169                                                   ; draw x and y to xyMax
   170   dum0 = gsn_add_polyline(wks,taylor,(/0.,  0. /),(/0.,xyMax/), rsrRes)
   171   dum1 = gsn_add_polyline(wks,taylor,(/0.,xyMax/),(/0.,  0. /), rsrRes)
   172 
   173   xx   = fspan(xyMin, xyOne ,npts)                ; draw 1.0 standard radius
   174   yy   = sqrt(xyOne - xx^2)   
   175   rsrRes@gsLineDashPattern = 1                    ; dashed line pattern
   176   rsrRes@gsLineThicknessF  = rxy@xyLineThicknesses(0)  ; line thickness
   177   dum2 = gsn_add_polyline(wks,taylor,xx,yy, rsrRes)
   178   delete(xx)
   179   delete(yy)
   180                                                   
   181   if (rOpts .and. isatt(rOpts,"stnRad") ) then
   182       rsrRes@gsLineThicknessF  = 1   ; rxy@xyLineThicknesses(0)  
   183       nStnRad = dimsizes(rOpts@stnRad)
   184 
   185       dum3  = new(nStnRad,graphic)
   186       do n=0,nStnRad-1
   187          rr = rOpts@stnRad(n)
   188          xx = fspan(xyMin, rr ,npts) 
   189          yy = sqrt(rr^2   - xx^2)   
   190          dum3(n) = gsn_add_polyline(wks,taylor,xx,yy, rsrRes)
   191       end do
   192       taylor@$unique_string("dum")$ = dum3
   193 
   194       delete(xx)
   195       delete(yy)
   196   end if
   197 
   198   getvalues taylor                                ; get style info from taylor
   199     "tmYLLabelFont"        : tmYLLabelFont        ; use for correlation axis
   200     "tmYLLabelFontHeightF" : tmYLLabelFontHeightF
   201   end getvalues
   202 
   203 ; ----------------------------------------------------------------
   204 ; Part 2:
   205 ; Correlation labels
   206 ; ----------------------------------------------------------------
   207   radC    = xyMax                                  ; for correlation labels
   208   xC      = radC*cos(angC*rad)
   209   yC      = radC*sin(angC*rad)
   210 ; added to get some separation
   211   xC      = xC + 0.020*cos(rad*angC)
   212   yC      = yC + 0.060*sin(rad*angC)
   213 
   214   txRes               = True                      ; text mods desired
   215   txRes@txFontHeightF = FontHeightF               ; match YL 
   216   txRes@tmYLLabelFont = tmYLLabelFont             ; match YL
   217   txRes@txAngleF      = -45.
   218   if (.not.isatt(rOpts,"drawCorLabel") .or. rOpts@drawCorLabel) then 
   219       dum4 = gsn_add_text(wks,taylor,"Correlation",1.30,1.30,txRes)
   220 	 taylor@$unique_string("dum")$ = dum4
   221   end if
   222   txRes@txAngleF      = 0.0 
   223   txRes@txFontHeightF = FontHeightF*0.50          ; bit smaller
   224 
   225 ;;dum0 = gsn_add_text(wks,taylor,"OBSERVED",1.00,0.075,txRes)
   226 
   227   plRes               = True
   228   plRes@gsLineThicknessF = 2.
   229   
   230   txRes@txJust        = "CenterLeft"              ; Default="CenterCenter".
   231   txRes@txFontHeightF = FontHeightF               ; match YL 
   232  ;txRes@txBackgroundFillColor = "white"
   233 
   234   tmEnd = 0.975
   235   radTM = xyMax*tmEnd                             ; radius end: major TM 
   236   xTM   = new( 2 , "float")
   237   yTM   = new( 2 , "float")
   238 
   239   dum5 = new(dimsizes(sLabels),graphic)
   240   dum6 = dum5
   241 
   242   do i=0,dimsizes(sLabels)-1                      ; Loop to draw strings
   243     txRes@txAngleF = angC(i)
   244     dum5(i) = gsn_add_text(wks, taylor, sLabels(i),xC(i),yC(i),txRes) ; cor label
   245     xTM(0)   = xyMax*cos(angC(i)*rad)             ; major tickmarks at
   246     yTM(0)   = xyMax*sin(angC(i)*rad)             ; correlation labels
   247     xTM(1)   = radTM*cos(angC(i)*rad)             
   248     yTM(1)   = radTM*sin(angC(i)*rad)
   249     dum6(i) = gsn_add_polyline(wks,taylor,xTM,yTM,plRes)
   250   end do
   251                                                   ; minor tm locations
   252   mTM     = (/0.05,0.15,0.25,0.35,0.45,0.55,0.65 \ 
   253              ,0.75,0.85,0.91,0.92,0.93,0.94,0.96,0.97,0.98  /)
   254   angmTM  = acos(mTM)/rad                         ; angles: correlation labels
   255   radmTM  = xyMax*(1.-(1.-tmEnd)*0.5)             ; radius end: minor TM 
   256 
   257   dum7 = new(dimsizes(mTM),graphic)
   258 
   259   do i=0,dimsizes(mTM)-1                          ; manually add tm
   260     xTM(0)   = xyMax*cos(angmTM(i)*rad)           ; minor tickmarks
   261     yTM(0)   = xyMax*sin(angmTM(i)*rad)
   262     xTM(1)   = radmTM*cos(angmTM(i)*rad)          
   263     yTM(1)   = radmTM*sin(angmTM(i)*rad)
   264     dum7(i)  = gsn_add_polyline(wks,taylor,xTM,yTM,plRes)
   265   end do
   266                                                   ; added for Wanli
   267   if (rOpts .and. isatt(rOpts,"ccRays") ) then
   268       angRL = acos(rOpts@ccRays)/rad             ; angles: radial lines
   269 
   270       rlRes = True
   271       rlRes@xyDashPattern    = 4  ; line pattern
   272       rlRes@xyLineThicknessF = 1  ; choose line thickness
   273 
   274       dum8 = new(dimsizes(angRL),graphic)
   275       do i=0,dimsizes(angRL)-1
   276          xRL     = xyMax*cos(angRL(i)*rad)
   277          yRL     = xyMax*sin(angRL(i)*rad)
   278          dum8(i) = gsn_add_polyline(wks,taylor,(/0, xRL /),(/0,  yRL  /),rlRes)
   279       end do
   280       taylor@$unique_string("dum")$ = dum8
   281   end if
   282   
   283 ; ----------------------------------------------------------------
   284 ; Part 3:
   285 ; Concentric about 1.0 on XB axis
   286 ; I think this is correct. Still test mode.
   287 ; ----------------------------------------------------------------
   288   if (rOpts .and. isatt(rOpts,"centerDiffRMS") \
   289             .and. rOpts@centerDiffRMS) then
   290       respl                    = True                ; polyline mods desired
   291       respl@gsLineThicknessF   = 1.0                 ; line thickness
   292       respl@gsLineColor        = "Black"             ; line color     
   293       respl@gsLineDashPattern  = 2                   ; short dash lines
   294       
   295       dx   = 0.25
   296       ncon = 4                                       ; 0.75, 0.50, 0.25, 0.0
   297       npts = 100                                     ; arbitrary
   298       ang  = fspan(180,360,npts)*rad
   299 
   300       dum9 = new(ncon,graphic)
   301 
   302       do n=1,ncon 
   303          rr  = n*dx            ; radius from 1.0 [OBS] abscissa
   304          xx  = 1. + rr*cos(ang)
   305          yy  = fabs( rr*sin(ang) )
   306          if (n.le.2) then
   307              dum9(n-1) = gsn_add_polyline(wks,taylor,xx,yy,respl)
   308          end if
   309          if (n.eq.3) then
   310              n3 = floattointeger( 0.77*npts ) 
   311              dum9(n-1) = gsn_add_polyline(wks,taylor,xx(0:n3),yy(0:n3),respl)
   312          end if
   313          if (n.eq.4) then
   314              n4 = floattointeger( 0.61*npts ) 
   315              dum9(n-1) = gsn_add_polyline(wks,taylor,xx(0:n4),yy(0:n4),respl)
   316          end if
   317       end do
   318       delete(ang)
   319       delete(xx)
   320       delete(yy)
   321       taylor@$unique_string("dum")$ = dum9
   322 
   323   end if
   324 ; ---------------------------------------------------------------
   325 ; Part 4:
   326 ; generic resources that will be applied to all users data points
   327 ; of course, these can be changed 
   328 ; http://www.ncl.ucar.edu/Document/Graphics/Resources/gs.shtml
   329 ; ---------------------------------------------------------------
   330   if (rOpts .and. isatt(rOpts,"Markers")) then
   331       Markers = rOpts@Markers
   332   else
   333       Markers = (/ 4, 6, 8,  0, 9, 12, 7, 2, 11, 16/) ; Marker Indices
   334   end if
   335 
   336   if (rOpts .and. isatt(rOpts,"Colors")) then
   337       Colors  = rOpts@Colors
   338   else
   339       Colors  = (/ "red", "blue", "green", "cyan", "orange" \
   340                  , "torquoise", "brown", "yellow", "purple", "black"/)
   341   end if
   342 
   343   if (rOpts .and. isatt(rOpts,"gsMarkerThicknessF")) then
   344       gsMarkerThicknessF = rOpts@gsMarkerThicknessF
   345   else
   346       gsMarkerThicknessF = 1.0
   347   end if
   348 
   349   if (rOpts .and. isatt(rOpts,"gsMarkerSizeF")) then
   350       gsMarkerSizeF      = rOpts@gsMarkerSizeF
   351   else
   352       gsMarkerSizeF      = 0.0085                  ; Default: 0.007
   353   end if
   354 
   355   gsRes = True
   356   gsRes@gsMarkerThicknessF = gsMarkerThicknessF      ; default=1.0
   357   gsRes@gsMarkerSizeF      = gsMarkerSizeF           ; Default: 0.007 
   358 
   359   ptRes = True                        ; text options for points
   360   ptRes@txJust             = "BottomCenter"; Default="CenterCenter".
   361   ptRes@txFontThicknessF   = 1.2      ; default=1.00
   362   ptRes@txFontHeightF      = 0.0125   ; default=0.05
   363   if (rOpts .and. isatt(rOpts,"txFontHeightF")) then
   364       ptRes@txFontHeightF  = rOpts@txFontHeightF  
   365   end if
   366 
   367   markerTxYOffset          = 0.0175   ; default
   368   if (rOpts .and. isatt(rOpts,"markerTxYOffset")) then
   369       markerTxYOffset = rOpts@markerTxYOffset             ; user defined offset
   370   end if
   371 
   372   dum10 = new((nCase*nVar),graphic)
   373   dum11 = dum10
   374 
   375   do n=0,nCase-1
   376      gsRes@gsMarkerIndex   = Markers(n)             ; marker style (+)
   377      gsRes@gsMarkerColor   = Colors(n)              ; marker color
   378      ptRes@txFontColor     = gsRes@gsMarkerColor
   379     do i=0,nVar-1
   380        dum10(n*nVar+i) = gsn_add_polymarker(wks,taylor,X(n,i),Y(n,i),gsRes) 
   381        dum11(n*nVar+i) = gsn_add_text(wks,taylor,(i+1),X(n,i),Y(n,i)+markerTxYOffset,ptRes)
   382     end do
   383   end do
   384 
   385 ; ---------------------------------------------------------------
   386 ; Part 5: ; add case legend and variable labels
   387 ; ---------------------------------------------------------------
   388 
   389   if (rOpts .and. isatt(rOpts,"caseLabels")) then 
   390 
   391       if (isatt(rOpts,"caseLabelsFontHeightF")) then
   392           caseLabelsFontHeightF = rOpts@caseLabelsFontHeightF
   393       else
   394           caseLabelsFontHeightF = 0.05  
   395       end if
   396 
   397       lgres                    = True
   398       lgres@lgMarkerColors     = Colors        ; colors of markers
   399       lgres@lgMarkerIndexes    = Markers       ; Markers 
   400       lgres@lgMarkerSizeF      = gsMarkerSizeF ; Marker size
   401       lgres@lgItemType         = "Markers"     ; draw markers only
   402       lgres@lgLabelFontHeightF = caseLabelsFontHeightF  ; font height of legend case labels
   403 
   404       if (isatt(rOpts,"legendWidth")) then
   405           lgres@vpWidthF       = rOpts@legendWidth
   406       else
   407           lgres@vpWidthF       = 0.15           ; width of legend (NDC)
   408       end if
   409 
   410       if (isatt(rOpts,"legendHeight")) then
   411           lgres@vpHeightF      = rOpts@legendHeight
   412       else   
   413           lgres@vpHeightF      = 0.030*nCase   ; height of legend (NDC)
   414       end if
   415 
   416       lgres@lgPerimOn          = False         ; turn off perimeter
   417       nModel                   = dimsizes( rOpts@caseLabels )
   418       lbid = gsn_create_legend(wks,nModel,rOpts@caseLabels,lgres)
   419 	 
   420       amres = True
   421       amres@amParallelPosF     =  0.35           
   422       amres@amOrthogonalPosF   = -0.35             
   423       annoid1 = gsn_add_annotation(taylor,lbid,amres)	; add legend to plot
   424   end if
   425 
   426   if (rOpts .and. isatt(rOpts,"varLabels")) then 
   427       nVar    = dimsizes(rOpts@varLabels)
   428 
   429       if (isatt(rOpts,"varLabelsFontHeightF")) then
   430           varLabelsFontHeightF = rOpts@varLabelsFontHeightF
   431       else
   432           varLabelsFontHeightF = 0.013
   433       end if
   434 
   435       txres = True
   436       txres@txFontHeightF = varLabelsFontHeightF
   437       txres@txJust = "CenterLeft"              ; justify to the center left
   438 
   439      ;delta_y = 0.02       
   440       delta_y = 0.06   
   441       if (rOpts .and. isatt(rOpts,"varLabelsYloc")) then
   442           ys  = rOpts@varLabelsYloc            ; user specified
   443       else
   444           ys  = max( (/nVar*delta_y , 0.30/) )
   445       end if
   446 
   447       
   448       do i = 1,nVar     
   449          if (i.eq.1) then
   450              dum12 = new(nVar,graphic)
   451 	 end if
   452 
   453          dum12(i-1) = gsn_add_text(wks,taylor,i+" - "+rOpts@varLabels(i-1), .125,ys,txres)
   454          ys = ys- delta_y
   455       end do
   456 
   457       taylor@$unique_string("dum")$ = dum12
   458   end if
   459 
   460   taylor@$unique_string("dum")$ = dum0   ; x-axis
   461   taylor@$unique_string("dum")$ = dum1   ; y-axis
   462   taylor@$unique_string("dum")$ = dum2   ; 1.0 std curve
   463   taylor@$unique_string("dum")$ = dum5   ; labels [COR]
   464   taylor@$unique_string("dum")$ = dum6   ; major tm [COR]
   465   taylor@$unique_string("dum")$ = dum7   ; minor tm
   466   taylor@$unique_string("dum")$ = dum10  ; markers
   467   taylor@$unique_string("dum")$ = dum11  ; text
   468   
   469   if (.not.isatt(rOpts,"taylorDraw") .or. \
   470      (isatt(rOpts,"taylorDraw") .and. rOpts@taylorDraw)) then 
   471 	draw(taylor)
   472   end if
   473   if (.not.isatt(rOpts,"taylorFrame") .or. \
   474      (isatt(rOpts,"taylorFrame") .and. rOpts@taylorFrame)) then 
   475 	frame(wks)
   476   end if
   477   return(taylor)
   478 end
   479