[ncl-talk] Remove contours around objects

Alan Brammer abrammer at albany.edu
Thu Feb 18 09:39:22 MST 2016


Ah you’re right.  My bad, Thought I’d done exactly this and succeeded, but evidently not.  

I tried a couple of things with some dummy data but couldn’t find a solution.  
My last suggestion would be regrid the data using a nearest neighbour method to a higher resolution then plot that as raster.  Make the blocks small enough that it’s aesthetically pleasing.  

popmask_3.ncl  on the categorical examples page does this the brute force way. https://www.ncl.ucar.edu/Applications/classification.shtml <https://www.ncl.ucar.edu/Applications/classification.shtml>
Or the ESMF regridding pages have nearest neighbour methods. 

Maybe someone else has a more elegant suggestion.  






> On 18 Feb 2016, at 11:15, <paraskevi.giannakaki at giub.unibe.ch> <paraskevi.giannakaki at giub.unibe.ch> wrote:
> 
> Hi Alan,
> 
> Thank you for your quick response. I have already tried this but it adds the contours with the cnRasterSmoothingOn = True command.
> 
> Evi 
> 
> Paraskevi Giannakaki , PhD 
> Climate impact group,
> Institute of Geography, University of Bern
> Hallerstrasse 12, 5th floor
> CH-3012 Bern
> Mail: paraskevi.giannakaki at giub.unibe.ch <mailto:paraskevi.giannakaki at giub.unibe.ch>
> Von: Alan Brammer [abrammer at albany.edu]
> Gesendet: Donnerstag, 18. Februar 2016 17:12
> An: Giannakaki, Paraskevi (GIUB)
> Cc: ncl-talk at ucar.edu
> Betreff: Re: [ncl-talk] Remove contours around objects
> 
> try 
> cnRasterSmoothingOn = True
> with 
> cnFillMode = “RasterFill”
> 
> It will make it less “blocky” without adding the gradients that areafill adds.  
> 
> 
> https://www.ncl.ucar.edu/Applications/raster.shtml <x-msg://48/redir.aspx?REF=x0FsX-OycJBMyxWNEoPA-ibtqwBYkD9NnkPXOYoHiUgb1FCVfjjTCAFodHRwczovL3d3dy5uY2wudWNhci5lZHUvQXBwbGljYXRpb25zL3Jhc3Rlci5zaHRtbA..>
> https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnRasterSmoothingOn <x-msg://48/redir.aspx?REF=Zd7alXS4tWQ7f-J6q4zBve7SDGeG8xb1Qy8jifD7G_Mb1FCVfjjTCAFodHRwczovL3d3dy5uY2wudWNhci5lZHUvRG9jdW1lbnQvR3JhcGhpY3MvUmVzb3VyY2VzL2NuLnNodG1sI2NuUmFzdGVyU21vb3RoaW5nT24.>
> 
> 
> 
> Alan
> 
>  
>> On 18 Feb 2016, at 11:07, paraskevi.giannakaki at giub.unibe.ch <x-msg://48/redir.aspx?REF=K8a4JF_Jcv6MoIZTkVr8JcqOypSU7MSXhTiKHNYJ0uKFNVOVfjjTCAFtYWlsdG86cGFyYXNrZXZpLmdpYW5uYWtha2lAZ2l1Yi51bmliZS5jaA..> wrote:
>> 
>> 
>> Dear all,
>> 
>> I try to plot some objects that have integer values between 1 and 40. My problem is that instead of one-color objects I have a contour around my objects with the previous color from the color-table (see the attached figure). I have tried different tricks such as insert white color between the values of the objects but still I have the same result. Only with cnFillMode <x-msg://48/UrlBlockedError.aspx> = "RasterFill" I do not see this contour but then the plots are not so nice. How can I get rid of these contours? Thank you very much in advance for your time. 
>> 
>> NCL version 6.0.0
>> (Ubuntu 4.8.2-19ubuntu1) 4.8.2
>> 
>> Best regards,
>> Evi
>> 
>> Paraskevi Giannakaki , PhD 
>> Climate impact group,
>> Institute of Geography, University of Bern
>> Hallerstrasse 12, 5th floor
>> CH-3012 Bern
>> Mail: paraskevi.giannakaki at giub.unibe.ch <x-msg://48/redir.aspx?REF=K8a4JF_Jcv6MoIZTkVr8JcqOypSU7MSXhTiKHNYJ0uKFNVOVfjjTCAFtYWlsdG86cGFyYXNrZXZpLmdpYW5uYWtha2lAZ2l1Yi51bmliZS5jaA..><test_plot.ncl><colortest.png>_______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu <x-msg://48/redir.aspx?REF=xqhKvSimClETWsLIZr9Dv5xTU03A0Ys-CAH86F8Tb4iFNVOVfjjTCAFtYWlsdG86bmNsLXRhbGtAdWNhci5lZHU.>
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <x-msg://48/redir.aspx?REF=kbMUsphwQSpKYFYLUGBQv3_19R6fueOB1HNoqUYUyUiFNVOVfjjTCAFodHRwOi8vbWFpbG1hbi51Y2FyLmVkdS9tYWlsbWFuL2xpc3RpbmZvL25jbC10YWxr>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160218/54a52e5e/attachment.html 


More information about the ncl-talk mailing list