Skip to contents

Evaluate relationship of two variables in a plot format. Plots first variable against second variable.

Plot of var1 against var 2

Usage

xy_plot(dat, project, var1, var2, regress = FALSE, alpha = 0.5)

Arguments

dat

Primary data containing information on hauls or trips. Table in FishSET database contains the string 'MainDataTable'.

project

String, name of project.

var1

First variable in dat.

var2

Second variable in dat.

regress

Logical, if TRUE, returns plot with fitted linear regression line. Defaults to FALSE.

alpha

The opaqueness of each data point in scatterplot. 0 is total transparency and 1 is total opaqueness. Defaults to .5.

Value

Returns plot output to R console and saves plot to Output folder.

Examples

if (FALSE) {
xy_plot(pollockMainDataTable, var1 = 'OFFICIAL_TOTAL_CATCH_MT',
        var2 = 'HAUL', regress = TRUE)
}