I have the following data.frame with three columns: value of a given variable, longitude and latitude.
I can plot the data.frame
as follows:
library(ggplot2)
df=read.csv("test.csv")
plot_df = ggplot() +
geom_tile(data=df, aes(x=lon,y=lat,fill=value))
print(plot_df)
The plot is fine, but I would like to find another ggplot2
function that does not treat each gridpoint as a tile and gives a more homogeneous pattern as result, like the following figure:
I bet there are many options, but it is important for me to keep the same data.frame
format as input data, i.e. with 3 columns: value, lon, lat.