#===== Random length data for Yellow Perch (for example) to the nearest mm
set.seed(633437)
yepdf <- data.frame(yepmm=round(c(rnorm(100,mean=125,sd=15),
rnorm(50,mean=200,sd=25),
rnorm(20,mean=270,sd=40)),0),
species=rep("Yellow Perch",170))
#===== Example graphics
op <- par(mar=c(3,3,2,1),mgp=c(1.7,0.5,0))
#----- Using 10-mm increments
psdPlot(~yepmm,data=yepdf,species="Yellow Perch",w=10)
psdPlot(~yepmm,data=yepdf,species="Yellow Perch",w=10,substock.col="gray90",
stock.col="gray30")
#----- Same, but without the PSD values
psdPlot(~yepmm,data=yepdf,species="Yellow Perch",w=10,psd.add=FALSE)
par(op)
Run the code above in your browser using DataLab