theme_basic: Basic ggplot theme.

Usage Arguments Details Value Examples

View source: R/theme_basic.R

Usage

1
2
3
4
theme_basic(axis_size = 0.5, title_size = 8, subtitle_size = 6,
  font = "URWHelvetica", col_gen = "grey50", legend_title_size = 0.5,
  legend_text_size = 0.4, legend_tick_size = 0.08, legend_width = 0.5,
  legend_height = 0.2, legend_hjust_title = 0.5)

Arguments

axis_size

Font size - axes labels (numeric) [default: 0.5].

title_size

Font size - title (numeric) [default: 8].

subtitle_size

Font size - sub title (numeric) [default: 6].

font

Font type (character) [default: "URWHelvetica"].

col_gen

Font color (character) [default: "grey50"].

legend_title_size

Font size - legend title (numeric) [default: 0.5].

legend_text_size

Font size - legend text (numeric) [default: 0.4].

legend_tick_size

Tick length (numeric) [default: 0.08].

legend_width

Legend width (numeric) [default: 0.5].

legend_height

Legend height (numeric) [default: 0.2].

legend_hjust_title

Legend title adjustment (horizontal) (numeric) [default: 0.5].

Details

Maintained by: Clara Marquardt

Value

Formatted ggplot object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
test_plot <- ggplot(data=dia[1:25]) + 
   geom_bar(aes(x=dia_code)) + 
   labs(
     title="Test Title", 
     subtitle="Test Subtitle", 
     x="Diagnosis Code", 
     y="Frequency (Number of Observations)", 
     caption="Test Plot - Details: * ------------------------ *") + 
   theme_basic(legend_tick_size=0.001)
ggsave("theme_basic_test.pdf", test_plot)

## End(Not run)

ClaraMarquardt/ehR documentation built on Sept. 17, 2017, 6:05 p.m.