R: how to change lattice (levelplot) color theme?

前端 未结 5 1183
陌清茗
陌清茗 2021-01-31 20:30

The default theme on my installation is something which maps the values to pink and cyan. How to change it for example to a gray scale theme?

5条回答
  •  别跟我提以往
    2021-01-31 21:04

    There are many ways to accomplish your request. The simplest is:

    trellis.device(color = FALSE)
    

    another is

    ltheme <- canonical.theme(color = FALSE) ## in-built B&W theme 
    ltheme$strip.background$col <- "transparent" ## change strip bg 
    lattice.options(default.theme = ltheme) ## set as default 
    

    See this mail archive item: Re: [R] specify lattice black-and-white theme for more info.

提交回复
热议问题