修改深色模式下结果图片显示异常
This commit is contained in:
@@ -178,7 +178,7 @@ def _style_axes(ax, *, title, xlabel, ylabel, xlim, ylim, dark_mode):
|
||||
ax.set_ylabel(ylabel, fontsize=10, color=text)
|
||||
ax.set_xlim(*xlim)
|
||||
ax.set_ylim(*ylim)
|
||||
ax.set_aspect("equal", adjustable="datalim")
|
||||
ax.set_aspect("equal", adjustable="box")
|
||||
ax.grid(True, linestyle=":", linewidth=0.7, color=grid, alpha=0.32)
|
||||
ax.tick_params(axis="both", labelsize=9, colors=text)
|
||||
for spine in ax.spines.values():
|
||||
@@ -193,8 +193,10 @@ def _blit_background(ax, background, bbox):
|
||||
ax.imshow(
|
||||
background,
|
||||
extent=(xmin, xmax, ymin, ymax),
|
||||
origin="upper", # canvas.buffer_rgba 行 0 为顶部
|
||||
interpolation="bicubic",
|
||||
# gamut_background._render_chromaticity 已做过 np.flipud,
|
||||
# 这里必须使用 lower 才能与真实色度坐标方向一致。
|
||||
origin="lower",
|
||||
interpolation="bilinear",
|
||||
zorder=0,
|
||||
aspect="auto", # 由 _style_axes 的 set_aspect("equal") 控制
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user