R programming tutorial: Lollipop Plot with ggplot2 in R

preview_player
Показать описание
A lollipop plot is like a bar plot, but the difference is that it use a line and a dot replacing the bar. The figure looks like a lollipop.

The basic form in R for a lollipop is :
ggplot(data, aes(x=x, y=y)) + geom_segment() +geom_point( )

You can also set labels for lollipop using
geom_label(aes(name, value, label = signif(value)), colour, nudge_x, size)

#rprogramming
#rstudio
#lollipop
#datavisualization
#ggplot
#ggplot2
#lollipopplot
#rdatacode
Рекомендации по теме
visit shbcf.ru