[英]How do I make R lattice xyplot ignore gaps in time and make a continuous timeseries plot?
[英]How to make lattice xyplot() grayscale in R?
最簡單的方法是制作這種情節灰度(或許可能是黑白),而不是默認的多色:
xyplot(y1 + y2 ~ x, mydata, auto.key=TRUE)
我已經看過有關創建新圖形設備或更改所有繪圖選項的討論 ,但是我是否可以在xyplot()
函數本身中包含一個選項,將繪圖轉換為灰度?
library(lattice)
bwtheme <- standard.theme("pdf", color=FALSE)
mydata <- data.frame(y1=rnorm(10), y2=rnorm(10), x=1:10)
xyplot(y1 + y2 ~ x, mydata, auto.key=TRUE, par.settings=bwtheme)
為了比較:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.