我正在尝试使用R晶格准备堆栈条形图,并使用垂直轴上的log10比例绘制数据 . 没有log10规模,事情就像预期的那样

# Dummy data
Grp <- c('A','B','A','B','A','B')
Sub <- c(1,1,2,2,3,3)
tst <- rbind(Grp,Sub)
tst <- data.frame(t(tst),stringsAsFactors = FALSE)
tst$Val <- c(5,10,10,20,80,90) 

# Stacked bar chart normal scale
require(lattice)
require(latticeExtra)

barchart(Val ~ Grp, 
         data = tst, 
         horiz = FALSE,
         main = '',
         groups = Sub,
         stack = TRUE,
         auto.key=list(space = 'top', columns = 3, 
                   points = FALSE, rectangles = TRUE,
                   title = ''),
         par.strip.text = list(col = 'white', font = 1.5),
         panel = function(x,y,...){
           panel.grid(h = -1, v = 0);
           panel.barchart(x,y,...)
         }
)

检查上图显示A的最大值为95,B的最大值为120 .

但是,当我使用log 10 scale进行绘图时,如下所示

barchart(Val ~ Grp, 
         data = tst, 
         horiz = FALSE,
         main = '',
         groups = Sub,
         stack = TRUE,
         scales = list(y = list(log = 10)),
         yscale.components = yscale.components.log10ticks,
         auto.key=list(space = 'top', columns = 3, 
                   points = FALSE, rectangles = TRUE,
                   title = ''),
         par.strip.text = list(col = 'white', font = 1.5),
         panel = function(x,y,...){
            panel.grid(h = -1, v = 0);
           panel.barchart(x,y,...)
        }

堆积条的比例似乎是正确的log10尺度y尺度是不正确的?我在这里不懂东西