ggplot2 でプロットを作成しようとしています。problem_accept_df という名前のデータは次のとおりです。
Order Application probscore
1 Integrated 0.8333333
1 Tabbed 0.7777778
2 Integrated 0.8965517
2 Tabbed 0.7777778
3 Integrated 0.7931034
3 Tabbed 0.7777778
4 Integrated 0.7
4 Tabbed 0.6538462
5 Integrated 0.9285714
5 Tabbed 0.8333333
6 Integrated 0.9310345
6 Tabbed 0.8148148
7 Integrated 0.8571429
7 Tabbed 0.8518519
8 Integrated 0.9333333
8 Tabbed 0.6923077
9 Integrated 0.9310345
9 Tabbed 0.8461538
10 Integrated 0.9285714
10 Tabbed 0.8
プロットを作成するコードは次のとおりです。
ggplot(problem_accept_df, aes(x=Order, y=probscore, color=Application,
group=Application)) +
xlab('Order') +
ylab('Problem scores') +
geom_line(position=pd, size=2) +
geom_point(position=pd, size=4) +
labs(title='Acceptable proportion of problem scores')
プロットが作成されますが、値が等間隔でなくても、等間隔の目盛りに y 値が表示されます。プロットには、範囲ではなく、個々の y 値も表示されます。それを変更しようとしましたが ( scale_y_continuous(breaks=seq(0.5, 1, 0.1))
)、エラー メッセージが表示Error: Discrete value supplied to continuous scale
されるので、問題はより基本的なものに違いありません。何をすべきかについての提案をいただければ幸いです。