Closed senanu closed 11 months ago
It seems that cowplot::draw_figure_label() is designed to be applied to cowplots. So I think that you can add the label to the plot by changing your code like this.
library(ggplot2)
library(dplyr)
x <- as.Date(c("2023-01-01", "2023-01-01", "2022-06-06"))
df <- tibble::tibble(x)
myplot <- cowplot::plot_grid(df %>% ggplot(aes(x = x)) + geom_bar())
myplot + cowplot::draw_figure_label("A", position = 'top.left')
Great! That works well and makes sense. Thank you for your time.
First, thank you for such a useful package! However, it seems that cowplot breaks the dates on an X-axis. I have seen on Stackoverflow that this error is generated when the data type for the axis isn't a proper date or when the axis is manipulated by xmin() etc. However, in the reprex below, I think none of that is the case, but it still doesn't work properly. Is there a solution or workaround?
Thank you!
Created on 2023-09-07 with reprex v2.0.2