Description Usage Arguments Value Examples
Theme for use in journals
1 | theme_Publication(base_size = 14)
|
base_size |
size of text in the graph |
base_family |
font of text in graph |
NA
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | library(ggplot2)
library(gridExtra)
library(reshape2)
Scatter <-
ggplot(mtcars, aes(mpg, disp, color = factor(carb))) +
geom_point(size = 3) +
labs(title = "Scatter Plot")
grid.arrange(Scatter,
(Scatter + scale_colour_Publication() + theme_Publication()),
nrow = 1)
Bar <- ggplot(mtcars, aes(factor(carb), fill = factor(carb))) +
geom_bar(alpha = 0.7) +
labs(title = "Bar Plot")
grid.arrange(Bar,
(Bar + scale_fill_Publication() + theme_Publication()),
nrow = 1)
Bubble <- ggplot(mtcars, aes(mpg, disp, color = factor(carb), size = hp)) +
geom_point(alpha = 0.7) +
labs(title = "Bubble Plot") +
scale_size_continuous(range = c(3, 10))
grid.arrange(Bubble,
(Bubble + scale_colour_Publication() + theme_Publication()),
nrow = 1)
mtcars$Index <- 1:nrow(mtcars)
dat <-
melt(mtcars,
id.vars = c("Index"),
measure.vars = c("drat", "wt"))
Line <- ggplot(dat, aes(Index, value, colour = variable)) +
geom_line(size = 1.3) +
labs(title = "Line Plot")
grid.arrange(Line,
(Line + scale_colour_Publication() + theme_Publication()),
nrow = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.