Explorar el Código

Set plot title position to "plot" for ggplot2 >= 3.3.0

tags/v0.3.0
Garrick Aden-Buie hace 6 años
padre
commit
c086ba95d8
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. +5
    -1
      R/ggplot2.R

+ 5
- 1
R/ggplot2.R Ver fichero

@@ -319,7 +319,7 @@ theme_xaringan_base <- function(
theme_xaringan_set_defaults(text_color, background_color, accent_color, accent_secondary_color)
}

ggplot2::theme(
theme <- ggplot2::theme(
line = ggplot2::element_line(color = blend(0.2)),
rect = ggplot2::element_rect(fill = background_color),
text = ggplot2::element_text(
@@ -357,6 +357,10 @@ theme_xaringan_base <- function(
color = blend(0.3)
)
)

if (utils::packageVersion("ggplot2") >= package_version("3.3.0")) {
theme + ggplot2::theme(plot.title.position = "plot")
} else theme
}

#' Set and Restore ggplot2 geom Defaults

Cargando…
Cancelar
Guardar