rstudio / thematic

Theme ggplot2, lattice, and base graphics based on a few simple settings.
https://rstudio.github.io/thematic/
Other
244 stars 10 forks source link

thematic_on not work in gridExtra::arrangeGrob #102

Open kongdd opened 3 years ago

kongdd commented 3 years ago

library(grid) library(gridExtra) library(lattice) thematic_on(font = "Times")

x <- seq(pi/4, 5 pi, length.out = 100) y <- seq(pi/4, 5 pi, length.out = 100) r <- as.vector(sqrt(outer(x^2, y^2, "+"))) grid <- expand.grid(x=x, y=y) grid$z <- cos(r^2) exp(-r/(pi^3)) p <- levelplot(z ~ x y, grid, cuts = 50, scales=list(log="e"), xlab="", ylab="", main="Weird Function", sub="with log scales", colorkey = FALSE, region = TRUE) g = gridExtra::arrangeGrob(p, p, nrow = 1) grid.newpage() grid.draw(g)