# plot.tfamatrix: Plot matrices of transfer functions In popdemo: Demographic Modelling Using Projection Matrices

## Description

Plot a matrix of transfer functions

## Usage

 ```1 2``` ``` ## S3 method for class 'tfamatrix' plot(x, xvar=NULL, yvar=NULL, mar=c(1.1,1.1,0.1,0.1), ...) ```

## Arguments

 `x` an object of class 'tfamatrix' created using `tfamatrix` or `inertia.tfamatrix`. `xvar,yvar` (optional) the variables to plot on the x and y axes. May be `"p"`, `"lambda"` or `"inertia"`. Defaults to `xvar="p"` and `yvar="lambda"` for objects created using `tfamatrix` and `xvar="p"` and `yvar="inertia"` for objects created using `inertia.tfamatrix`. `mar` the margin limits on the plots: see `par` `...` arguments to be passed to methods: see `par` and `plot`.

## Details

Plots matrices of transfer functions (class tfamatrix) created using `tfamatrix` or `inertia.tfamatrix`. The plot is laid out to correspond with the nonzero entries of the matrix used to generate the transfer functions, for easy visual comparison of how perturbation affects different matrix elements.

## Author(s)

Stott, I., Hodgson, D. J., Townley, S.

`tfamatrix`, `inertia.tfamatrix`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25``` ``` # Create a 3x3 matrix A <- matrix(c(0,1,2,0.5,0.1,0,0,0.6,0.6), byrow=TRUE, ncol=3) A # Create an initial stage structure initial <- c(1,3,2) initial # Calculate the matrix of transfer functions using default arguments tfmat<-tfamatrix(A) tfmat # Plot the result plot(tfmat) # Calculate the matrix of transfer functions for inertia and # specified initial stage structure using default arguments tfmat2<-inertia.tfamatrix(A,vector=initial) tfmat # Plot the result plot(tfmat2) # Plot inertia as a function of lambda plot(tfmat2, xvar="lambda", yvar="inertia") ```