我正在尝试创建一系列直方图,这些直方图在轴上具有相同的范围,而关键的轴是x
和y
mydat1 <- mydat + geom_histogram(binwidth = 5) + facet_wrap(~V2, scales = "free") + theme(axis.line.x = element_line(colour = "black", size = 0.05), axis.line.y = element_line(colour = "black", size = 0.05)) + scale_x_continuous(expand = c(0,0)) + scale_y_continuous(expand = c(0,0))
添加+ ylim
和xlim
以尝试将轴约束到相同的范围似乎不起作用。
有人能告诉我哪里出错了吗?
This is what I want to produce but I need y
to range from 0-15 and x
from 0-400
答案 0 :(得分:0)
您可以使用
scale_y_continuous(limits = c(0, 15))
和
scale_x_continuous(limits = c(0, 400))
这有用吗?
答案 1 :(得分:0)
char buffer[65536];
while(fgets(buffer,65536,inputFile)){...}