From 0cc22fdcaa8083de74230facc9918debe5bda4fb Mon Sep 17 00:00:00 2001 From: Adrian Baddeley Date: Mon, 1 Jul 2024 13:07:52 +0800 Subject: [PATCH] Bug fix in plot.symbolmap --- DESCRIPTION | 4 ++-- NEWS | 6 +++++- R/symbolmap.R | 11 ++++++++--- inst/doc/packagesizes.txt | 2 +- inst/info/packagesizes.txt | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 91131d9..855c4a9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: spatstat.geom -Version: 3.2-9.028 -Date: 2024-06-28 +Version: 3.2-9.029 +Date: 2024-07-01 Title: Geometrical Functionality of the 'spatstat' Family Authors@R: c(person("Adrian", "Baddeley", role = c("aut", "cre", "cph"), diff --git a/NEWS b/NEWS index ce07750..7e5d91c 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ - CHANGES IN spatstat.geom VERSION 3.2-9.028 + CHANGES IN spatstat.geom VERSION 3.2-9.029 OVERVIEW @@ -116,6 +116,10 @@ BUG FIXES o plot.ppp, default.symbolmap.ppp Ignored 'zerosize' in some cases. Fixed. + + o plot.symbolmap + Issued strange warnings in some cases. + Fixed. o symbolmap Crashed in some instances when 'inputs' was given diff --git a/R/symbolmap.R b/R/symbolmap.R index 81d6aaa..cdc740f 100644 --- a/R/symbolmap.R +++ b/R/symbolmap.R @@ -1,7 +1,7 @@ ## ## symbolmap.R ## -## $Revision: 1.56 $ $Date: 2024/05/01 05:11:57 $ +## $Revision: 1.57 $ $Date: 2024/07/01 04:12:07 $ ## symbolmap <- local({ @@ -665,6 +665,11 @@ plot.symbolmap <- function(x, ..., main, angleref=if(vertical) 90 else 0) ## ................. draw annotation .................. + dotargs <- list(...) + if(length(dotargs$col) > 1) { + ## colourmap or multiple colour values - remove + dotargs$col <- NULL + } if(annotate && length(ll) > 0) { if(vertical) { ## default axis position is to the right @@ -676,7 +681,7 @@ plot.symbolmap <- function(x, ..., main, pos <- c(ylim[1], xlim[1], ylim[2], xlim[2])[sidecode] ## draw axis do.call.matched(graphics::axis, - resolve.defaults(list(...), + resolve.defaults(dotargs, list(side=sidecode, pos=pos, at=yp, labels=ll, tick=FALSE, las=1)), extrargs=graphicsPars("axis")) @@ -690,7 +695,7 @@ plot.symbolmap <- function(x, ..., main, pos <- c(ylim[1], xlim[1], ylim[2], xlim[2])[sidecode] ## draw axis do.call.matched(graphics::axis, - resolve.defaults(list(...), + resolve.defaults(dotargs, list(side = sidecode, pos = pos, at = xp, labels=ll, tick=FALSE)), extrargs=graphicsPars("axis")) diff --git a/inst/doc/packagesizes.txt b/inst/doc/packagesizes.txt index f669ee2..b30f3f3 100755 --- a/inst/doc/packagesizes.txt +++ b/inst/doc/packagesizes.txt @@ -26,4 +26,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines "2023-10-20" "3.2-7" 451 1203 0 35983 15822 "2024-01-26" "3.2-8" 452 1204 0 36234 15822 "2024-02-28" "3.2-9" 452 1209 0 36325 15824 -"2024-06-28" "3.2-9.028" 442 1186 0 35631 15596 +"2024-07-01" "3.2-9.029" 442 1186 0 35636 15596 diff --git a/inst/info/packagesizes.txt b/inst/info/packagesizes.txt index f669ee2..b30f3f3 100755 --- a/inst/info/packagesizes.txt +++ b/inst/info/packagesizes.txt @@ -26,4 +26,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines "2023-10-20" "3.2-7" 451 1203 0 35983 15822 "2024-01-26" "3.2-8" 452 1204 0 36234 15822 "2024-02-28" "3.2-9" 452 1209 0 36325 15824 -"2024-06-28" "3.2-9.028" 442 1186 0 35631 15596 +"2024-07-01" "3.2-9.029" 442 1186 0 35636 15596