✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🏦 Standard & Poor's chooses Dash Enterprise for ESG analysis. Learn why, sign up for the June 23 Webinar here!

Custom contour levels for a contour plot

Hi all,

Is there a definitive way to plot custom contour levels yet? I’m attempting to plot some precipitation data and therefore need irregular intervals. If not, how would I go about this using traces?


Hi @Nivhawk,

Custom contour levels aren’t supported right now. See Choose levels for the coutours in the contour plot.

If you’re ok with line contours (as opposed to solid filled contours), It wouldn’t be too complicated to achieve this using scatter traces with mode='lines', where the line coordinates are computed by a series of calls to the scikit-image measure.find_contours function, one call per contour level that you want.

Hope that helps,