我真的同意其他海报:Tufte's books are fantastic,非常值得一读。
首先,我将向您指出今年早些时候“查看数据”中的a very nice tutorial on ggplot2 and ggobi。除此之外,我只强调一个来自 R 的可视化和两个图形包(不像基础图形、晶格或 ggplot 那样广泛使用):
热图
我真的很喜欢可以处理多变量数据的可视化,尤其是时间序列数据。 Heat maps 对此很有用。 David Smith on the Revolutions blog 推荐了一个非常简洁的。这是 Hadley 提供的 ggplot 代码:
stock <- "MSFT"
start.date <- "2006-01-12"
end.date <- Sys.Date()
quote <- paste("http://ichart.finance.yahoo.com/table.csv?s=",
stock, "&a=", substr(start.date,6,7),
"&b=", substr(start.date, 9, 10),
"&c=", substr(start.date, 1,4),
"&d=", substr(end.date,6,7),
"&e=", substr(end.date, 9, 10),
"&f=", substr(end.date, 1,4),
"&g=d&ignore=.csv", sep="")
stock.data <- read.csv(quote, as.is=TRUE)
stock.data <- transform(stock.data,
week = as.POSIXlt(Date)$yday %/% 7 + 1,
wday = as.POSIXlt(Date)$wday,
year = as.POSIXlt(Date)$year + 1900)
library(ggplot2)
ggplot(stock.data, aes(week, wday, fill = Adj.Close)) +
geom_tile(colour = "white") +
scale_fill_gradientn(colours = c("#D61818","#FFAE63","#FFFFBD","#B5E384")) +
facet_wrap(~ year, ncol = 1)
最终看起来有点像这样:
RGL:交互式 3D 图形
另一个非常值得学习的软件包是RGL,它可以轻松地提供创建交互式 3D 图形的能力。网上有很多例子(包括在 rgl 文档中)。
The R-Wiki has a nice example 了解如何使用 rgl 绘制 3D 散点图。
GGobi
另一个值得了解的包是rggobi。有a Springer book on the subject,还有很多很棒的在线文档/示例,包括"Looking at Data" 课程。