🚀 Gen 5 of the leading AI app deployment platform launches October 6. Click for the livestream.

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,