theme_TB: Append this function at the end of a ggplot to provide the...

Description Usage Arguments Value

Description

Append this function at the end of a ggplot to provide the style in this paper

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
theme_TB(
  plot_type = "no_arrow",
  plot_ob = NULL,
  feature_vec = NULL,
  color_fill = F,
  color_vec = NULL,
  rotation = 90,
  more_prec = 2,
  aes_param = list(fontsize = 15, point_fontsize = 6, font_fam = "Arial", pointsize =
    3, legend_point_size = 5),
  ...
)

Arguments

plot_type

'dim_red' or 'dotplot'. In 'dim_red', no grid lines will be shown and arrow signs are added while in 'dotplot', grid lines will be shown

plot_ob

if 'dim_red' is selected in plot_type, then it is necessary to supply the ggplot object. This is to extract the axis information using ggplot_build, which is then used to draw the axis arrows. I am attempting to create a new geom layer but so far ggproto does not seem to allow me to extract such information. NB: if automated coloring is desired, it is also essential to input plot_ob

color_fill

whether the color schemes will be applied to scale_fill_continuous

rotation

by how much degree the x axis text is rotated

aes_param

a list of parameters controlling plot aesthetics

...

keyword argument to arrow_axis

whether

to rotate the x axis labels or not

length_ratio

the length of the arrows for dim_plot as a percentage of the plot size

Value

a list of ggplot layers that can be concatenated to a ggplot object


Yutong441/TBdev documentation built on Dec. 18, 2021, 8:22 p.m.