Adjust X/Y lim in a multiple line-chart

Hi there. I have a multiple plotline based for each group, but every plot has a different X/Y limit, so if I plot all of them, I would have to adjust that based on each plot's max value.
This is an example of what I say:

###Increase Audi Values 
df[which(grepl("audi",mpg$manufacturer)),9]<- df[which(grepl("audi",mpg$manufacturer)),9]*1000

#My plot
ggplot(df, aes(x = cty, y = hwy, colour = manufacturer)) +
  geom_point() +
  facet_wrap( ~ manufacturer)+
  geom_smooth(method = "lm") + 


documentation for facet_wrap shows it has a scales param



 facet_wrap( ~ manufacturer,scales="free")

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.