8
我試圖創建一個geom_bar有:如何解決'ymax未定義'?
<<boring-plots, fig.width=5, fig.height=5, out.width='.45\\linewidth',fig.show='hold', echo=FALSE, warning=FALSE>>=
ma_at_vs_t_duh + geom_bar(stat="bin", fill="white", colour="darkgreen", width=.4) + ggtitle("Anzahl MA nach Vertragsart, \nMandant 10 und 50") +
theme(plot.title = element_text(lineheight=.6, face="bold")) +
xlab("Vertragsart") +
ylab("Anzahl MA") +
theme(axis.title.x = element_text(vjust=0.5, size=14), axis.text.x=element_text(size=10)) +
stat_bin(aes(label=..count..), geom="text", size=4, vjust=-0.5)
@
編譯RNW-文件我得到的PDF輸出文件後:
ymax not defined: adjusting position using y instead
我會很感激的任何幫助。謝謝!
警告/消息來自ggplot並且是無害的。我不記得*確切地說*爲什麼會出現或者如何抑制它(''suppressMessages()'?set'message = FALSE' in'knitr' chunk options ?,但我經常見到它) –
...在knitr chunk選項中設置'warning = FALSE'通常適用於我。 – joran
warning = FALSE似乎無法在R 3.0.2版(2013-09-25)中使用knitr「3.0.1」 – skleene