python.plotly에서 생성한 chart를 보여줄 때 불필요한 trace가 불필요한 경우 보이지 않게 disable시키거나 숨기고 싶은 경우, Scatter trace의 visible key를 이용합니다. 또는 trace의 중요도에 따라서 opacity(불투명도) key를 적용하여 visibility를 조절이 가능합니다.
아래에 예시를 통해서 설명드리겠습니다.
*Scatter traces의 Dict-key: visible, opacity 정보 참조
visible
Code: fig.update_traces(visible=<VALUE>, selector=dict(type='scatter'))
Type: enumerated , one of ( True | False | "legendonly" )
Default: True
Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
opacity
Code: fig.update_traces(opacity=<VALUE>, selector=dict(type='scatter'))
Type: number between or equal to 0 and 1
Default: 1
Sets the opacity of the trace.
visible
code: go.scatter의 visible에 값을 적용
import plotly
import plotly.graph_objects as go
x1 = [ 1, 2, 3, 4, 5 ]
y1 = [ 1, 5, 4, 8, 11 ]
x2 = [ 1, 2, 3, 4, 5 ]
y2 = [ 10, 9, 6, 3, 0 ]
x3 = [ 1, 2, 3, 4, 5 ]
y3 = [ 5, 5, 5, 5, 5 ]
fig = go.Figure()
trace1 = go.Scatter( x=x1, y=y1, mode='lines', visible=False )
trace2 = go.Scatter( x=x2, y=y2, mode='lines+markers', visible="legendonly" )
trace3 = go.Scatter( x=x3, y=y3, mode='lines+markers' )
fig.add_trace( trace1 )
fig.add_trace( trace2 )
fig.add_trace( trace3 )
fig.show()
Output
*첫번째 trace에 visible=False를 적용하여 trace가 보이지 않습니다.
*두번째 trace에는 'legendonly'를 적용하여 범례에는 보이지만 chart에는 hide상태 입니다.

opacity
code: go.scatter의 opacity에 0~1 사이 값을 적용
import plotly
import plotly.graph_objects as go
x1 = [ 1, 2, 3, 4, 5 ]
y1 = [ 1, 5, 4, 8, 11 ]
x2 = [ 1, 2, 3, 4, 5 ]
y2 = [ 10, 9, 6, 3, 0 ]
x3 = [ 1, 2, 3, 4, 5 ]
y3 = [ 5, 5, 5, 5, 5 ]
fig = go.Figure()
trace1 = go.Scatter( x=x1, y=y1, mode='lines+markers', opacity=0.1, line_color='black' )
trace2 = go.Scatter( x=x2, y=y2, mode='lines+markers', opacity=0.5, line_color='black' )
trace3 = go.Scatter( x=x3, y=y3, mode='lines+markers', opacity=0.9, line_color='black' )
fig.add_trace( trace1 )
fig.add_trace( trace2 )
fig.add_trace( trace3 )
fig.update_layout(width=730)
fig.show()
Output
*trace들의 opacity값으로 색의 농도를 비교합니다.(trace0=0.1, trace1=0.5, trace2=0.9)

추가적인 정보는 "Python Figure Reference: scatter Traces" 페이지를 참고 부탁드립니다.