make_multifig: Create multi-figure plots.

Description Usage Arguments Author(s) See Also

View source: R/make_multifig.R

Description

Function created as an alternative to lattice package for multi-figure plots of composition data and fits from Stock Synthesis output.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
make_multifig(ptsx, ptsy, yr, linesx = 0, linesy = 0, ptsSD = 0,
sampsize = 0, effN = 0, showsampsize = TRUE, showeffN = TRUE,
sampsizeround = 1, maxrows = 6, maxcols = 6, rows = 1, cols = 1,
fixdims = TRUE, main = "", cex.main = 1, xlab = "", ylab = "",
size = 1, maxsize = 3, do.sqrt = TRUE, minnbubble = 8, allopen = TRUE,
horiz_lab = "default", xbuffer = c(0.1, 0.1), ybuffer = c(0, 0.15),
ymin0 = TRUE, axis1 = "default", axis2 = "default", linepos = 1,
type = "o", bars = FALSE, barwidth = "default", ptscex = 1, ptscol = 1,
ptscol2 = 1, linescol = 2, lty = 1, lwd = 1, pch = 1, nlegends = 3,
legtext = list("yr","sampsize", "effN"), legx = "default",
legy = "default", legadjx = "default", legadjy = "default",
legsize = c(1.2, 1), legfont = c(2, 1), ipage = 0, scalebins = FALSE) 

Arguments

ptsx

vector of x values for points or bars

ptsy

vector of y values for points or bars of same length as ptsx

yr

vector of category values (years) of same length as ptsx

linesx

optional vector of x values for lines

linesy

optional vector of y values for lines

ptsSD

optional vector of standard deviations used to plot error bars on top of each point under the assumption of normally distributed error

sampsize

optional sample size vector of same length as ptsx

effN

optional effective sample size vector of same length as ptsx

showsampsize

show sample size values on plot?

showeffN

show effective sample size values on plot?

sampsizeround

rounding level for sample size values

maxrows

maximum (or fixed) number or rows of panels in the plot

maxcols

maximum (or fixed) number or columns of panels in the plot

rows

number or rows to return to as default for next plots to come or for single plots

cols

number or cols to return to as default for next plots to come or for single plots

fixdims

fix the dimensions at maxrows by maxcols or resize based on number of elements in yr input.

main

title of plot

cex.main

character expansion for title

xlab

x-axis label

ylab

y-axis label

size

vector of bubbles sizes if making a bubble plot

maxsize

maximum size of bubbles

do.sqrt

scale bubbles based on sqrt of size vector. see ?bubble3 for more info.

minnbubble

number of unique x values before adding buffer. see ?bubble3 for more info.

allopen

should all bubbles be open? see ?bubble3 for more info.

horiz_lab

axis labels set horizontal all the time (TRUE), never (FALSE) or only when relatively short ("default")

xbuffer

extra space around points on the left and right as fraction of total width of plot

ybuffer

like xbuffer

ymin0

fix minimum y-value at 0?

axis1

position of bottom axis values

axis2

position of left size axis values

linepos

should lines be added on top of points (linepos=1) or behind (linepos=2)?

type

type of line/points used for observed values (see 'type' in ?plot for details) on top of a grey polygon. Default is "o" for overplotting points on lines.

bars

should the ptsx/ptsy values be bars instead of points (TRUE/FALSE)

barwidth

width of bars in barplot, default method chooses based on quick and dirty formula also, current method of plot(...type='h') could be replaced with better approach

ptscex

character expansion factor for points (default=1)

ptscol

color for points/bars

ptscol2

color for negative value points in bubble plots

linescol

color for lines

lty

line type

lwd

line width

pch

point character type

nlegends

number of lines of text to add as legends in each plot

legtext

text in legend, a list of length=nlegends. values may be any of 1. "yr", 2. "sampsize", 3. "effN", or a vector of length = ptsx.

legx

vector of length=nlegends of x-values of legends (default is first one on left, all after on right)

legy

vector of length=nlegends of y-values of legends (default is top for all plots)

legadjx

left/right adjustment of legends around legx

legadjy

left/right adjustment of legends around legy

legsize

font size for legends. default=c(1.2,1.0) (larger for year and normal for others)

legfont

font type for legends, same as "font" under ?par

ipage

which page of plots when covering more than will fit within maxrows by maxcols.

scalebins

Rescale expected and observed proportions by dividing by bin width for models where bins have different widths? Caution!: May not work correctly in all cases.

Author(s)

Ian Taylor

See Also

SS_plots,SSplotComps


r4ss documentation built on May 2, 2019, 4:56 p.m.