circle_scale_legend {tricycle}R 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)

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

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()

[Package tricycle version 1.1.1 Index]