From 1d37d1f526a8f87dd4ca8d9547709516828d0f5d Mon Sep 17 00:00:00 2001 From: Eduardo Junior <edujrrib@gmail.com> Date: Wed, 8 Jun 2016 03:11:36 -0300 Subject: [PATCH] =?UTF-8?q?Adiciona=20procedimento=20para=20incluir=20desc?= =?UTF-8?q?ri=C3=A7=C3=A3o=20da=20fonte=20em=20plots=20trellis=20combinado?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/_setup.R | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/_setup.R b/docs/_setup.R index def7353..372f9da 100644 --- a/docs/_setup.R +++ b/docs/_setup.R @@ -69,11 +69,26 @@ ps$par.sub.text <- list(font = 1, just = "left", cex = 0.9, x = grid::unit(5, "mm")) trellis.par.set(ps) +## da lattice combinados (1. use ps.sub como par.settings, nos gráficos +## bottom da combinação e 2. use fonte.xy("texto") após o print dos +## gráficos) +library(grid) +library(gridExtra) +ps.sub <- list(layout.heights = list(bottom.padding = 5)) +fonte.xy <- function(texto, ...) { + grid::grid.text(texto, x = 0.01, y = 0.01, + default.units = "npc", + just = c("left", "bottom"), ...) + invisible() +} + + ## da graphics (use fonte("texto") após os gráficos) fonte <- function(texto, side = 1, line = -1, adj = 0, outer = TRUE, ...) { mtext("Fonte: Elaborado pelo autor.", cex = 0.9, side = side, line = line, adj = adj, outer = outer, ...) + invisible() } ##====================================================================== -- GitLab