# How plot gridded data with interpolation

**URL:** <https://forum.generic-mapping-tools.org/t/how-plot-gridded-data-with-interpolation/1713>\
**Category:** Q&A\
**Tags:** gmt\
**Created:** [May 23, 2021, 11:29am UTC](https://forum.generic-mapping-tools.org/t/how-plot-gridded-data-with-interpolation/1713 "2021-05-23T11:29:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sphinx](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@Sphinx](https://forum.generic-mapping-tools.org/u/Sphinx)\
**Post date:** [May 23, 2021, 11:29am UTC](https://forum.generic-mapping-tools.org/t/how-plot-gridded-data-with-interpolation/1713/1 "2021-05-23T11:29:23Z")

</div>

Hi GMT users,

I have a grided data stored in a text file as [longitude, latitude, data]. I would like to plot it with interpolation.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Ricky\_Gervais](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/ricky_gervais/32/1287_2.png) [@Ricky\_Gervais](https://forum.generic-mapping-tools.org/u/Ricky_Gervais)\
**Post date:** [May 23, 2021, 3:29pm UTC](https://forum.generic-mapping-tools.org/t/how-plot-gridded-data-with-interpolation/1713/2 "2021-05-23T15:29:47Z")

</div>

As far as I know:

1. If you just want to project and plot that data onto a regular interval grid, you can just convert _xyz2grd_ and use **grdimage** it will do the interpolation for you using _-n option_ at the required nodes and plot it.
2. If you are interested in the data interpolation and you want to know what data is at some specific point or node, you can use **greenspline** module, the **nearneighbour** module or the **surface** module or the **triangulation** module . **Greenspline** does it for you using various interpolation techniques which can be controlled by given options in the module and **nearneighbour** uses nearest neighbour technique. All these modules help in data interpolation or gridding of data through interpolation using different techniques or depending on input which can be either _table_ or a _gridfile_.  
_Hope it helps._
