2017-09-30 23 views
0

啓動軸標籤我有以下代碼:從具體點

ggplot(mushroom,aes(x=date,y=value)) + 
geom_point(aes(fill=type),shape=21,size=3)+ 
geom_line(aes(color=type))+ 
theme_bw()+ 
theme(axis.title.x=element_blank()) 

這是給我的是這樣的:enter image description here

我想是這樣的:

enter image description here

請注意,x軸標籤。我想我的也開始從01月

回答

1

使用此

+ scale_x_continuous(breaks = c('start_date', 'end_date')) 

我沒有在你有什麼樣的格式日期列知道: 起始日期是年11月1日期和結束日期11月22日