[英]Plotting graph using matplotlib in Jupyter iPython Notebook
我試圖在Jupyter python筆記本中使用matplotlib繪制圖形。 但是當我分配y軸標簽時,它沒有顯示在圖表中,而且它也繪制了兩個圖形。 我使用的代碼是:
trans_count_month = df.groupby('month_').TR_AMOUNT.count()
plt.xlabel('Months') #X-axis label
plt.ylabel('Total Transactions Count') #Y-axis label
plt.title("Month wise Total Transaction Count") #Chart title.
width = 9
height = 5
plt.figure(figsize=(width, height))
trans_count_month.plot(kind='bar')
plt.figure(figsize=(width, height))
如何只顯示一個帶有y軸標簽的圖形,如果還有其他方法可以繪制此圖形,請分享解決方案。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.