[ncl-talk] sub: Significant test & stipple

Rick Brownrigg brownrig at ucar.edu
Tue Oct 1 16:47:56 MDT 2019


I don't know offhand, but I would point out that gsnShadeDotSizeF uses
"NDC" units (normalized device coordinates), in which the values range from
0. to 1., with one being the full extent of the plot.  A value of 3 would
be nonsensical, so perhaps its getting reset to the default of 0.0 (which
contrary to what one might assume, is defined to mean the "smallest
possible" dot size).  Maybe try 0.05, and if that doesn't do it, you might
add some print statements to make sure data is what you think it is.

    http://ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml

Hope that helps...
Rick


On Tue, Oct 1, 2019 at 4:28 PM dale zuri via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Dear NCL user,
>
> I don't see any error messages, but there are no stipples on the map.
> Could someone help correct the logic?
>
>  *plot2   = gsn_contour_shade(plot2,0.05,30, opt) *
>
> I would appreciate any help and suggestion. Printed below the part of the
> ncl code. 
>
> Thank you
> Dale
>
>
> *NCL program: *
> ;;;;corr;;;
> dfcor=escorc_n(zAvg,zAvgTime1,(/0/),(/0/))
> printVarSummary(dfcor)
> printMinMax(dfcor,0)
> dfcor!0 = "lat_0"
> dfcor!1 = "lon_0"
> dfcor&lat_0= zAvg&lat_0
> dfcor&lon_0= zAvg&lon_0
> x1d=ndtooned(diffAvg)
> ;x1d=ndtooned(dfcor)
> n    = dimsizes(x1d)                ; n=11
> df   = n-2
> siglvl=0.05
>  pr     = rtest(x1d, n, 0)
> printVarSummary(pr)
>  x4d     = onedtond(pr,(/26,76/))
> printVarSummary(x4d)
> ;x4d = where(x4d.lt.siglvl, 1, x4d)
> ;printMinMax(x4d,0)
> ;print(x4d)
> ; if (pr.lt.siglvl) then
> ;      print("significant at the "+siglvl+" significance level")
> ; else
> ;      print("NOT significant at the "+siglvl+" significance level")
> ; end if
> ;dfcorr!0 = "lat_0"
> ;dfcorr!1 = "lon_0"
> ;dfcorr&lat_0= g&lat_0
> ;dfcorr&lon_0= g&lon_0
> x4d!0 = "lat_0"
> x4d!1 = "lon_0"
> x4d&lat_0= zAvg&lat_0
> x4d&lon_0= zAvg&lon_0
> ;printVarSummary(x4d)
> ;printVarSummary(dfcorr)
>
>
> ;=====================================================================
> ;Second plot resources and overlay onto first
> ;=====================================================================
>   res2 = True                            ; res2 probability plots
>   res2 at gsnDraw             = False       ; Do not draw plot
>   res2 at gsnFrame            = False       ; Do not advance frome
>
> ;  res2 at cnLevelSelectionMode = "ExplicitLevels"       ; set explicit cnlev
> ;  res2 at cnLevels   = (/99./)              ; only have 1 contour level
>   res2 at cnInfoLabelOn       = False
>   res2 at cnLinesOn           = False       ; do not draw contour lines
>   res2 at cnLineLabelsOn      = False       ; do not draw contour labels
>   res2 at cnConstFEnableFill =True
> res2 at cnConstFLabelOn  = False
>   res2 at cnFillScaleF        = 0.6         ; add extra density
>
>   res2 at gsnRightString      = ""          ; Turn off subtitles
>   res2 at gsnLeftString       = ""
>
> ;========================================================================
> opt = True                                         ; set up parameters for
> pattern fill
>   opt at gsnShadeFillType = "pattern"                   ; specify pattern
> fill
>   opt at gsnShadeLow      = 17                         ; stipple pattern
>   opt at gsnShadeDotSizeF = 3                           ; make dots larger
>  plot2  = gsn_csm_contour(wks,x4d,res2)
>
>   plot2   = gsn_contour_shade(plot2,0.05,30, opt)        ; stipple all
> areas >= 95%  contour
>
>   overlay (plot, plot2)
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191001/4ab61c96/attachment.html>


More information about the ncl-talk mailing list