Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

The border disappears after adding zorder.

未關閉
#5,248 3 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
52/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
python

研究方向

首先,在瀏覽器渲染器中執行所提供的 Python 重現程式,分別註解和取消註解第二個 trace 的 zorder。比較兩幅圖中的座標軸邊框;當設定 zorder 後邊框仍然可見,且不改變所示範的繪圖行為時,即視為完成。

由索引模型根據 Issue 內容生成。

描述

bug P2

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()

Image

when add zorder=2,the border is disappear as figure show:

Image

主要語言
Python
星號
18.8k
分支
2.8k
平均合併
13 小時 28 分鐘
30 天內合併 PR
20

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

plotly/plotly.py 的其他 Issue

查看 plotly/plotly.py 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。