r - Plot the intensity of a continuous variable in space -


i'm trying plot continuous variable on space. think should estimate intensity in other points of space. saw example gets same result need.

library("mass") library("ggplot2") library(reshape2)   db<-melt(volcano) ggplot(db, aes(x=var1, y=var2, fill=value)) + geom_point() ggplot(db, aes(x=var1, y=var2, fill=value)) +geom_tile() 

enter image description here

enter image description here

so used same code on data:

step<-null step$lat<-c(45.46903, 45.46903 ,45.47195, 45.46902 ,45.46610, 45.45884, 45.47488 ,45.47196, 45.46613 ,45.46320, 45.46318) step$long<- c(9.192541, 9.195815, 9.195825, 9.199089, 9.199079 ,9.174503 ,9.186013, 9.189277 , 9.182710, 9.189248, 9.199069) step$z<- c(12153.061 ,13832.401, 17153.554 , 9823.469, 19091.823, 31023.074, 15836.885,11454.056 ,12839.104, 23426.680 ,13096.105)  step<-as.data.frame(step)   ggplot(step,aes(x=long,y=lat,fill=z))+geom_point() ggplot(step,aes(x=long,y=lat,fill=z))+geom_tile() 

enter image description here

enter image description here

my final plot empty! maybe problem have not enough points.


Comments