Topics covered are:
An example in R is:
x<-1:10 y<-sin(x) par(mfrow=c(2,1)) plot(x,y,xlab="time", ylab="sin(t)") title("A sample plot") text(5, 0, expression(hat(beta) == (X^t * X)^{-1} * X^t * y)) plot(x,y,xlab="time", ylab="sin(t)",font=2,cex=1.2,font.lab=2,cex.lab=1.2) title("A sample plot",cex.main=1.5) text(5, 0, expression(hat(bold(beta)) == (bold(X)^t * bold(X))^{bold(-1)} * bold(X)^t * bold(y)))
With use of legends and captions, plots should be self-explanatory so that reader does not have to read the body of the writing to understand the plots. For example, if a plot has curves with solid, dashed and dotted lines, these should be indicated with legend() in R/Splus or a caption in LaTeX.
In some version of R and Splus, histograms and boxplots might be filled with black areas. This uses extra toner on a laser printer and does not look good after photocopying in journal articles. Recommended options are given in the code given below.
Note that boxcol=0 for boxplot and col=0 for hist are not needed for v 2 of R, as the default is white rectangles for v 2; these are useful in older versions of R and Splus.
set.seed(12345) x<-rnorm(40) y<-rnorm(40,1) par(mfrow=c(2,1)) boxplot(x,y,names=c("length","width"),ylab="cm", boxcol=0,medline=T,medcol=1,medlwd=1,main="random numbers",cex=.5) hist(x,col=0,xlab="length",ylab="freq") mtext(side=3,line=5,"Example of boxplot and histogram with no black fill")