How can I cut the plot

How can I cut the plot so that the grid only covers the continental part of Argentina?fes2004_stw105_obs_m2arg3.ps.zip (519.8 KB)

You should use a mask.
Maybe this link would help you.

Do you mean get rid of the Malvinas? If so, one way would be to use the -A option in the coast command, and set the minimum area to be larger than the area of these islands. But this will also remove little islands just off the coast of the continent. If you want to remove islands away from the coast of the continent, but keep those near the coast, then things get a bit grubbier. One pragmatic way might be to draw a box over the islands which is the same colour as the sea.

Thank you very much for your answer Esteban … I think this is what I’m looking for … now I’m going to try to create the mask! again thank you very much!

Thank you very much for your answer Tim!!.. no…in reality what I want to do is that the grid only covers the continental region only of Argentina and not of the other countries.

Quick question about the mask module :
What’s the difference with the clipping option from coast module ?

gmt coast -Dl -G
gmt grdimage @earth_relief_03m -I+d
gmt coast -Q

(without manual consulting)

The mask module creates mask grids (and outputs polygons) that can be used in grdmath. grdlandmask can do it as well but only from coastlines. On the other hand, the clipping paths that several modules can set are used at the mapping producing stage. They set clip paths on and off that affect what is visible in the figure.

So if one only need to plot a specific region, using the clipping path might be easier.
However if one needs to do calculation, using masks is more efficient.

Thanks :slight_smile:

1 Like

Yes, for just plotting clip paths are better. Masks are for grid operations.

2 Likes