chronosphere-info / r_client

R client for the chronosphere
https://chronosphere.info/r_client/
GNU General Public License v3.0
6 stars 4 forks source link

Data points not plotted onto PALEOMAP raster image #2

Closed mcranium closed 4 years ago

mcranium commented 4 years ago

Roughly following the tutorial at https://www.evolv-ed.net/courses/tutorials/20191219_paleomap_tutorial/ I tried to plot some points onto the paleoatlas rasters.

library(chronosphere)

pr <- fetch(dat="paleomap", var="paleoatlas", res=0.1)
age <- 100
Berlin <- c(13.406874, 52.527236)
Berlin_pal <- reconstruct(Berlin, age=age)
Berlin_pal

mapplot(pr["100", ], rgb=TRUE)

points(Berlin_pal[1], Berlin_pal[2], pch=3, col="red")

However, no red crosses are plotted onto the raster image. The palaeocoordinate calculation works fine. Also, there are no datapoints plotted in the image in the tutorial website.

My sessionInfo is:

R version 3.6.2 (2019-12-12)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=de_DE.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] chronosphere_0.2.1-59 raster_3.0-7          sp_1.3-2             

loaded via a namespace (and not attached):
[1] compiler_3.6.2   rgdal_1.4-8      tools_3.6.2      Rcpp_1.0.3       codetools_0.2-16 ncdf4_1.17      
[7] grid_3.6.2       lattice_0.20-38

Best wishes, Mario

nussaibahrs commented 4 years ago

Hi Mario!

Thanks for letting us know about this. I'll be fixing the bug real soon but for now here's a workaround instead of mapplot():

plotRGB(pr["100", ]@stack)
points(Berlin_pal[1], Berlin_pal[2], pch=3, col="red")
nussaibahrs commented 4 years ago

Hi Mario,

Just wanted to update you that the this bug has been fixed in the new version of chronosphere (0.2.2).