Skip to content
Snippets Groups Projects
Commit 1d37d1f5 authored by Eduardo E. R. Junior's avatar Eduardo E. R. Junior
Browse files

Adiciona procedimento para incluir descrição da fonte em plots trellis combinados

parent baefc224
No related branches found
No related tags found
No related merge requests found
......@@ -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()
}
##======================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment