R:如何改变格子(levelplot)的颜色主题? [英] R: how to change lattice (levelplot) color theme?
本文介绍了R:如何改变格子(levelplot)的颜色主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我安装的默认主题是将值映射到粉红色和青色。
解决方案
您可以使用
library(lattice)
lattice.options(default.theme = standard.theme(color = FALSE))
打开适合打印的黑白色。我也玩过像
sb< - trellis.par.get(strip.background)
pre>
sb [[col]] [1]< - lightgray
trellis.par.set(strip.background,sb)
只改变标题背景。
我认为人们只问 ggplot2 问题在这里:)很高兴看到一些 lattice 进行更改。
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?
解决方案You can use
library(lattice) lattice.options(default.theme = standard.theme(color = FALSE))
which turns on black-and-white suitable for printing. I've also played with things like
sb <- trellis.par.get("strip.background") sb[["col"]][1] <- "lightgray" trellis.par.set("strip.background", sb)
which changes just the header background.
And I thought people only asked ggplot2 questions here :) Nice to see some lattice for a change.
这篇关于R:如何改变格子(levelplot)的颜色主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文