[Thread Prev][Thread Next][Index]

Re: [ferret_users] PLOT AREA



Hi,
If you have a list of coordinates for the boundary of the country, you can use the PT_IN_POLY function to define a mask which is 1 inside the boundary :
yes? show function pt_in_poly
PT_IN_POLY(A,XVERT,YVERT)
    Return -1 outside, 0 if on edge, 1 if inside polygon
    A: Variable on the XY grid and region to be tested
    XVERT: X-coordinates of vertices of polygon
    YVERT: Y-coordinates of vertices of polygon
There's a script example in the documentation, in this section:
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/appendix-a-external-functions/pt_in_poly

That example defines a polygon out in the ocean; your xp,yp coordinates would be the national borders.

Ansley

On 5/2/2016 9:41 PM, afikode adeolu wrote:
Please, how can i fill/plot for only the map of a country, i dont want the plot to pass the boundary of the map of a country. So, making the outside of the map white


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement