I have two raster image: Trend Raster and Significant raster. I want to overly the significant raster to trend raster that i can show siginificant and trend at sametime.

I want to draw a picture,like the below: enter image description here

Recently, i find the rasterVis package. It's a good tool to visualize the raster. Furthermore, the leveplot function seem like meet my demand. I confuse how can i show the significant raster as a dot in rasterVis package. Any idea?

My problem:

  1. How can i draw a clear map using "+"shape?
  2. How can i remove the grey color in background?
  3. Is there anyway to use "rasterVis"package and other package to visuliaze this?

But now, i just show it like this. The black dot is significant mark. As you see,this is not a good idea. If i use "+"shape, it will fill full map. enter image description here Here is my code(It's run so long, maybe is the fill=value.I actuall need a quickly draw):

P<-raster(file.choose())
P[P>=0.05]<-NA
test_P <- as(P, "SpatialPixelsDataFrame")
test_P <- as.data.frame(test_P)
Trend111<- raster(file.choose())
test_trend111 <- as(Trend111, "SpatialPixelsDataFrame")
test_trend111 <- as.data.frame(test_trend111)
colnames(test_trend111) <- c("value", "x", "y")
ggplot() +geom_raster(data = test_trend111,aes(x=x,y=y,fill=value))+
  scale_fill_gradient("Trend2",low = 'yellow', high = 'green',na.value = NA)+
  geom_point(data=test_P,aes(x = x, y = y),shape=".",na.value = NA)#,alpha = 0.05,size=2,stroke=0)
 
0

There are 0 answers