from pandas import * df = read_csv("http://image.guardian.co.uk/sys-files/Guardian/documents/2009/12/08/" + "us.csv?guni=Data:in%20body%20link") h=histogram(df.ix[map(lambda x: x.strip()=="CHARLESTON",df["Station"]),6],bins=arange(3.4,16.2,0.2)) dfh = DataFrame(zip(h[1],h[0]),columns=["temperature","count"]) dfh.plot(kind="bar",x="temperature",title="Jan. ave. temperatures for Charleston, SC, 1823-2009") ax=dfh.plot(kind="bar",x="temperature",title="Jan. ave. temperatures for Charleston, SC, 1823-2009") r=ax.set_xticklabels(map(lambda x: 3.4+x/5.0 if (x+2)%5==0 else "", range(65)))