Learn R Programming

remap (version 0.3.2)

get_theme: Create a theme object for remap

Description

get_theme create a theme list to control the color we see in the remap.including lineColor, backgroundColor, titleColor, borderColor and regionColor.

Usage

get_theme(theme = "Dark", lineColor = "Random",
  backgroundColor = "#1b1b1b", titleColor = "#fff",
  borderColor = "rgba(100,149,237,1)", regionColor = "#1b1b1b",
  labelShow = T, pointShow = F, pointColor = "gold")

Arguments

theme

a character object in ("Dark","Bright,"Sky","none)

lineColor

Control the color of the line, "Random" for random color

backgroundColor

Control the color of the background

titleColor

Control the color of the title

borderColor

Control the color of the border

regionColor

Control the color of the region

labelShow

whether show the label of each element, only support mapC.

pointShow

whether show the center point of each element, only support mapC.

pointColor

color of the center point of each element, only support mapC.

Value

A list of color control, which can be used by remap

Details

If you use the theme argument of the get_theme function, you will get the default theme in one of ("Dark","Bright,"Sky"). If you don't like the color, set theme = "none" and use other parameters control remap.\ Can use "red","#1b1b1b" or rgba(100,100,100,1) to control the color

Examples

Run this code
# NOT RUN {
## default theme:"Dark"
set.seed(125)
out = remap(demoC,title = "REmap<U+7EC0><U+8F70><U+7DE5><U+93C1><U+7248><U+5D41>",subtitle = "theme:Bright",
            theme = get_theme("Bright"))
plot(out)

## set Line color as 'orange'
set.seed(125)
out = remap(demoC,title = "REmap<U+7EC0><U+8F70><U+7DE5><U+93C1><U+7248><U+5D41>",subtitle = "theme:Bright",
            theme = get_theme("None",
                             lineColor = "orange"))
plot(out)

## Set backgroundColor as 'red'(#FF0000)

out = remap(demoC,title = "REmap<U+7EC0><U+8F70><U+7DE5><U+93C1><U+7248><U+5D41>",subtitle = "theme:Bright",
            theme = get_theme("None",
                              lineColor = "orange",
                              backgroundColor = "#FF0000"))
plot(out)

## Set TitleColor
out = remap(demoC,title = "REmap<U+7EC0><U+8F70><U+7DE5><U+93C1><U+7248><U+5D41>",subtitle = "theme:Bright",
            theme = get_theme("None",
                              lineColor = "orange",
                              backgroundColor = "#FFC1C1",
                              titleColor = "#1b1b1b"))
plot(out)

## Set Region Color
out = remap(demoC,title = "REmap<U+7EC0><U+8F70><U+7DE5><U+93C1><U+7248><U+5D41>",subtitle = "theme:Bright",
            theme = get_theme("None",
                              lineColor = "orange",
                              backgroundColor = "#FFC1C1",
                              titleColor = "#1b1b1b",
                              regionColor = '#ADD8E6'))
plot(out)
# }

Run the code above in your browser using DataLab