[ncl-talk] specify corner for gsn_contour plot, trYMinF is disabled

Mary Haley haley at ucar.edu
Sat May 30 15:29:28 MDT 2015


The issue is that NCL can't make any assumption on what the X or Y axis
should look like outside the actual X/Y range of your data.  If you give it
extra values on either axis, and your data is irregularly spaced in either
axis, then NCL can't "guess" at what the new values should be spaced as.

One way around this is to increase your data array's dimensions by the
desired new values, using the "new" function to increase the two coordinate
arrays and the data array as desired.  See example axes_6.ncl at:

http://www.ncl.ucar.edu/Applications/axes.shtml

The "atmos.nc" data file for axes_6.ncl can be found at:

http://www.ncl.ucar.edu/Applications/Data/#cdf

--Mary




On Fri, May 29, 2015 at 2:47 PM, xiaoming Hu <yuanfangcan at hotmail.com>
wrote:

> I wanted to control the corner of gsn_contour plot
> using
>    res1 at trYMinF           =  -2
>    res1 at trYMaxF           =  6
>    res1 at trXMaxF           =   1
>    res1 at trXMinF           =   -4
> But it did not work, see attached figure.
>
> Seems the resources is disabled.
>
> Any suggestions?
> See my plotting code:
>
>   res1 at sfXArray                    = CoolingRate(index_effective)
>   res1 at sfYArray                    = UHII_9PM(index_effective)
>   res1 at cnFillOn                    = True
>   res1 at cnLinesOn                   = False
>   res1 at cnLineLabelsOn              = False
>   res1 at tfDoNDCOverlay       = False
>   gsn_define_colormap(wks,"cosam") ; select
>   res1 at gsnSpreadColors             = True
>    res1 at trYMinF           =  -2
>    res1 at trYMaxF           =  6
>    res1 at trXMaxF           =   1
>    res1 at trXMinF           =   -4
>   res1 at cnInfoLabelOn         = False
>   res1 at pmLabelBarDisplayMode = "Always"
>   Month_value = Month(::24)
>   map = gsn_contour(wks, Month_value(index_effective), res1)
>   draw(map)
>
> Thanks a lot
>
> Xiaoming
>
> _______________________________________________
> 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/20150530/c381aa2a/attachment.html 


More information about the ncl-talk mailing list