Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何去除网格线末端的黑色水平/垂直点?
这是我的代码:
ax3.set_axisbelow(True) plt.grid(b=True, color=self.x_grid_line_color, linestyle='-')
我怀疑您可能指的是轴刻度线,通常在没有网格线时也可见。您可以使用以下方法关闭它们ax.tick_params():
ax.tick_params()
ax3.tick_params(top='off', bottom='off', left='off', right='off')
如果我理解正确,一种方法是使用plt.tick_params(length=0).
plt.tick_params(length=0)