diff --git a/R/stat-rule.r b/R/stat-rule.r index 263d5c1..6c3f701 100644 --- a/R/stat-rule.r +++ b/R/stat-rule.r @@ -58,7 +58,7 @@ #' @example inst/examples/ex-stat-rule-glass.r #' @export stat_rule <- function( - mapping = NULL, data = NULL, geom = "axis", position = "identity", + mapping = NULL, data = NULL, geom = "rule", position = "identity", fun.lower = "minpp", fun.upper = "maxpp", fun.offset = "minabspp", fun.args = list(), diff --git a/R/zzz-biplot-stats.r b/R/zzz-biplot-stats.r index 81ead60..eef0fdd 100644 --- a/R/zzz-biplot-stats.r +++ b/R/zzz-biplot-stats.r @@ -546,7 +546,7 @@ StatRowsRule <- ggproto( stat_rows_rule <- function( mapping = NULL, data = NULL, - geom = "axis", + geom = "rule", position = "identity", fun.lower = "minpp", fun.upper = "maxpp", @@ -596,7 +596,7 @@ StatColsRule <- ggproto( stat_cols_rule <- function( mapping = NULL, data = NULL, - geom = "axis", + geom = "rule", position = "identity", fun.lower = "minpp", fun.upper = "maxpp", diff --git a/inst/examples/ex-stat-rule-glass.r b/inst/examples/ex-stat-rule-glass.r index ab4dff5..16e83f2 100644 --- a/inst/examples/ex-stat-rule-glass.r +++ b/inst/examples/ex-stat-rule-glass.r @@ -40,7 +40,7 @@ glass_lda %>% ggbiplot() + theme_bw() + theme_biplot() + geom_rows_point(aes(shape = grouping, alpha = discriminant)) + - stat_cols_rule(aes(label = name), color = "#888888", num = 8L, + stat_cols_rule(aes(label = name), geom = "axis", color = "#888888", num = 8L, fun.offset = \(x) minabspp(x, p = .1), text_size = 2.5, text_dodge = .025) + scale_shape_manual(values = c(16L, 17L, 15L, 18L)) + diff --git a/man/biplot-stats.Rd b/man/biplot-stats.Rd index be5bcac..b0ec217 100644 --- a/man/biplot-stats.Rd +++ b/man/biplot-stats.Rd @@ -175,7 +175,7 @@ stat_cols_projection( stat_rows_rule( mapping = NULL, data = NULL, - geom = "axis", + geom = "rule", position = "identity", fun.lower = "minpp", fun.upper = "maxpp", @@ -190,7 +190,7 @@ stat_rows_rule( stat_cols_rule( mapping = NULL, data = NULL, - geom = "axis", + geom = "rule", position = "identity", fun.lower = "minpp", fun.upper = "maxpp", diff --git a/man/figures/README-predictive biplot-1.png b/man/figures/README-predictive biplot-1.png index af8289f..8a0610b 100644 Binary files a/man/figures/README-predictive biplot-1.png and b/man/figures/README-predictive biplot-1.png differ diff --git a/man/stat_rule.Rd b/man/stat_rule.Rd index 73d1718..b41cca5 100644 --- a/man/stat_rule.Rd +++ b/man/stat_rule.Rd @@ -10,7 +10,7 @@ stat_rule( mapping = NULL, data = NULL, - geom = "axis", + geom = "rule", position = "identity", fun.lower = "minpp", fun.upper = "maxpp", @@ -210,7 +210,7 @@ glass_lda \%>\% ggbiplot() + theme_bw() + theme_biplot() + geom_rows_point(aes(shape = grouping, alpha = discriminant)) + - stat_cols_rule(aes(label = name), color = "#888888", num = 8L, + stat_cols_rule(aes(label = name), geom = "axis", color = "#888888", num = 8L, fun.offset = \(x) minabspp(x, p = .1), text_size = 2.5, text_dodge = .025) + scale_shape_manual(values = c(16L, 17L, 15L, 18L)) +