2012-12-04 1 views

답변

114

xlimylim 여기서는 자르지 마십시오. expand_limits, scale_x_continuousscale_y_continuous을 사용해야합니다. 시도 :

df <- data.frame(x = 1:5, y = 1:5) 
p <- ggplot(df, aes(x, y)) + geom_point() 
p <- p + expand_limits(x = 0, y = 0) 
p # not what you are looking for 

enter image description here

p + scale_x_continuous(expand = c(0, 0)) + scale_y_continuous(expand = c(0, 0)) 

enter image description here

당신은 x = 5, 예를 들어, 확인 포인트 참조 (차단되지 않아요 할 일을 약간 조정하기 위해 지점을 필요로하고 있습니다 y = 5

+21

한계를 지정해야 할 필요가있었습니다 : scale_x_continuous (expand = c (0, 0), limits = c (0,5)), 일 –