答案 0 :(得分:0)
答案 1 :(得分:0)
trace_1 = go.Scatter(x=x_arr, y=y1_arr, name='plot1', line=dict(color = ('royalblue')), mode='lines+markers')
trace_2 = go.Scatter(x=x_arr, y=y2_arr, name='plot2', line=dict(color = ('orange')), mode='lines+markers')
layout_1 = go.Layout(
height=420,
width=800,
title=go.layout.Title(
text='title',
),
xaxis=go.layout.XAxis(
title='x axis',
),
yaxis=go.layout.YAxis(
title='y axis',
)
)
data = []
trace_3_arr = np.array([])
for i in range(0, len(x_arr)):
trace_i = go.Scatter(x=[x_arr[i], x_arr[i]], y=[y1_arr[i], y2_arr[i]], line=dict(color = ('black'), width=1), showlegend=False)
trace_3_arr = np.append(trace_3_arr, trace_i)
data.append(trace_i)
data.append(trace_1)
data.append(trace_2)
fig = go.Figure(data=data, layout=layout_1)
plot(fig)