I have the following code which should put a tiles around the row with
y = h.
library(tidyverse) n_x <- 10^seq(log10(6), log10(24*365), by = 0.1)/365 n_y <- 10^seq(-1, 3, by = 0.1) a <- tibble(x = rep(n_x, length(n_y)), y = rep(n_y, each = length(n_x)), z = runif(length(n_x)*length(n_y))) h <- a$y[which.min(abs(a$y - 1.14*24))] h.tb <- a %>% dplyr::filter(y == h) a %>% ggplot(aes(x = x, y = y)) + geom_raster(aes(fill = z)) + scale_x_log10() + scale_y_log10(breaks = c(1, h, 100), labels = c('1', 'h', '100')) + geom_tile(data = h.tb, fill = NA, colour = 'black', size = 1)
But that's not what's happening...
Any help would greatly be appreciated.