tylermorganwall / rayshader

R Package for 2D and 3D mapping and data visualization
https://www.rayshader.com/
2.05k stars 211 forks source link

generate_ggplot_potential() does not exist in rayshader #317

Open mongrolwarrior opened 1 month ago

mongrolwarrior commented 1 month ago

Describe the bug The tutorial at: https://www.tylermw.com/posts/data_visualization/3d-ggplots-with-rayshader.html has an example with three active lines: ggplot_potential = generate_ggplot_potential() ggplot_objects = generate_ggplot_orbiting_objects() plot_gg(list(ggplot_objects, ggplot_potential), height=5, width=4.5)

Neither generate_ggplot_potential() nor generate_ggplot_orbiting_objects() appear to exist anywhere in the package.

Session Info

sessionInfo() R version 4.4.1 (2024-06-14 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale: [1] LC_COLLATE=English_Australia.utf8 LC_CTYPE=English_Australia.utf8 LC_MONETARY=English_Australia.utf8 LC_NUMERIC=C
[5] LC_TIME=English_Australia.utf8

time zone: Australia/Brisbane tzcode source: internal

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

other attached packages: [1] sf_1.0-16 viridis_0.6.5 viridisLite_0.4.2 readr_2.1.5 qtl2_0.36 ggplot2_3.5.1 rayshader_0.38.1

loaded via a namespace (and not attached): [1] gtable_0.3.5 xfun_0.47 htmlwidgets_1.6.4 remotes_2.5.0 lattice_0.22-6 tzdb_0.4.0 vctrs_0.6.5
[8] tools_4.4.1 generics_0.1.3 curl_5.2.1 parallel_4.4.1 rgl_1.3.1 proxy_0.4-27 tibble_3.2.1
[15] fansi_1.0.6 RSQLite_2.3.7 blob_1.2.4 pkgconfig_2.0.3 KernSmooth_2.23-24 data.table_1.15.4 lifecycle_1.0.4
[22] compiler_4.4.1 farver_2.1.2 stringr_1.5.1 textshaping_0.4.0 progress_1.2.3 munsell_0.5.1 codetools_0.2-20
[29] class_7.3-22 htmltools_0.5.8.1 rayimage_0.11.0 hexbin_1.28.4 pillar_1.9.0 crayon_1.5.3 MASS_7.3-60.2
[36] classInt_0.4-10 cachem_1.1.0 iterators_1.0.14 foreach_1.5.2 tidyselect_1.2.1 digest_0.6.37 stringi_1.8.4
[43] dplyr_1.1.4 reshape2_1.4.4 labeling_0.4.3 fastmap_1.2.0 grid_4.4.1 colorspace_2.1-1 cli_3.6.3
[50] magrittr_2.0.3 base64enc_0.1-3 utf8_1.2.4 e1071_1.7-14 withr_3.0.1 terrainmeshr_0.1.0 prettyunits_1.2.0 [57] scales_1.3.0 bit64_4.0.5 bit_4.0.5 gridExtra_2.3 ragg_1.3.2 png_0.1-8 hms_1.1.3
[64] memoise_2.0.1 knitr_1.48 doParallel_1.0.17 rlang_1.1.4 Rcpp_1.0.13 isoband_0.2.7 glue_1.7.0
[71] DBI_1.2.3 rstudioapi_0.16.0 vroom_1.6.5 jsonlite_1.8.8 R6_2.5.1 plyr_1.8.9 units_0.8-5
[78] systemfonts_1.1.0

Reproducible Example After loading all the packages as indicated and completing the tutorial as indicated, entering the line: ggplot_potential = generate_ggplot_potential()

returns the error: Error in generate_ggplot_potential() : could not find function "generate_ggplot_potential"

library(rayshader)
#Your code goes below
ggplot_potential = generate_ggplot_potential()
ggplot_objects = generate_ggplot_orbiting_objects()

plot_gg(list(ggplot_objects, ggplot_potential), height=5, width=4.5)