Plots a linear network
# S3 method for linnet
plot(x, ..., main=NULL, add=FALSE,
do.plot=TRUE,
show.vertices=FALSE, show.window=FALSE,
args.vertices=list(), args.segments=list())
An (invisible) list with two elements, segments
and
vertices
describing the representation of the marks.
The element segments
contains
the result of plot.psp
(either a colourmap
, a numeric value or an owin
).
The element vertices
contains the result
of plot.ppp
(a symbolmap
)
or NULL
.
The result also has attribute "bbox"
giving the bounding box for the plot.
Linear network (object of class "linnet"
).
Graphics arguments passed to plot.psp
and plot.ppp
.
Main title for plot. Use main=""
to suppress it.
Logical. If TRUE
, superimpose the graphics
over the current plot. If FALSE
, generate a new plot.
Logical value specifying whether to actually perform the plot.
Logical value specifying whether to plot the vertices as well.
Logical value specifying whether to plot the window containing the linear network.
Optional list of arguments passed to plot.psp
when plotting the line segments of the network.
These arguments override any arguments in ...
.
Optional list of arguments passed to plot.ppp
when plotting the vertices of the network (only when vertices=TRUE
).
These arguments override any arguments in ...
.
Ang Qi Wei aqw07398@hotmail.com and Adrian Baddeley Adrian.Baddeley@curtin.edu.au
This is the plot method for class "linnet"
.
The line segments of the network x
are plotted
using plot.psp
.
If show.vertices=TRUE
, the vertices of the network will also be
plotted, using plot.ppp
.
If show.window=TRUE
, the window surrounding the network will also
be plotted.
If the vertices or line segments of x
are marked,
the marks are not displayed by default. To plot the marks,
set use.marks=TRUE
. To plot the marks and plot the associated legends,
set use.marks=TRUE, legend=TRUE
. To plot only the marks of the
segments and not the marks of the vertices, set
args.segments=list(use.marks=TRUE)
and so on.
linnet
plot(simplenet)
L <- simplenet
marks(L, "vertices") <- letters[1:nvertices(L)]
marks(L, "segments") <- runif(nsegments(L))
plot(L, show.vertices=TRUE, use.marks=TRUE, legend=TRUE)
Run the code above in your browser using DataLab