You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Overlaying Contours on Color-Filled Shading in UXarray/Holoviews/Matplotlib #1243
Originally posted by falkojudt March 27, 2025
Is there a way to overlay contours on a color-filled shading, similar to this example where the background represents wind speed and the black contours indicate sea level pressure?
It can be a starting point only, and we can improve throughout
Clean up and publish your notebook under our examples, and have two sections in it in regards to how to do contours with uxarray, uxarray's plot API and matplot
@erogluorhan When you say 2 different sections, are you saying one that is a demo of rasters that is primarily uxarray, and another full demo that is primarily matplotlib, or something else? If so, are there certain aspects you certainly want to be in either example? like specific functions within uxarray, workflows, types of filtering, etc? We mentioned this could be a good demo for a few different cases/audiences, so I'm happy to make include other types of highlights here as well, if it's wanted, or we can keep it more focused on the visualization creation and modification.
Activity
dylannelson commentedon Sep 23, 2026
Certainly seems possible using only UXarray and it's dependencies (matplotlib/cartopy/numpy/xarray)
Here's a few demos:
One made with matplotlib and smooth contour
One made with
holoviewsAnother with matplotlib and rougher contours
Contour Methods
When looking at the contours, there's a few routes availible
ax.tricontouron face centresremap.to_rectilinearthenax.contourto_rasterthenax.contourNotebook
To reproduce any of this, here's a trimmed down of the code in a notebook here:
04-contour-overlay-minimal.html
erogluorhan commentedon Sep 25, 2026
@dylannelson , thanks for looking into this!
I think we should do a number of things here:
plot.contour()function as suggested here in Support for contour plots #366Does this all make sense to you?
dylannelson commentedon Sep 25, 2026
@erogluorhan When you say 2 different sections, are you saying one that is a demo of rasters that is primarily uxarray, and another full demo that is primarily matplotlib, or something else? If so, are there certain aspects you certainly want to be in either example? like specific functions within uxarray, workflows, types of filtering, etc? We mentioned this could be a good demo for a few different cases/audiences, so I'm happy to make include other types of highlights here as well, if it's wanted, or we can keep it more focused on the visualization creation and modification.