[英]Matplotlib don't show all ticks/labels with bar chart. It skips first of y axis and last one of x axis
[英]Matplotlib don't show all ticks/labels with bar chart?
繪制具有許多點的線時,matplotlib 會自動隱藏一些 x 軸刻度/標簽,以確保所有標簽都適合。
如果我想 plot 一個酒吧聊天有很多點,有沒有辦法讓 matplotlib 認為 x 軸與 plot 相同? 現在它正試圖擠進所有的標簽。
我建議指定 xtick 標簽列表:
plt.xticks([80,150,300]) ### In this case these are numbers, change them to your values
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.