'Limiting regression lines to data extent in an interaction plot using plot_model

Was wondering how I might be able to limit the regression lines for this graph so that the male (M) line stops at age 9 (which is its max) instead of extending past its limit to the age limit of females (F)?

Can see plot here - https://i.stack.imgur.com/Jsqb1.png This is my code:

plot_model(adultstrong3, type = "emm", terms = c("age","sex"),show.data=TRUE,
           jitter=0.2,legend.title="Sex",plot=TRUE)+
  scale_x_continuous(name=c("Age"))+
  scale_y_continuous(name=expression(sqrt("FEC")))+
  theme(panel.grid=element_blank())+theme_classic()+
  theme(axis.text=element_text(size=20),
        axis.line = element_line(size = 1, colour = "black",linetype=1),
        axis.title=element_text(size=20))+
  theme(legend.title=element_text(size=20),
        legend.text=element_text(size=20))


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source