Skip to content

Commit 38cac8f

Browse files
committed
Bug fix in plot.linnet
1 parent c40e1ca commit 38cac8f

File tree

5 files changed

+41
-30
lines changed

5 files changed

+41
-30
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: spatstat.linnet
2-
Version: 3.4-0.009
3-
Date: 2025-12-20
2+
Version: 3.4-0.010
3+
Date: 2025-12-21
44
Title: Linear Networks Functionality of the 'spatstat' Family
55
Authors@R: c(person("Adrian", "Baddeley",
66
role = c("aut", "cre", "cph"),

NEWS

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11

2-
CHANGES IN spatstat.linnet VERSION 3.4-0.009
2+
CHANGES IN spatstat.linnet VERSION 3.4-0.010
33

44
OVERVIEW
55

66
o Improved algorithm for integrating a function on a network.
77

88
o Improvement to perspective plot on a network.
99

10+
o Minor improvements and bug fixes.
11+
1012
SIGNIFICANT USER-VISIBLE CHANGES
1113

1214
o integral.linfun
@@ -25,12 +27,16 @@ SIGNIFICANT USER-VISIBLE CHANGES
2527
to be plotted on the horizontal plane at height zero.
2628

2729
o persp.linim
28-
New argument 'zadjust' to control vertical scale.
30+
New argument 'zadjust' to adjust the vertical scale.
2931

3032
BUG FIXES
3133

3234
o lurking.lppm
3335
Crashed if envelope=TRUE.
36+
Fixed.
37+
38+
o plot.linnet
39+
Disobeyed 'do.plot=FALSE'.
3440
Fixed.
3541

3642
CHANGES IN spatstat.linnet VERSION 3.4-0

R/linnet.R

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Linear networks
55
#
6-
# $Revision: 1.97 $ $Date: 2025/11/23 06:47:21 $
6+
# $Revision: 1.98 $ $Date: 2025/12/21 02:34:52 $
77
#
88
# An object of class 'linnet' defines a linear network.
99
# It includes the following components
@@ -222,6 +222,7 @@ plot.linnet <- function(x, ..., main=NULL, add=FALSE,
222222
argh <- list(...)
223223
lines <- as.psp(x)
224224
if(show.vertices) vert <- vertices(x)
225+
#' ..........................................................
225226
#' plan layout and save symbolmaps
226227
RS <- do.call(plot,
227228
resolve.defaults(list(x=quote(lines),
@@ -245,34 +246,38 @@ plot.linnet <- function(x, ..., main=NULL, add=FALSE,
245246
} else {
246247
RV <- NULL
247248
}
248-
## initialise plot
249-
if(!add) {
250-
args.main <- argh[names(argh) %in% c("cex.main", "adj.main", "col")]
251-
do.call(plot, append(list(x=quote(B), type="n", main=main),
252-
args.main))
253-
}
254-
## plot segments and (optionally) vertices
255-
do.call(plot,
256-
resolve.defaults(list(x=quote(lines),
257-
add=TRUE,
258-
show.window=show.window,
259-
show.all=TRUE,
260-
main="",
261-
multiplot=FALSE),
262-
args.segments,
263-
list(...),
264-
list(use.marks=FALSE, legend=FALSE)))
265-
if(show.vertices) {
249+
#' ---------------- actual plotting ------------------------
250+
if(do.plot) {
251+
## initialise plot
252+
if(!add) {
253+
args.main <- argh[names(argh) %in% c("cex.main", "adj.main", "col")]
254+
do.call(plot, append(list(x=quote(B), type="n", main=main),
255+
args.main))
256+
}
257+
## plot segments and (optionally) vertices
266258
do.call(plot,
267-
resolve.defaults(list(x=quote(vert),
259+
resolve.defaults(list(x=quote(lines),
268260
add=TRUE,
269-
show.window=FALSE,
270-
show.all=TRUE,
271-
main=""),
272-
args.vertices,
261+
show.window=show.window,
262+
show.all=TRUE,
263+
main="",
264+
multiplot=FALSE),
265+
args.segments,
273266
list(...),
274267
list(use.marks=FALSE, legend=FALSE)))
268+
if(show.vertices) {
269+
do.call(plot,
270+
resolve.defaults(list(x=quote(vert),
271+
add=TRUE,
272+
show.window=FALSE,
273+
show.all=TRUE,
274+
main=""),
275+
args.vertices,
276+
list(...),
277+
list(use.marks=FALSE, legend=FALSE)))
278+
}
275279
}
280+
#' --------- return colour maps and layout ----------------------
276281
result <- list(segments=RS, vertices=RV)
277282
attr(result, "bbox") <- B
278283
return(invisible(result))

inst/doc/packagesizes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
4242
"2025-07-24" "3.3-1" 150 328 0 13326 3270
4343
"2025-09-24" "3.3-2" 150 328 0 13356 3270
4444
"2025-11-29" "3.4-0" 160 370 0 14990 3270
45-
"2025-12-20" "3.4-0.009" 160 372 0 15416 3270
45+
"2025-12-21" "3.4-0.010" 160 372 0 15421 3270

inst/info/packagesizes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
4242
"2025-07-24" "3.3-1" 150 328 0 13326 3270
4343
"2025-09-24" "3.3-2" 150 328 0 13356 3270
4444
"2025-11-29" "3.4-0" 160 370 0 14990 3270
45-
"2025-12-20" "3.4-0.009" 160 372 0 15416 3270
45+
"2025-12-21" "3.4-0.010" 160 372 0 15421 3270

0 commit comments

Comments
 (0)