# How to define contour levels is irregular intervals for a contour plot type "level"

**URL:** <https://community.plotly.com/t/how-to-define-contour-levels-is-irregular-intervals-for-a-contour-plot-type-level/89530>\
**Category:** 📊 Plotly Python\
**Tags:** question\
**Created:** [December 23, 2024, 6:22am UTC](https://community.plotly.com/t/how-to-define-contour-levels-is-irregular-intervals-for-a-contour-plot-type-level/89530 "2024-12-23T06:22:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dungbt](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@dungbt](https://community.plotly.com/u/dungbt)\
**Post date:** [December 23, 2024, 6:22am UTC](https://community.plotly.com/t/how-to-define-contour-levels-is-irregular-intervals-for-a-contour-plot-type-level/89530/1 "2024-12-23T06:22:01Z")

</div>

Hi everyone, i have same problem like this thread [https://community.plotly.com/t/custom-contour-levels-for-a-contour-plot](https://community.plotly.com/t/custom-contour-levels-for-a-contour-plot)  
The problem is : 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?  
Go to detail, i have the : percentile\_array = [0, 25, 40, 55, 75, 90, 97, 100], then i find value that be long to these percentile like this : levels = np.percentile(np.array(z), percentile\_array ) ;  
How to i define level for a contour plot type “level” by levels that is irregular intervals ?

Thank you for helping!
