Ko ABE 2024-02-26
stat_countgrid
is used to plot icon array.
library(ggsomestat)
## Loading required package: ggplot2
HEC <- as.data.frame(HairEyeColor)
ggplot(HEC, aes(x=Freq, colour=Sex))+
stat_countgrid(shape=15)+
facet_grid(Hair~Eye, labeller = label_both)+
ggsomestat:::axis_text_black()
ggplot(HEC, aes(x=Freq, fill=Sex))+
stat_countgrid(geom="tile", width=0.9, height=0.9)+
facet_grid(Hair~Eye, labeller = label_both)
ggplot(HEC, aes(x=Freq, label=substr(Sex,1,1)))+
stat_countgrid(geom="text",size=3)+
facet_grid(Hair~Eye, labeller = label_both)+
theme_bw()+
ggsomestat:::axis_text_black()
stat_ecdf2
draws parallel ecdf plot.
ggplot(searchConsole, aes(impressions, pagePath)) +
stat_ecdf2()
entry0117 <- searchConsole[searchConsole$pagePath=="/entry/2015/01/17/064522",]
ggplot(entry0117, aes(date, clicks/impressions)) +
geom_line()+
stat_binomCI(geom = "ribbon", aes(numerator=clicks, denominator=impressions), alpha=0.3)
ggplot(economics, aes(date, unemploy)) +
geom_line()+
stat_ma(colour="royalblue", windowsize=300)
## sparkline
stat?sparkline
draws the parallel line charts
ggplot(searchConsole, aes(x = date, y = pagePath, inner_y = clicks)) +
stat_sparkline()
ggplot(searchConsole, aes(x = date, y = pagePath, inner_y = clicks)) +
stat_sparkline()+
axis_text_black()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.