diff --git a/R/draw.R b/R/draw.R index 32f1b87..10ea253 100644 --- a/R/draw.R +++ b/R/draw.R @@ -52,16 +52,11 @@ add_space <- function(dt, space_alpha = 0.5, space_fill = "grey92", space_color #' library(ggplot2) #' # construct the space and start df for plotting #' space <- tibble::tibble(x0 = 0, y0 = 0, r = 5) -#' start <- holes_1d_geo %>% +#' holes_1d_geo %>% #' compute_pca() %>% #' purrr::pluck("aug") %>% #' clean_method() %>% #' get_start() -#' ggplot() + -#' add_space(dt = space) + -#' add_start(dt = start, start_color = info) + -#' theme_void() + -#' theme(aspect.ratio = 1) #' @family draw functions #' @export add_start <- function(dt, start_size = 5, start_alpha = 1, start_color = NULL, ...) { diff --git a/R/explore-space-pca.R b/R/explore-space-pca.R index eb51493..5ed5b1e 100644 --- a/R/explore-space-pca.R +++ b/R/explore-space-pca.R @@ -19,6 +19,7 @@ #' explore_space_pca(group = method, details = TRUE) + #' scale_color_discrete_botanical() #' +#' \dontrun{ #' best <- matrix(c(0, 1, 0, 0, 0), nrow = 5) #' dt <- bind_theoretical(holes_1d_jellyfish, best, tourr::holes(), raw_data = boa5) #' explore_space_start(dt) @@ -27,6 +28,7 @@ #' dt, facet = loop, interp_size = 0.5, theo_size = 10, #' start_size = 1, end_size = 3 #' ) +#' } #' @export explore_space_start <- function(dt, group = NULL, pca = TRUE, ...) { diff --git a/man/add_start.Rd b/man/add_start.Rd index 51c7c8e..dd93917 100644 --- a/man/add_start.Rd +++ b/man/add_start.Rd @@ -28,16 +28,11 @@ should be be called directly by the user library(ggplot2) # construct the space and start df for plotting space <- tibble::tibble(x0 = 0, y0 = 0, r = 5) -start <- holes_1d_geo \%>\% +holes_1d_geo \%>\% compute_pca() \%>\% purrr::pluck("aug") \%>\% clean_method() \%>\% get_start() -ggplot() + - add_space(dt = space) + - add_start(dt = start, start_color = info) + - theme_void() + - theme(aspect.ratio = 1) } \seealso{ Other draw functions: diff --git a/man/explore_space_pca.Rd b/man/explore_space_pca.Rd index b19179b..79db997 100644 --- a/man/explore_space_pca.Rd +++ b/man/explore_space_pca.Rd @@ -52,6 +52,7 @@ dplyr::bind_rows(holes_1d_geo, holes_1d_better) \%>\% explore_space_pca(group = method, details = TRUE) + scale_color_discrete_botanical() +\dontrun{ best <- matrix(c(0, 1, 0, 0, 0), nrow = 5) dt <- bind_theoretical(holes_1d_jellyfish, best, tourr::holes(), raw_data = boa5) explore_space_start(dt) @@ -61,6 +62,7 @@ explore_space_pca( start_size = 1, end_size = 3 ) } +} \seealso{ Other main plot functions: \code{\link{explore_space_tour}()},