Sweave 箱线图——不是所需的输出

Sweave 箱线图——不是所需的输出

我想制作像这样的箱线图R

fishdata <- read.csv("http://dl.dropbox.com/s/4w0utkqdhqribl4/fishdata.csv", header=T)
attach(fishdata)
boxplot(fishdata[,-1], las=3)

看起来像这样:

它应该是什么样子

但是当我使用以下编码进行 Sweave 时:

<<echo=F>>=
fishdata <- read.csv("http://dl.dropbox.com/s/4w0utkqdhqribl4/fishdata.csv", header=T)
attach(fishdata)
@ 

\begin{figure}[htbp]
\centering
<<fig=T, echo=F>>=
boxplot(fishdata[,-1], las=3)
@
\rule{35em}{0.5pt}
\caption{Boxplot of the fish catches in Bangladesh from 1950 to 2011.}
\label{histogram}
\end{figure}

制作此剧照,

箱线图输出

有没有办法在编码中获取如上所示的 x 轴标题?

答案1

我会成为你的解答未解答的问题今晚的官员;

从评论中可以验证,在某些情况下,可能需要删除以前的情节文件。

相关内容