I attempted to create a reprex example but not sure it is correct?
reprex::reprex({
library(ggplot2)
df <- data.frame(stringsAsFactors = FALSE)
x = c(-35, -32.5, -30, -27.5, -25, -22.5, -20,-17.5, -15, -12.5, -10, -7.5, -5, -2.5, 0)
y = c(35, 35, 35,35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35)
value = c(1024.3188583815,
1023.79053468208, 1023.43251445087, 1022.46445086705, 1021.19479768786,
1019.90079479769, 1018.68981213873, 1017.22803468208, 1015.91596820809,
1015.32861271676, 1014.61893063584, 1014.43945086705, 1014.36567919075,
1014.35433526012, 1014.26336705202)
map_bg <- ne_countries(continent = "africa", returnclass = "sf")
ggplot()
geom_sf(data = map_bg, fill="transparent")+
#geom_contour(data=df,aes(x=x,y=y,z=z))
geom_contour2(data = df, aes(x=x,y=y,z=value), binwidth = 4, color = "black") +
scale_fill_gradientn(colours = colorRamps::matlab.like2(100), name = "hPa") +
scale_colour_gradient(guide = 'none') + facet_wrap(~key, ncol = 4) +
scale_x_continuous(limits = c(-9,34), expand = c(0, 0))+
scale_y_continuous(limits = c(34,29), expand = c(0,0))+
theme_bw() + theme(axis.title = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank())
)
Hope it shows what I am doing