desired projection when PolySet lacks a
projection attribute; one of "LL", "UTM",
or a numeric value. If Boolean, specifies whether to check
polys for a projection attribute.
plt
four element numeric vector (x1, x2, y1, y2) giving
the coordinates of the plot region measured as a fraction of the
figure region. Set to NULL if mai in par is
desired.
polyProps
PolyData specifying which polylines to plot and their
properties. par parameters passed as direct arguments
supersede these data.
lty
vector describing line types (cycled by PID).
col
vector describing colours (cycled by PID).
bg
background colour of the plot.
axes
Boolean value; if TRUE, plot axes.
tckLab
Boolean vector (length 1 or 2); if TRUE,
label the major tick marks. If given a two-element
vector, the first element describes the tick marks on the
x-axis and the second element describes those on the y-axis.
tck
numeric vector (length 1 or 2) describing the length
of tick marks as a fraction of the smallest dimension. If
tckLab = TRUE, these tick marks will be automatically
labelled. If given a two-element vector, the first element
describes the tick marks on the x-axis and the second element
describes those on the y-axis.
tckMinor
numeric vector (length 1 or 2) describing the length
of tick marks as a fraction of the smallest dimension. These tick
marks can not be automatically labelled. If given a two-element vector,
the first element describes the tick marks on the x-axis and
the second element describes those on the y-axis.
...
additional par parameters, or the arguments
main, sub, xlab, or ylab for the
title function.
Details
This function plots a PolySet, where each unique (PID,
SID) describes a polyline. It does not connect each polyline's
last vertex to its first. Unlike plotMap, the function
ignores the aspect ratio. It clips polys to xlim and
ylim before plotting.
The function creates a blank plot when polys equals
NULL. In this case, the user must supply both xlim and
ylim arguments. Alternatively, it accepts the argument
type = "n" as part of ..., which is equivalent to specifying
polys = NULL, but requires a PolySet. In both cases,
the function's behaviour changes slightly. To resemble the
plot function, it plots the border, labels, and other
parts according to par parameters such as col.
For additional help on the arguments lty and col, please
see par.
Value
PolyData consisting of the PolyProps used to create the plot.
Note
To satisfy the aspect ratio, this plotting routine resizes the plot
region. Consequently, par parameters such as
plt, mai, and mar will change. When the function
terminates, these changes persist to allow for additions to the plot.
local(envir=.PBSmapEnv,expr={
oldpar = par(no.readonly=TRUE)
#--- create a PolySet to plot
polys <- data.frame(PID=rep(1,4),POS=1:4,X=c(0,1,1,0),Y=c(0,0,1,1))
#--- plot the PolySet
plotLines(polys, xlim=c(-.5,1.5), ylim=c(-.5,1.5))
par(oldpar)
})
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(PBSmapping)
-----------------------------------------------------------
PBS Mapping 2.69.76 -- Copyright (C) 2003-2016 Fisheries and Oceans Canada
PBS Mapping comes with ABSOLUTELY NO WARRANTY;
for details see the file COPYING.
This is free software, and you are welcome to redistribute
it under certain conditions, as outlined in the above file.
A complete user guide 'PBSmapping-UG.pdf' is located at
/home/ddbj/local/lib64/R/library/PBSmapping/doc/PBSmapping-UG.pdf
Packaged on 2015-04-23
Pacific Biological Station, Nanaimo
All available PBS packages can be found at
http://code.google.com/p/pbs-software/
To see demos, type '.PBSfigs()'.
-----------------------------------------------------------
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PBSmapping/plotLines.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotLines
> ### Title: Plot a PolySet as Polylines
> ### Aliases: plotLines
> ### Keywords: hplot
>
> ### ** Examples
>
> local(envir=.PBSmapEnv,expr={
+ oldpar = par(no.readonly=TRUE)
+ #--- create a PolySet to plot
+ polys <- data.frame(PID=rep(1,4),POS=1:4,X=c(0,1,1,0),Y=c(0,0,1,1))
+ #--- plot the PolySet
+ plotLines(polys, xlim=c(-.5,1.5), ylim=c(-.5,1.5))
+ par(oldpar)
+ })
>
>
>
>
>
> dev.off()
null device
1
>