says it all—a ggplot result is not the sort of object that can be given as an argument to filter() or dplyr::filter() even though the data, which can be, is deeply embedded in the plot object.
Start with data, rename it to Data or some other name that is not a built-in. Subset that, create separate graphs and present with {patchwork} or a similar package.
Please try to generate a list from the ggplot and in the list consider the data list and subset that and use it as shown in the example below
library(tidyCDISC)
data('advs', package='tidyCDISC')
advs <- advs %>% rename_all(tolower) %>% filter(anl01fl=='Y' & paramcd=='DIABP')
g <- ggplot(advs, aes(x=ady,y=aval, group=atpt)) +
geom_line(aes(color=atpt))
#if i want to subset the ggplot for a particular subject then i have to write the below code
g$data <- g$data %>% filter(sex=='M' & usubjid=='01-701-1033')
#just call the g and graph for only one subject will be generated
g