数据文件:http ://ubuntuone.com/3x5z4kFEUcVUB8KXYjICpD
像这样绘制上面的数据会剪辑其中的一些:
tc = read.table('tertiary-tc.csv', header=T, sep=',')
library(ggplot2)
old <- theme_set(theme_bw())
pg <- ggplot(tertiary, aes(Conductivity)) + stat_density(geom = 'path'
, position = 'identity') + facet_wrap(~Lithology)
print(pg)
而这不是:
library(lattice)
densityplot(~Conductivity | Lithology
, data = tc
, groups=Lithology
, plot.points=T
, ref = T
, main="Density plot"
, auto.key=F
, scales=list(tck=-1)) # set to a negative to plot inside ticks? Works!
dev.off()
未绘制的点(只是快速查看)是在“岩性”列下归类为“白云石”的两个点。ggplot2 是否因为它们超出比例而没有绘制它们?还是因为只有两点?