Labels_breaks <- seq(0, max(Diameter), 100) # The Igor plot seems to use log dN_dlogDp values, so let's get thoseĭat_long$dN_dlogDp_log <- log10(dat_long$dN_dlogDp)ĭat_long$dN_dlogDp_log <- ifelse(dat_long$dN_dlogDp_log = "NaN", 0, dat_long$dN_dlogDp_log) # add date col and col names to the interpolated dataĭat_interp$date <- as.character(dat$Time)ĭat_long <- gather_(dat_interp, "Diameter", "dN_dlogDp", gather_cols)ĭat_long$Diameter <- as.numeric(as.character(dat_long$Diameter)) Print(i) # so we can see that it's working Pr <- predict(lo, newdata = ame(Diameter = interp))ĭf <- ame(ct = unname(pr), Diameter = interp) Interp <- seq(min(Diameter), max(Diameter), 0.2)ĭat_interp <- ame(matrix(0, ncol = length(interp), nrow = nrow(dat))) # a seperate interpolation for each row (date value) # interpolate between the Diameter values for a smoother contour, Here's the dataset (the same data used to make the plot with Igor), and here's what I've got so far to make the plot with R: # read in the dataĭiameter <- as.numeric(gsub("X", "", names(dat))) I'm trying to recreate it with R for a friend who wants to stop using Igor, and we can't quite get it.
This contour plot, made with the Igor program, is popular in atmospheric chemistry and pollution studies: