Skip to content

Reset plotting layout even when plot.sf fails #2520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

agila5
Copy link
Contributor

@agila5 agila5 commented Apr 10, 2025

Fixes #2519. To be honest, I'm not 100% sure that this is the correct fix and doesn't break anything else 😅

devtools::load_all("C:/Users/andre/Desktop/git-stuff/sf")
#> ℹ Loading sf

nc = st_read(system.file("gpkg/nc.gpkg", package="sf"), quiet = TRUE)
nc[[7]] <- vector("list", 100)
plot(nc[, 1:7])
#> Error in plot.sf(x[, cname], main = cname, pal = pal, nbreaks = nbreaks, : plotting list-columns not supported

# This is now plotted in its own plot
plot(st_geometry(nc))

Created on 2025-04-10 with reprex v2.1.1.9000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems in plot.sf after a failed plot - plot window does not get resetted
1 participant