Skip to content
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

title_text throws an error, won't plot [BUG] #332

Open
erauchway opened this issue Jan 10, 2025 · 1 comment
Open

title_text throws an error, won't plot [BUG] #332

erauchway opened this issue Jan 10, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@erauchway
Copy link

Describe the bug
plot_map() using title_text throws an error and won't plot.

Error in check.length("fill") :
'gpar' element 'fill' must not be length 0
In addition: Warning messages:
1: In rayimage::render_title(hillshade, title_text = title_text, title_offset = title_offset, :
Title position is ignored when not using {magick}
2: In matrix(offset, nrow = 4L, ncol = ncol(x)) :
non-empty data for zero-extent matrix

Session Info

R version 4.4.2 (2024-10-31)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.2

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Los_Angeles
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] raster_3.6-30 sp_2.1-4 rayshader_0.38.9

loaded via a namespace (and not attached):
[1] terra_1.8-5 crayon_1.5.3 vctrs_0.6.5 doParallel_1.0.17 cli_3.6.3
[6] knitr_1.49 rlang_1.1.4 xfun_0.50 rayimage_0.15.1 png_0.1-8
[11] jsonlite_1.8.9 prettyunits_1.2.0 htmltools_0.5.8.1 hms_1.1.3 grid_4.4.2
[16] evaluate_1.0.1 base64enc_0.1-3 fastmap_1.2.0 progress_1.2.3 foreach_1.5.2
[21] lifecycle_1.0.4 rgl_1.3.16 compiler_4.4.2 codetools_0.2-20 Rcpp_1.0.13-1
[26] htmlwidgets_1.6.4 pkgconfig_2.0.3 rstudioapi_0.17.1 systemfonts_1.1.0 lattice_0.22-6
[31] digest_0.6.37 R6_2.5.1 parallel_4.4.2 magrittr_2.0.3 tools_4.4.2
[36] iterators_1.0.14

Reproducible Example
Please provide a reproducible example that triggers the bug below.

montereybay %>%
  sphere_shade() %>%
  plot_map(
    title_text = "Monterey Bay"
  )
@erauchway erauchway added the bug Something isn't working label Jan 10, 2025
@erauchway erauchway changed the title Concise description of the bug [BUG] title_text throws an error, won't plot [BUG] Jan 10, 2025
@erauchway
Copy link
Author

The problem seems to lie with the later version of rayimage; going back to the CRAN versions of rayshader and rayimage seems to have fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant