0

I have a seaborn heatmap plot like this:

enter image description here

With source code:

temp_cmap = ["#0416FF", "#0094FF", "#00DAFF", "#006600", "#00A305", "#71E507", "#DBF400", "#FFD602",
                 "#FF9B0F", "#FF1E01"]
sns.heatmap(df_grid, annot=False, cmap=temp_cmap, ax=self.axes_surface, cbar_ax=self.cbar_ax_1,
                        vmin=min_data,
                        vmax=max_data
                        )

But I want smooth this plot like this:

enter image description here

How can I do that?

Barbora
  • 921
  • 1
  • 6
  • 11
  • 1
    matplotlib's [`contourf`](https://matplotlib.org/3.1.1/gallery/images_contours_and_fields/pcolormesh_levels.html#sphx-glr-gallery-images-contours-and-fields-pcolormesh-levels-py) seems to be interesting in your case. – JohanC Feb 23 '20 at 22:54
  • Thanks JohanC. I would be insterested in your sugguest. – Don NgocHanh Feb 26 '20 at 16:07
  • So, what's stopping you? Without data in text format and without some minimal demo code, it is hard to advance. – JohanC Feb 26 '20 at 16:24

1 Answers1

0

It looks like you are misusing the seaborn heatmap:)

The seaborn heatmap is just a colored table. Your desired result looks like you are trying plot things on a map. There are better ways of doing that. Try something like geopandas, geoplot or folium (see a folium heatmap example here).

Sinan Kurmus
  • 585
  • 3
  • 11
  • Yes, I have a shape file for this plot, but there is only one polygon. They created a grid 25 columns and 100 rows over that shapefile. So data that i have got from them that attached to each cell( row and column). There fore, I used seaborn heatmap for this plot. I would like to smooth that plot. – Don NgocHanh Feb 26 '20 at 16:05