| 1 |
library(shiny) |
| 2 |
library(ggplot2) |
| 3 |
library(thematic) |
| 4 |
|
| 5 |
thematic_shiny("black", "white", font = font_spec("Pacifico", 1.25, update = TRUE)) |
| 6 |
|
| 7 |
ui <- fluidPage( |
| 8 |
imageOutput("quartz") |
| 9 |
) |
| 10 |
|
| 11 |
server <- function(input, output, session) { |
| 12 |
output$quartz <- snapshotPreprocessOutput(renderImage({ |
| 13 |
file <- thematic_save_plot( |
| 14 |
qplot(1:10) + ggtitle("quartz png"), |
| 15 |
device = grDevices::png |
| 16 |
) |
| 17 |
list(src = file, width = 480, height = 480) |
| 18 |
}), function(value) {}) |
| 19 |
} |
| 20 |
|
| 21 |
shinyApp(ui, server) |