From b1683ecf135c5f20003371128484a7cc6cd13b7f Mon Sep 17 00:00:00 2001 From: Josh Cook Date: Thu, 21 Feb 2019 13:52:58 -0500 Subject: [PATCH] doc: updated for fixing scale_cosmic errors --- man/pal_cosmic.Rd | 7 ++++--- man/scale_cosmic.Rd | 14 ++------------ 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/man/pal_cosmic.Rd b/man/pal_cosmic.Rd index 7bfaa2e..536d193 100644 --- a/man/pal_cosmic.Rd +++ b/man/pal_cosmic.Rd @@ -4,7 +4,8 @@ \alias{pal_cosmic} \title{COSMIC Color Palettes} \usage{ -pal_cosmic(palette = c("hallmarks"), alpha = 1) +pal_cosmic(palette = c("hallmarks", "signature_substitutions"), + alpha = 1) } \arguments{ \item{palette}{Palette type. @@ -21,8 +22,8 @@ Somatic Mutations in Cancers (COSMIC)} } \examples{ library("scales") -show_col(pal_cosmic("hallmark")(10)) -show_col(pal_cosmic("hallmark", alpha = 0.6)(10)) +show_col(pal_cosmic("hallmarks")(10)) +show_col(pal_cosmic("hallmarks", alpha = 0.6)(10)) show_col(pal_cosmic("signature_substitutions")(6)) show_col(pal_cosmic("signature_substitutions", alpha = 0.6)(6)) } diff --git a/man/scale_cosmic.Rd b/man/scale_cosmic.Rd index cdffb87..6cb1ef5 100644 --- a/man/scale_cosmic.Rd +++ b/man/scale_cosmic.Rd @@ -26,9 +26,6 @@ See \code{alpha} in \code{\link[grDevices]{rgb}} for details.} See \code{\link{pal_cosmic}} for details. } \examples{ - -# TODO: change to useing this palette - library("ggplot2") data("diamonds") @@ -38,21 +35,14 @@ ggplot( ) + geom_point(alpha = 0.7) + geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) + - theme_dark() + theme( - panel.background = element_rect(fill = "#2D2D2D"), - legend.key = element_rect(fill = "#2D2D2D") - ) + - scale_color_cosmic() + theme_bw() + scale_color_cosmic() ggplot( subset(diamonds, carat > 2.2 & depth > 55 & depth < 70), aes(x = depth, fill = cut) ) + geom_histogram(colour = "black", binwidth = 1, position = "dodge") + - theme_dark() + theme( - panel.background = element_rect(fill = "#2D2D2D") - ) + - scale_fill_cosmic() + theme_bw() + scale_fill_cosmic() } \author{ Nan Xiao <\email{me@nanx.me}> |