r - Change the axes on a radial barchart -
i want make radial stacked barchart. have this:
ggplot(diamonds, aes(clarity, fill= cut)) + geom_bar() + coord_polar() which yields plot this: 
however crowded. there way change axes barchart hollow? want 0 start not @ center of circle but, say, 1/3 or 1/2 of radius center. ideas that?
you can tell coord_plot expand - puts small hole in middle:
ggplot(diamonds, aes(clarity, fill= cut)) + geom_bar() + coord_polar(expand=true) 
then can control y scale expansion (with argument expand=... scale_y_continuous(...). unfortunately think expansion symmetrical, i.e. if add space @ bottom (i.e. in middle, add @ top (i.e. outside):
ggplot(diamonds, aes(clarity, fill= cut)) + geom_bar() + coord_polar(expand=true) + scale_y_continuous(expand=c(0.5, 0)) 
Comments
Post a Comment