2012-03-17 34 views

Trả lời

37

Chỉ cần đặt gai (và/hoặc ve) để ẩn.

Ví dụ:

import matplotlib.pyplot as plt 

fig, ax = plt.subplots() 

ax.spines['right'].set_visible(False) 
ax.spines['top'].set_visible(False) 

plt.show() 

enter image description here

Nếu bạn muốn ẩn ve trên đầu và trái là tốt, chỉ cần làm:

ax.xaxis.set_ticks_position('bottom') 
ax.yaxis.set_ticks_position('left') 

enter image description here

Các vấn đề liên quan