itstoocold
itstoocold

Reputation: 2563

How do I set x and y axis labels for pandas histograms?

You would think this is Google-able but I haven't been able to find anything.

Upvotes: 1

Views: 8418

Answers (1)

Louise Davies
Louise Davies

Reputation: 15941

pandas' plot function uses matplotlib, so you can use the matplotlib functions set_xlabel and set_ylabel

plot = df.plot(x="Some Data",y="Other Data",kind="hist")
plot.set_xlabel("X")
plot.set_ylabel("Y")

Upvotes: 5

Related Questions