简体   繁体   中英

Matplotlib: How to remove dark horizontal/vertical dots at the end of grid lines in?

How to remove dark horizontal/vertical dots, at the end of grid lines?

Here is my Code:

ax3.set_axisbelow(True)
plt.grid(b=True, color=self.x_grid_line_color, linestyle='-')

I suspect you're probably referring to the axis tick marks, which are normally also visible when there are no grid lines. You can turn them off using ax.tick_params() :

ax3.tick_params(top='off', bottom='off', left='off', right='off')

如果我理解正确,一种方法是使用plt.tick_params(length=0)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM