yearBubble Generates a bubbleplot of x against Year.
yearBubble.Rd
yearBubble Generates a bubbleplot of x against Year.
Usage
yearBubble(
x,
xlabel = "",
ylabel = "",
diam = 0.1,
vline = NA,
txt = c(4, 6, 9, 11),
Fyear = FALSE,
xaxis = TRUE,
yaxis = TRUE,
hline = FALSE,
nozero = FALSE
)
Arguments
- x
a matrix of variable * Year; although it needn't be year
- xlabel
defaults to nothing but allows a custom x-axis label
- ylabel
defaults to nothing but allows a custom y-axis label
- diam
defaults to 0.1, is a scaling factor to adjust bubble size
- vline
defaults to NA but allows vertical ablines to higlight regions
- txt
defaults are lines to vessel numbers, catches, catches, maximumY
- Fyear
defaults to FALSE, if TRUE generates a fishing year x-axis
- xaxis
defaults to TRUE, allows for a custom x-axis if desired by using something like axis(1,at=years,labels=years).
- yaxis
defaults to TRUE, allows for a custom y-axis if desired by using something like axis(side=2,at=years,labels=years).
- hline
defaults to FALSE
- nozero
defaults to FALSE, if TRUE replaces all zeros with NA so they do not appear in the plot
Examples
if (FALSE) {
data(sps)
cbv <- tapply(sps$catch_kg,list(sps$Vessel,sps$Year),sum,na.rm=TRUE)/1000
dim(cbv)
early <- rowSums(cbv[,1:6],na.rm=TRUE)
late <- rowSums(cbv[,7:14],na.rm=TRUE)
cbv1 <- cbv[order(late,-early),]
plotprep(width=7,height=6)
yearBubble(cbv1,ylabel="Catch by Trawl",vline=2006.5,diam=0.2)
}