Change line types and y-axis limit on visreg interfaced with ggplot2 in r

36 Views Asked by At

I hope you can give me some help here.

I'm trying to plot residuals of a lmer model

modII <- lmer(Isoprene_microgC_g_g ~ PC2 * Vegetation_type + (1|Spp.1), 
  data = geral)

I tried plotting it using this function:

visreg(modII, "PC2", by = "Vegetation_type", line.par = list(col = 'black'), band = F, 
       gg = T) + 
  theme_minimal() + 
  geom_point(size = 1) + ylab("")

and I get the following graph:

my graph is in this link

But I'd like to plot a graph with a smaller ylim like -5.0 (I don't know why it is going to -20 since there are no points in this range) and would like to have only the central plot with a solid line, and the others with dashed lines. Is there a way to do this?

Thanks!

0

There are 0 best solutions below