Limit the shape of the contour map and make it non-rectangular


I have a contour map created of which I added a line plot on top which shows the shape of a reservoir as shown below.

How can I limit the contour map to the solid black line?

Hi there,

Iā€™m not sure, if this can be done directly in plotly. But you could do this by masking the array (an image is basically a 2D array) with another array (your line). You could do this directly in numpy or with cv2.

Just to get you some ideas:

1 Like

I will check it out thanks @AIMPED