theme_peru: PERU theme for all plots in presentation

Description Usage Arguments Examples

View source: R/theme_peru.R

Description

PERU theme for all plots in presentation

Usage

1
2
3
4
theme_peru(method = "color", legend_title = "Legend", color = cat_colors,
  fig_number = "", font = "Open Sans", axis_title_size = 22,
  axis_text_size = 17, xtext_slope = 0, xtext_position = 0.5,
  legend_object_size = 1.2, legend_text_size = 14, legend_title_size = 13)

Arguments

method

Which method was used to differ variables in a plot? Two possible value: color or fill.(Have to be the same method as used in ggplot phrase).

legend_title

Title of legend. Default value: "Legend"

color

Which color group we want to implement? Four possible group: categorical colors,diverging_colors, sequential colors or any other color vector. Default value: categorical_colors

fig_number

Number of figures. Default value = "".

font

Font used in the plot. Devault value: font = "Open Sans"

axis_title_size

Size of title of axis. Default size: 22.

axis_text_size

Size of value of axis. Default size: 17.

xtext_slope

Slope of value of x axis (in degree). Default slope value: 0.

xtext_position

Useful when xtext_slope != 0 (then this argument should be = 1). Distance between text and plot border. Default value: 0.5.

legend_object_size

Size of object in legend. Default falue: 1.2

legend_text_size

Size of text inside legend. Defalut size: 14.

legend_title_size

Size of legend title. Default size: 13.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
ggplot(mtcars, aes(factor(cyl), wt))+
     geom_bar(stat = "identity", fill = cat_colors[1])+
     theme_peru()+
     draw_scale_numeric("y",0,60)
     
ggplot(diamonds[1:100,], aes(depth, carat, color = factor(cut)))+
     geom_point(size = 7)+
     theme_peru("color")+
     draw_scale_numeric("y",0,1,0.1,labels_percent = T)
     
## End(Not run)

AMUFacultyOfEnglish/ENRanalytics documentation built on May 5, 2019, 11:36 a.m.