Skip to content

Commit

Permalink
use cex.axis also for image axes; #642
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Aug 17, 2023
1 parent 4f32c65 commit a6f2b60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# version 0.6-4

* `plot.stars()` and `image.stars()` are sensitive to `cex.axis`, for axes and key (requires sf >= 1.0-14); #642

* move `lwgeom` dependency to Suggests; using `st_transform_proj()` requires loading `lwgeom` first

# version 0.6-3
Expand Down
7 changes: 5 additions & 2 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ make_label = function(x, i = 1) {
#' }
plot.stars = function(x, y, ..., join_zlim = TRUE, main = make_label(x, 1), axes = FALSE,
downsample = TRUE, nbreaks = 11, breaks = "quantile", col = grey(1:(nbreaks-1)/nbreaks),
key.pos = get_key_pos(x, ...), key.width = lcm(1.8), key.length = 0.618, key.lab = main,
reset = TRUE, box_col = grey(.8), center_time = FALSE, hook = NULL, mfrow = NULL) {
key.pos = get_key_pos(x, ...), key.width = lcm(1.8 * par("ps")/12), key.length = 0.618,
key.lab = main, reset = TRUE, box_col = grey(.8), center_time = FALSE, hook = NULL,
mfrow = NULL) {

if (!missing(y))
stop("y argument should be missing")
Expand Down Expand Up @@ -461,6 +462,8 @@ image.stars = function(x, ..., band = 1, attr = 1, asp = NULL, rgb = NULL,
col = text_color)
}
if (axes) { # FIXME: see sf::plot.sf for refinements to be ported here?
if (!is.null(dots$cex.axis))
par(cex.axis = dots$cex.axis)
if (isTRUE(st_is_longlat(x))) {
if (isTRUE(all.equal(st_bbox(x), st_bbox(), tolerance = .1,
check.attributes = FALSE))) {
Expand Down

0 comments on commit a6f2b60

Please sign in to comment.