Description
import plotly.graph_objects as go
import plotly.io as pio
import numpy as np
pio.renderers.default = 'browser'
fig = go.Figure()
lk_x=[0,0,1,1,0]
lk_y=[0,1,1,0,0]
data_line = go.Scatter(x=lk_x, y=lk_y, mode='lines', fill='toself', fillcolor='rgba(60, 53, 48, 0.5)', line_color='black', showlegend=False)
fig.add_trace(go.Scatter(
x=[0, 1, 2],
y=[1, 3, 2],
mode='lines+markers',
name='Test',
# zorder=2,
))
fig.add_trace(data_line)
fig.update_layout(
xaxis=dict(
showline=True,
mirror=True,
linecolor='black',
linewidth=2,
ticks='outside',
showgrid=False,
),
yaxis=dict(
showline=True,
mirror=True,
linecolor='black',
linewidth=2,
ticks='outside',
showgrid=False,
scaleanchor='x',
scaleratio=1,
),
plot_bgcolor='white',
paper_bgcolor='white',
height=500,
width=500,
margin=dict(l=40, r=40, t=40, b=40),
xaxis_title='X ',
yaxis_title='Y ',
font=dict(size=12, color="black")
)
fig.show()
when add zorder=2,the border is disappear as figure show: