0
我創建一個簡單的頻率直方圖:帶matplotlib的頻率直方圖 - 如何擺脫數組顯示?
figure(figsize=(12,9))
ax=subplot(111)
#Get rid of the border lines
ax.spines["top"].set_visible(False)
ax.spines["right"].set_visible(False)
#Axis label
xlabel("Gross Earnings", fontsize=16)
ylabel("Frequency (in thousands)", fontsize=16)
#Limit the x range so we can see the distribution more closely
xlim(0, 40000)
#Ticks
ax.get_xaxis().tick_bottom()
ax.get_yaxis().tick_left()
hist(earnings, weights=wgts, color="#3F5D7D", bins=100)
我得到的直方圖還好,但我也得到了巨大的陣列收益和wgts顯示器。我如何擺脫這些?
謝謝!
我明白了。謝謝! – chungkim271