Skip to content

Commit

Permalink
improved mal/lonlatprojection
Browse files Browse the repository at this point in the history
  • Loading branch information
brasmus committed Apr 29, 2024
1 parent 3952994 commit 497c6d8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions R/lonlatprojection.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ lonlatprojection <- function(x,it=NULL,is=NULL,new=FALSE,projection="lonlat",
fig=NULL,add=FALSE,plot=TRUE,...) {

if (verbose) {print('lonlatprojection'); str(x)}
## REB 2024-04-29
xargs <- list(...)
if (!is.null(xargs$showaxis)) showaxis <- xargs$showaxis else xargs$showaxis <- TRUE

if (plot) par0 <- par()
attr(x,'source') <- NULL ## REB "2021-12-21: Fed up with problems with silly source information...
Expand Down Expand Up @@ -196,9 +199,10 @@ lonlatprojection <- function(x,it=NULL,is=NULL,new=FALSE,projection="lonlat",
if (sum(is.element(tolower(type),'contour'))>0)
contour(lon,lat,x,lwd=1,col="grey70",add=TRUE,...)
if (gridlines) grid()
axis(2,at=pretty(lat),col='grey',cex=cex.axis)
axis(3,at=pretty(lon),col='grey',cex=cex.axis)

if (showaxis) {
axis(2,at=pretty(lat),col='grey',cex=cex.axis)
axis(3,at=pretty(lon),col='grey',cex=cex.axis)
}
## REB 2023-01-24
par(xpd=TRUE)
}
Expand Down

0 comments on commit 497c6d8

Please sign in to comment.