Skip to content

Commit

Permalink
for #728
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Jan 10, 2025
1 parent 6f7b884 commit 27663b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ plot.stars = function(x, y, ..., join_zlim = TRUE, main = make_label(x, 1), axes
if (!inherits(breaks, c("POSIXt", "Date")))
breaks = as.numeric(breaks)
# https://github.com/r-spatial/stars/issues/728:
if (packageVersion("sf") < "1.0.20")
if (packageVersion("sf") < "1.0.20" && length(breaks) > 2)
breaks = unique(breaks)
nbreaks = length(breaks) # might be shorter than originally intended!
if (breaks.missing && length(unique(breaks)) <= 2) # unlucky default!
Expand Down

0 comments on commit 27663b9

Please sign in to comment.