plotting lat-lon climate data, alternative to geom_tile()?

26 views Asked by At

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)

figure

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:

figure2

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.

0

There are 0 answers