# How to plot map with (mesh+surface) but with clear display

**URL:** <https://forum.generic-mapping-tools.org/t/how-to-plot-map-with-mesh-surface-but-with-clear-display/3827>\
**Category:** Q&A\
**Created:** [April 7, 2023, 10:51am UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-map-with-mesh-surface-but-with-clear-display/3827 "2023-04-07T10:51:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meyal](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Meyal](https://forum.generic-mapping-tools.org/u/Meyal)\
**Post date:** [April 7, 2023, 10:51am UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-map-with-mesh-surface-but-with-clear-display/3827/1 "2023-04-07T10:51:38Z")

</div>

Hi,  
I am trying to plot an area map with (mesh+surface) features. I used the following way for plotting;

```auto
gmt begin
gmt figure Area_surface-mesh-map png
# plot surface map
gmt grdview example_relief.grd -R134/140/25/33/-6500/1000 -JM10c -JZ2c -p250/25 -Ctopo -I -N-6500+glightgray -Qs -Wf0.5 -BwEnSZ+b -Bzaf 
# plot surface+mesh plot
gmt grdview example_relief.grd -R134/140/25/33/-6500/1000 -JM10c -JZ2c -p250/25 -Ctopo -I -N-6500+glightgray -Qsm -Wf0.5 -BnwSEZ+b -Bzaf -Y-7
gmt end

```

Figure:

 ![Selection_019](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/e/eef9c54d3a31eced142f59672639fac0b957c4ee.jpeg)

In plotted Figure (top) map shows surface plot while in (bottom) map both surface+mesh are plotted. But mesh addition hide the surface features in plot and display is not visible.

Query is that whether it is possible to get clear display of plot (may be by reducing density of mesh), so surface features become more visible in Figure.

Below is a reference figure, in which mesh is added but surface features are more visible.

 ![Selection_018](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/0/0708401b379a0d802fab1ccc5fb2a7707b9e954b.jpeg)

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [April 7, 2023, 2:15pm UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-map-with-mesh-surface-but-with-clear-display/3827/2 "2023-04-07T14:15:53Z")

</div>

I’m afraid that’s not possible (harder than it might seem on first though since it’s not just a decimation operation). The solution will have to be to resample the grid onto a coarser one and use it to do the mesh plot layer.

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [April 7, 2023, 3:08pm UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-map-with-mesh-surface-but-with-clear-display/3827/3 "2023-04-07T15:08:22Z")

</div>

But you can try `-Wmfaint,gray@50` and see what it gives.

---

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [April 7, 2023, 8:52pm UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-map-with-mesh-surface-but-with-clear-display/3827/4 "2023-04-07T20:52:40Z")

</div>

Idea (not tested, don’t even know if it’s doable at all):

Use grdcontour to manipulate the grid (coarser approach in a sense), then mesh the result

---

<div class="post-metadata">

**Author:** ![Meyal](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Meyal](https://forum.generic-mapping-tools.org/u/Meyal)\
**Post date:** [April 8, 2023, 9:35am UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-map-with-mesh-surface-but-with-clear-display/3827/5 "2023-04-08T09:35:09Z")

</div>

Thanks for your help. I tried with

> [@Joaquim](#):
>
> `-Wmfaint,gray@50`

the output figure with (surface+mesh) get some clear display.

 ![Selection_021](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/d/d6ce83d463bb40dc4f3bba7dad193411750eb46b.jpeg)

> [@Joaquim](#):
>
> The solution will have to be to resample the grid onto a coarser one and use it to do the mesh plot laye

I think it means to sample area grid from main grid data using grdcut at coarser rate. Previously I used grdcut in the way (gmt grdcut @earth\_relief\_01m -R134/140/25/33 -Gexample\_relief.grd). Can you explain how to to grid area at coarser rate, which parameter can do this task?

---

<div class="post-metadata">

**Author:** ![Meyal](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Meyal](https://forum.generic-mapping-tools.org/u/Meyal)\
**Post date:** [April 8, 2023, 9:52am UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-map-with-mesh-surface-but-with-clear-display/3827/6 "2023-04-08T09:52:43Z")

</div>

> [@PlanetGus](#):
>
> Use grdcontour to manipulate the grid (coarser approach in a sense), then mesh the result

Thanks for idea, I tried in following way;

```auto
gmt begin
gmt figure Area_surface-mesh-map png
gmt grdcut @earth_relief_01m -R134/140/25/33 -Gexample_relief.grd
# use grdview  
gmt grdview example_relief.grd -R134/140/25/33/-6500/1000 -JM10c -JZ2c -p250/25 -Ctopo -I -N-6500+glightgray -Qs -BwEnSZ+b -Bzaf
# use grdcontour
gmt grdcontour example_relief.grd -JM10c -R134/140/25/33 -JZ2c -p250/25 -C400 -W2p 
gmt end

```

Figure:

 ![Selection_022](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/2/2aa4bb389b6f2fa7271172ef5fc03af96b43dd4b.jpeg)

Using this way, contours are not appear in their correct positon on map. Do you have idea how to place contour to their correct position and then try your approach?

---

<div class="post-metadata">

**Author:** ![KristofKoch](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/kristofkoch/32/314_2.png) [@KristofKoch](https://forum.generic-mapping-tools.org/u/KristofKoch)\
**Post date:** [April 8, 2023, 12:12pm UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-map-with-mesh-surface-but-with-clear-display/3827/7 "2023-04-08T12:12:40Z")

</div>

Just out of curiosity – why do you want the mesh displayed?
