circle_scale_legend: Get the cyclic legend

View source: R/plot_emb_circle_scale.R

circle_scale_legendR Documentation

Get the cyclic legend

Description

This function is a helper function to create the cyclic ggplot color legend.

Usage

circle_scale_legend(hue.colors = c("#2E22EA", "#9E3DFB", "#F86BE2", "#FCCE7B", "#C4E416", "#4BBA0F", "#447D87", "#2C24E9"),
 hue.n = 500, alpha = 0.6, y.inner = 1.5, y.outer = 3, y.text = 3.8, ymax = 4.5, text.size = 3, addStageLabel = FALSE, 
 G1.pos = 0, S.pos = 2.2, G2M.pos = 3.9)

Arguments

hue.colors

The string vector gives the cyclic colors. The first color should look very similar to the last one. Default: c("#2E22EA", "#9E3DFB", "#F86BE2", "#FCCE7B", "#C4E416", "#4BBA0F", "#447D87", "#2C24E9")

hue.n

The number of breaks of color scheme. Default: 500

alpha

The alpha value (transparency). Default: 0.6

y.inner

The radius of inner circle of the donut. Default: 1.5

y.outer

The radius of outer circle of the donut. Default: 3

y.text

The radius of text position. Default: 3.8

ymax

The value control the border of the legend. Default: 4.5

text.size

The size of the text Default: 3

addStageLabel

Whether to add approximate discrete stage labels. Default: FALSE

G1.pos

Approximate radius value of G1 label position. Default: 0

S.pos

Approximate radius value of S label position. Default: 2.2

G2M.pos

Approximate radius value of G2M label position. Default: 3.9

Details

The function will make a donut shape to serve as the cyclic color legend. The arguments should match the argument used in plot_emb_circle_scale.

Value

A ggplot object

Author(s)

Shijie C. Zheng

Examples

circle_scale_legend()

hansenlab/tricycle documentation built on March 19, 2022, 7:24 p.m.