I am new here. I have stunned during 2 weeks trying a get a continous line, with plotly, filled by interval depending on the y axis.
I am a geologist, and we have drilled a well from the earth surface (depth=0) to underground (depth = 2500 meters). From top to the bottom of the well, we have succession of different nature of rock (FACIES): each facies labelled by a number (LITHO_NUM) and a color (LITHO_COLOR).
What I want to do is to plot this succession filling each depth interval by its corresponding color … y=the depths (from 0 to bottom) and x=LITHO_NUM.
I used 'fill=‘tozerox’ in a ‘for loop’ to set one ‘fillcolor’ per iteration (because fillcolor accept an individual color). The issue is, for each facies, plotly fill all the depth range, from the first time the facies does occurs and the last position depth. I mean, plotly fill the intervals where the facies occurs and also the gaps where it does not occurs (where other facies occur).
import numpy as np
from plotly.subplots import make_subplots
import plotly.graph_objects as go
for sf in cm.FACIES.unique():