在ggplot R中编辑y轴

时间:2017-02-22 20:54:51

标签: r ggplot2 axis

在显示的图像中,我想压缩y轴。我的代码在这里:

plotoverall <- aggregAll %>%
               group_by(date) %>%
               summarise(Overall_kWh= sum(kWh, na.rm=TRUE)) %>%
               ggplot(aes(x = date, y = Overall_kWh, color="light blue" )) +
               geom_line(color="light blue", size=2) +
               theme(axis.text=element_text(size=12),
               axis.title=element_text(size=14))+
               #geom_point(color="blue") +  
               scale_y_continuous(name="Monthly million kWh",breaks=c(0,40000000,50000000,60000000),
                 labels = c("0","40","50","60"),
                 limits = c(0,60000000))

0 个答案:

没有答案