|
|
@ -11,8 +11,16 @@ theme_statebins <- function(legend_position="bottom", |
|
|
|
base_line_size = base_size/22, |
|
|
|
base_rect_size = base_size/22) { |
|
|
|
|
|
|
|
gg <- theme_bw(base_family = base_family, base_size = base_size, |
|
|
|
if ("base_line_size" %in% names(formals(ggplot2::theme_bw))) { |
|
|
|
gg <- theme_bw(base_family = base_family, base_size = base_size, |
|
|
|
base_line_size = base_line_size, base_rect_size = base_rect_size) |
|
|
|
} else { |
|
|
|
gg <- theme_bw(base_family = base_family, base_size = base_size) |
|
|
|
gg <- gg + theme(size = base_line_size) |
|
|
|
gg <- gg + theme(rect = element_rect(fill = "white", colour = "black", |
|
|
|
size = base_rect_size, linetype = 1)) |
|
|
|
} |
|
|
|
|
|
|
|
gg <- gg + theme(panel.border=element_blank()) |
|
|
|
gg <- gg + theme(strip.background = element_rect(color="#2b2b2b", fill="white")) |
|
|
|
gg <- gg + theme(panel.grid=element_blank()) |
|
|
@ -22,6 +30,8 @@ theme_statebins <- function(legend_position="bottom", |
|
|
|
gg <- gg + theme(plot.title=element_text(hjust=0.5)) |
|
|
|
gg <- gg + theme(axis.title.x=element_text(hjust=0.5)) |
|
|
|
gg <- gg + theme(legend.position=legend_position) |
|
|
|
gg <- gg + theme(plot.title=element_text(size=16, hjust=0)) |
|
|
|
gg <- gg + theme(plot.margin = margin(30,30,30,30)) |
|
|
|
gg |
|
|
|
|
|
|
|
} |
|
|
|