2016-07-05 42 views
1

我想使用ggplot2軟件包獲得簡單的繪圖。 我的數據幀具有這種結構使用ggplot在x軸上繪製int的問題

str(nrmse21) 
'data.frame': 30 obs. of 3 variables: 
$ Missing.rate: int 5 5 5 5 5 10 10 10 10 10 ... 
$ Dataset  : Factor w/ 5 levels "hd","ir","mi",..: 1 2 3 4 5 1 2 3 4 5 ... 
$ NRMSE  : num 0.00643 0.00696 0.00716 0.00442 0.00533 ... 

我試圖建立我的情節與如下:

ggplot(data = nrmse21, aes(x= Missing.rate, y = NRMSE, colour = Dataset, shape =Dataset)) 

但沒有點出,我唯一看到的是與X標籤背景Missing.rate和y標籤NRMSE Whatam我做錯了嗎?我怎樣才能解決這個問題?

回答