diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION new file mode 100644 index 0000000..a64a9b0 --- /dev/null +++ b/CRAN-SUBMISSION @@ -0,0 +1,3 @@ +Version: 0.2.0 +Date: 2022-11-25 16:11:42 UTC +SHA: 9a1786a98508575c3747f01c6abf4a44b6e66ad5 diff --git a/R/theme_pcp.R b/R/theme_pcp.R index d7b2b78..4732ffc 100644 --- a/R/theme_pcp.R +++ b/R/theme_pcp.R @@ -1,16 +1,29 @@ #' Theme for parallel coordinate plots #' #' The function `theme_pcp` provides a wrapper for thematic -#' choices suitable for parallel coordinate axes. In particular, -#' axes labeling in parallel coordinate plot is quite un-informative, -#' as they are based by default on variable names derived during the +#' choices suitable for parallel coordinate plots. In particular, +#' the labeling of axes in parallel coordinate plot is quite un-informative. +#' In the default theme axes labels are based on variable names derived during the #' data wrangling step. -#' #' @inheritParams ggplot2::theme_bw #' @export #' @importFrom ggplot2 %+replace% +#' @return A `ggplot2` theme object based on [ggplot2::theme_bw()] without y axis and x axes labels. +#' @seealso [ggplot2::theme_bw()] +#' @examples +#' library(ggplot2) +#' gg <- iris |> +#' pcp_select(tidyselect::everything()) |> +#' pcp_scale() |> +#' pcp_arrange() |> +#' ggplot(aes_pcp(colour = Species)) + +#' geom_pcp() #' -theme_pcp <- function(base_size = 9, base_family = "") { +#' # plot with the default ggplot2 theme +#' gg +#' # better: +#' gg + theme_pcp() +theme_pcp <- function(base_size = 11, base_family = "") { theme_bw(base_size = base_size, base_family = base_family) %+replace% theme(axis.text.y = element_blank(), axis.ticks.y = element_blank(), diff --git a/man/theme_pcp.Rd b/man/theme_pcp.Rd index bcd3e77..0bb3f83 100644 --- a/man/theme_pcp.Rd +++ b/man/theme_pcp.Rd @@ -4,17 +4,37 @@ \alias{theme_pcp} \title{Theme for parallel coordinate plots} \usage{ -theme_pcp(base_size = 9, base_family = "") +theme_pcp(base_size = 11, base_family = "") } \arguments{ \item{base_size}{base font size, given in pts.} \item{base_family}{base font family} } +\value{ +A \code{ggplot2} theme object based on \code{\link[ggplot2:ggtheme]{ggplot2::theme_bw()}} without y axis and x axes labels. +} \description{ The function \code{theme_pcp} provides a wrapper for thematic -choices suitable for parallel coordinate axes. In particular, -axes labeling in parallel coordinate plot is quite un-informative, -as they are based by default on variable names derived during the +choices suitable for parallel coordinate plots. In particular, +the labeling of axes in parallel coordinate plot is quite un-informative. +In the default theme axes labels are based on variable names derived during the data wrangling step. } +\examples{ +library(ggplot2) +gg <- iris |> + pcp_select(tidyselect::everything()) |> + pcp_scale() |> + pcp_arrange() |> + ggplot(aes_pcp(colour = Species)) + + geom_pcp() + +# plot with the default ggplot2 theme +gg +# better: +gg + theme_pcp() +} +\seealso{ +\code{\link[ggplot2:ggtheme]{ggplot2::theme_bw()}} +}