I'm attempting to create an image that shows error of machines vs temperature and humidity. After reading a paper (see image below), it seems like the best route to go is a hexagon or density plot to show these errors. My issue is that every time I create a (1) density plot it produces a grey diagram that really shows no data whatsoever (2) a hexagram plot it only shows count data.
library(ggplot2)
ggplot(DM_EPA_1H)+
geom_hex(aes(x=Relative.humidity, y=Temperature, color=Diff_PM1)
The above image is along the lines of what I want but obviously its difficult to interpret because it has count data. I can't tell under what circumstances (temperature/humidity) are we seeing an error.
ggplot(DM_EPA_1H, aes(x=Relative.humidity,y=Temperature), na.rm = FALSE)+
stat_density_2d(aes(fill=Diff_PM1), geom = "polygon")+
scale_fill_viridis_c()
Image produced by stat_density
This above image isn't very interpretable and am unsure what the next best route is to get the desired outcome.
Desired format for displaying data. Credit Lui et al., 2019 (Atmosphere, 10, 41)
Unfortunately the above image does not have any source code for how they produced these images so is making it difficult to reproduce. It remains possible that it wasn't even done in ggplot but to me it looked like the source.
I appreciate the help. Let me know if any more clarifications are needed