#单个连续型变量 options(repr.plot.width = 6, repr.plot.height = 4.5, repr.plot.res = 300) c <- ggplot(mpg, aes(hwy)); c2 <- ggplot(mpg) p1 <- c + geom_area(stat = "bin")+ggtitle('geom_area') p2 <- c + geom_density(ke
df <- ggplot2::mpg %>% data.table() %>% .[, lapply(.SD, mean), .SDcols="cty", by = "manufacturer"] %>% setorder(cty) %>% .[, manufacturer:=toupper(manufacturer)] ggplot(df, aes(reorder(manufacturer, cty), cty))+ geom_bar(stat = "identity", fill = "#c96464", width ...
# Box plot with mean points p + stat_summary(fun.y=mean, geom="point", shape=23, size=4) Choose which items to display : p + scale_x_discrete(limits=c("0.5", "2")) Box plot with dots Dots (or points) can be added to a box plot using the functionsgeom_dotplot()orgeom...
stat-bindot.R stat-binhex.R stat-boxplot.R stat-connect.R stat-contour.R stat-count.R stat-density-2d.R stat-density.R stat-ecdf.R stat-ellipse.R stat-function.R stat-identity.R stat-manual.R stat-qq-line.R stat-qq.R stat-quantilemethods.R stat-sf-coordinates.R stat-sf.R stat-...
Newcut_width()is a convenient replacement for the verboseplyr::round_any(), with the additional benefit of offering finer control. Newgeom_count()is a convenient alias tostat_sum(). Use it when you have overlapping points on a scatterplot.stat_sum()now defaults to using counts instead of...
stat_spoke()is nowgeom_spoke()since I realised it's a reparameterisation of `geom_segment(). stat_bindot()has been removed because it's so tightly coupled togeom_dotplot(). If you happened to usestat_bindot(), just change togeom_dotplot()(#1194). ...
stat_spoke() is now geom_spoke() since I realised it's a reparameterisation of `geom_segment(). stat_bindot() has been removed because it's so tightly coupled to geom_dotplot(). If you happened to use stat_bindot(), just change to geom_dotplot() (#1194). All defunct functions...
stat_spoke() is now geom_spoke() since I realised it's a reparameterisation of `geom_segment(). stat_bindot() has been removed because it's so tightly coupled to geom_dotplot(). If you happened to use stat_bindot(), just change to geom_dotplot() (#1194). All defunct functions...
Box plot position is now controlled byposition_dodge2(), which can also be used for bars and rectangles.position_dodge2()compares thexminandxmaxvalues of each element to determine which ones overlap, and dodges them accordingly. This makes it possible to dodge box plots created withgeom_box...
stat_spoke() is now geom_spoke() since I realised it's a reparameterisation of `geom_segment(). stat_bindot() has been removed because it's so tightly coupled to geom_dotplot(). If you happened to use stat_bindot(), just change to geom_dotplot() (#1194). All defunct functions...