26  geom_x

26.1 geom_x_label

Package

ggxmean (Reynolds 2024)

geom_x_line

Package

ggxmean (Reynolds 2024)

26.2 geom_x_mean

Package

ggxmean (Reynolds 2024)

geom_x_mean_label

26.3 geom_x_median

Package

ggxmean (Reynolds 2024)

26.4 geom_x_percentile

Package

ggxmean (Reynolds 2024)

26.5 geom_x_quantile

Package

ggxmean (Reynolds 2024)

26.6 geom_xmax

Package

ggxmean (Reynolds 2024)

26.7 geom_xmin

Package

ggxmean (Reynolds 2024)

26.8 geom_xy_means

Package

# install.packages("devtools")
#devtools::install_github("EvaMaeRey/ggxmean")

ggxmean (Reynolds 2024)

Description

Place point at mean of x and mean of y

Understandable aesthetics

required aesthetics

x, y

See also

geom_point

Example

library(ggxmean)
a1 <- worldbankdata |>
  ggplot(aes(x = Income, y = Cooking)) + 
  geom_xy_means(na.rm=TRUE, col="red", size=4) + 
  ggtitle("a1: geom_xy_means only")
a2 <- worldbankdata |>
  ggplot(aes(x = Income, y = Cooking)) + 
  geom_point(alpha=0.5) +
  geom_xy_means(na.rm=TRUE, col="red", size=4) + 
  ggtitle("a2: geom_points and geom_xy_means")
a1|a2
Warning: Removed 6047 rows containing missing values (`geom_point()`).

26.9 geom_xy_xymean

Example

library(ggxmean)
worldbankdata |>
  ggplot(aes(x = Income, y = Cooking)) + 
  geom_xy_xymean(na.rm=TRUE, size=3)