change y axis label for histogram plot

75 views
Skip to first unread message

Tom Song

unread,
Sep 4, 2009, 5:20:55 PM9/4/09
to ggplot2
Hi,
I want to change the y axis title from default "count" to
"frequency" with the following command;

qplot(carat, data = diamonds, geom = "histogram",ylab='frequency')

but it doesn't work. It still shows count as the label for y axis.
Any suggestions of how to change the default label?

Thanks for help!

Regards,

Tom

Juliet Hannah

unread,
Sep 4, 2009, 10:32:37 PM9/4/09
to Tom Song, ggplot2
qplot(carat, data = diamonds, geom = "histogram") +
scale_y_continuous("Frequency")
Reply all
Reply to author
Forward
0 new messages