R 使条形图中的条形图具有相同的高度

R 使条形图中的条形图具有相同的高度,r,ggplot2,R,Ggplot2,如何使条形图中的条形图具有相同的高度 > head(data.m) Classes variable value 1 rRNA KO1.DOC 4.890821e+04 2 rRNA KO1.DOC 3.068479e+03 3 Other KO1.DOC 7.618553e+01 4 Other KO1.DOC 4.043281e-01 5 Other KO1.DOC 0.000000e+00 6 Other KO1.DOC 0.

如何使条形图中的条形图具有相同的高度

> head(data.m)
  Classes variable        value
1    rRNA  KO1.DOC 4.890821e+04
2    rRNA  KO1.DOC 3.068479e+03
3   Other  KO1.DOC 7.618553e+01
4   Other  KO1.DOC 4.043281e-01
5   Other  KO1.DOC 0.000000e+00
6   Other  KO1.DOC 0.000000e+00

ggplot(data.m, aes(variable, fill=Classes, order = -as.numeric(Classes))) +
  geom_bar(aes(y=value), position="stack", stat="identity") + 
  theme_bw(base_size=8)
data.m答案是用于
geom\u bar

# regular barplot
ggplot(mtcars, aes(x=factor(cyl), fill=factor(vs))) +
  geom_bar()
# "filled"
ggplot(mtcars, aes(x=factor(cyl), fill=factor(vs))) +
  geom_bar(position="fill")
# regular barplot
ggplot(mtcars, aes(x=factor(cyl), fill=factor(vs))) +
  geom_bar()
# "filled"
ggplot(mtcars, aes(x=factor(cyl), fill=factor(vs))) +
  geom_bar(position="fill")