[英]how to plot “_” objects along the X axis but varying the values on the Y axis ?(in python, matplotlib, pandas)
[英]How to remove values on x,y axis on plot in matplotlib
有沒有辦法從圖中刪除x / y軸數(值)? 我仍然希望將框架和網格保留在圖中。 /喬納斯
取決於你如何創建繪圖...最簡單的方法是將xaxis刻度設置為空列表
from matplotlib import pylab
x = [1,2,3,4,5]
y = [2,4,6,8,10]
pylab.plot(x,y)
frame = pylab.gca()
frame.axes.get_xaxis().set_ticks([])
frame.axes.get_yaxis().set_ticks([])
pylab.show()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.