I want to produce a boxplot like this in R
:
fishdata <- read.csv("http://dl.dropbox.com/s/4w0utkqdhqribl4/fishdata.csv", header=T)
attach(fishdata)
boxplot(fishdata[,-1], las=3)
which looks like this:
but when I Sweave this, using this coding:
<<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}
produces this still,
Is there a way to get the x-axis titles as above in the coding?
\documentclass{article}; \begin{document} ; ... \end{document}
to your MWE, I get final output with vertical x-axis labels as you wanted. (Have you tried clearing out any previously created plot files?) – Ben Bolker Mar 9 '14 at 16:59