格子(R)密度对数图中的小刻度

时间:2012-07-19 13:48:26

标签: r lattice

我需要使用R的晶格包创建密度图.x轴具有对数标度。最小的例子:

densityplot( ~ mpg, data=mtcars, scales=list(x=list(log=TRUE)))

enter image description here

是否可以在主要蜱之间加上小标记?在xyplot中,这可以使用xscale.components=xscale.components.log10ticks,但这不适用于密度图或直方图。

1 个答案:

答案 0 :(得分:0)

我发现这需要

library("lattice")
library("latticeExtra")

现在xscale.components=xscale.components.log10ticks有效(对于我认为的所有格子图)。我不知道需要latticeExtra

相关问题