# Plotting Contour Data On World Map

**URL:** <https://community.plotly.com/t/plotting-contour-data-on-world-map/85428>\
**Category:** Dash Python\
**Tags:** question\
**Created:** [June 27, 2024, 5:53pm UTC](https://community.plotly.com/t/plotting-contour-data-on-world-map/85428 "2024-06-27T17:53:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jortuck](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jortuck](https://community.plotly.com/u/jortuck)\
**Post date:** [June 27, 2024, 5:53pm UTC](https://community.plotly.com/t/plotting-contour-data-on-world-map/85428/1 "2024-06-27T17:53:35Z")

</div>

Hi there,

I was curious if anyone has had a successful experience plotting contoured data on a world map using Plotly. The best examples I could find were scatter maps of points which isn’t exactly what I’m looking for because I would like the colors to be continuous, instead of specific values at specific lat/lon points. Below is an example of what I’m looking for, my goal is to have something that is interactive.

 ![2024-06-27-10.47.45](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/a/f/af1ceb41fd8a1f399f1ab72dbadd0327779b5a9a.jpeg)

I am working with surface pressure and surface temperature data so it makes a little more sense for the colors to be continuous. Let me know if you need any clarification.

Thanks!

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [June 30, 2024, 6:10pm UTC](https://community.plotly.com/t/plotting-contour-data-on-world-map/85428/2 "2024-06-30T18:10:54Z")

</div>

Hi @jortuck welcome to the forums. Are you referring to something like this?

> **[Mapbox](https://plotly.com/python/mapbox-density-heatmaps/)**
>
> Detailed examples of Mapbox Density Heatmap including changing color, size, log axes, and more in Python.

---

<div class="post-metadata">

**Author:** ![jortuck](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jortuck](https://community.plotly.com/u/jortuck)\
**Post date:** [July 1, 2024, 5:48pm UTC](https://community.plotly.com/t/plotting-contour-data-on-world-map/85428/3 "2024-07-01T17:48:58Z")

</div>

Hi there,

Thanks for your reply. That is close to what I’m looking for but not exactly what I need. From what I can tell, that heat map is still based on individual points (ex. when you zoom in you can still see each point). The data I am working with is continuous across the globe, so I am looking for a way to give the map a set of points (I have data for each lat/lon whole number), then from those points, generate a continuous surface which is a gradient that represents the data in between points.

Map Box has a great description for what I am looking for, but unfortunately no examples.

> Among maps you’ll find on the web, there are two common categories of heatmaps: those that encourage the user to explore dense point data, and those that **interpolate discrete values over a continuous surface** , creating a smooth gradient between those points. The latter is less common and most often used in scientific publications or when a phenomenon is distributed over an area in a predictable way. For example, your town may only have a few weather stations, but your favorite weather app displays a smooth gradient of temperatures across the entire area of your town. For your local weather service, it is reasonable to assume that, if two adjacent stations report different temperatures, the temperature between them will transition gradually from one to the next.

Here is a map that uses the effect I am looking for: [https://zoom.earth/maps/temperature/](https://zoom.earth/maps/temperature/)  
As you can see, when you zoom in on that map, you aren’t able to identify individual points.

Thanks again for your reply!

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [July 1, 2024, 9:04pm UTC](https://community.plotly.com/t/plotting-contour-data-on-world-map/85428/4 "2024-07-01T21:04:03Z")

</div>

Hey @jortuck, does this help?

> [@Plotly equivalent to Matplotlib pcolormesh for plotting raster image on map](https://community.plotly.com/t/plotly-equivalent-to-matplotlib-pcolormesh-for-plotting-raster-image-on-map/68685):
>
> Hello, I am new to Plotly, and I am struggling to achieve something very simple in Matplotlib. I want to plot a geolocalised raster image on a map. I have 3 matrixes of the same shape: latitude, longitude and and radiance for each pixel. In Matplotlib this is simply done like this: map = Basemap(ax=ax, projection='lcc', resolution='l', lat\_0=lat\_0, lon\_0=lon\_0, llcrnrlon=lon\_min, urcrnrlon=lon\_max, llcrnrlat=lat\_min, urcrnrlat=lat\_max) x, y = map(lon, lat) map.pcolormesh(x, y, rad) W…

---

<div class="post-metadata">

**Author:** ![jortuck](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jortuck](https://community.plotly.com/u/jortuck)\
**Post date:** [July 2, 2024, 5:43pm UTC](https://community.plotly.com/t/plotting-contour-data-on-world-map/85428/5 "2024-07-02T17:43:59Z")

</div>

Not quite. Forgive me if I’m wrong, but it seems that solution involves layering images on top of maps. I feel that could add restrictions when it comes to making it interactive (ex hover effects) and changing data on the fly. I appreciate you suggesting it though!

---

<div class="post-metadata">

**Author:** ![Emil](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emil/32/31734_2.png) [@Emil](https://community.plotly.com/u/Emil)\
**Post date:** [July 2, 2024, 7:40pm UTC](https://community.plotly.com/t/plotting-contour-data-on-world-map/85428/6 "2024-07-02T19:40:29Z")

</div>

I did something similar some time ago, visualizing large meteorological datasets,

> **[GitHub - emilhe/terracotta-dash-example](https://github.com/emilhe/terracotta-dash-example)**
>
> Contribute to emilhe/terracotta-dash-example development by creating an account on GitHub.

Maybe that could be an inspiration 😊
