I creating a simple frequency histogram:
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)
I get the histogram alright, but I also get the giant arrays earnings and wgts in display. How do I get rid of those?
Thanks!