[R] Box Plot size and labels

David Doyle kydaviddoyle at gmail.com
Mon Oct 27 02:49:48 CET 2014


Hello,

I'm doing some box plots in Rmarkdown to MS Word file.  When they come into
the word file they are not quite wide enough for labels for the different
boxes.  Is there a way for me to set the size the box plot would be so I
can make it wider?

Or reduce the font size so they can all fit on the graph??

My data and code are below

Thank you for your time.
David Doyle

MS <- read.table("http://www.doylesdartden.com/R/MS.csv", header=TRUE,
sep=",",)

#Sets whic are detections and nondetects
MS$Detections <- ifelse(MS$D_AMMONIA==1, "Detected", "NonDetect")

MSAmmoniax <- c("Well", "AMMONIA")
MSAmmonia <- MS[MSAmmoniax]

plot(MSAmmonia, notch=TRUE, ylab = "Ammonia (mg/L)", cex = 0.1,
col=(c("green","white")))
legend("topleft", inset=.002, title="Gradient",
       c("Up","Down"), fill=terrain.colors(2), horiz=TRUE, cex = 0.7,)
title(main="Lower Mudstone Ammonia Box Plots")

	[[alternative HTML version deleted]]



More information about the R-help mailing list