R:如何改变格子(levelplot)的颜色主题? [英] R: how to change lattice (levelplot) color theme?

查看:1895
本文介绍了R:如何改变格子(levelplot)的颜色主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装的默认主题是将值映射到粉红色和青色。

解决方案

您可以使用

  library(lattice)
lattice.options(default.theme = standard.theme(color = FALSE))

打开适合打印的黑白色。我也玩过像

  sb<  -  trellis.par.get(strip.background)
sb [[col]] [1]< - lightgray
trellis.par.set(strip.background,sb)
pre>

只改变标题背景。



我认为人们只问 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆