plot.fishery: Plot method for fishery objects

Description Usage Arguments Value Examples

View source: R/fishery-class.R

Description

This method takes a fishery object and make useful plots for each variables (fishing lading and fishing effort). The plots can be daily, monthly, yearly, over the peruvian region, and for north-central and south peruvian region. An additional plot type to graph the effort and landing at the same time using two y-axis.

Usage

1
2
3
4
## S3 method for class 'fishery'
plot(x, language = "spanish", ploType = NULL,
  daysToPlot = c(1, 8, 15, 22), textAxis2 = NULL, textAxis4 = NULL,
  colBar = "gray", colLine = "red", ...)

Arguments

x

Object of fishing class.

language

A character. Define the language of text labels in plots. It could be "spanish" or "english".

ploType

What type of plot should be draw. Possible types are:

  • plotDaily for daily plot

  • plotMonthly for monthly plot

  • plotYearly for yearly plot

  • plotPeru for all the peruvian region

  • plotNC to graph the north-central region

  • plotS to graph the south region

  • plotJoined to graph the effort and landing

daysToPlot

If is a daily plot by default the x-axis show the first day of a week (1, 8, 15, 22) but could be change to show a specific day or to show the all days of the data with all. This is including in a vector form.

textAxis2

The text of the x axis.

textAxis4

The text of the y axis.

...

Extra arguments.

Value

A graph of the specified type in ploType.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Read a example of a data base
fisheryData = system.file("extdata", "fisheryData.csv", package = "imarpe")

# Produce a object of fishery class
landing  = getFishingData(file = fisheryData, type = "fisheryinfo", varType = "landing", sp = "caballa")
class(landing)

plot(landing)
plot(landing, daysToPlot = "2", colBar = "red")
plot(landing, language= "english")
plot(landing, ploType = "plotMonthly")
plot(landing, ploType = "plotMonthly", language= "english")
plot(landing, ploType = "plotYearly")
plot(landing, ploType = "plotYearly", language= "english", colBar = "green")
plot(landing, ploType = "plotPERU")
plot(landing, ploType = "plotNC")
plot(landing, ploType = "plotS")

imarpe/imarpe documentation built on Aug. 8, 2020, 8:40 p.m.