Facet wrap labels

84 Views Asked by At

I produced the graph ...

enter image description here

... using this code:

  ggplot(df_long, aes(x = Elevation , y = value, color = variable)) +
  geom_line() +
  facet_wrap(~variable, nrow = 3 ) +
  labs(x = c("Elevation" , "Rivers", "NDVI"), y = NULL, color = NULL) +
  theme_minimal() +
  theme(legend.position = "none", strip.background = element_blank(),
        strip.placement = "outside", strip.text.y = element_text(angle = 0),
        panel.spacing = unit(1, "lines"))+ 
  coord_cartesian(ylim = c(0, 1))

How I can produce the labels show in the attached image, X are the labels desire to remove. I want to show "Elevation, NDVI and Rivers " on the x axis but only "Elevation is appearing, while I want to show single label for "Ibex, Snow Leopard and Cooccurrence" on right hand side.

similar to one produce by Rota et al 2016enter image description here

0

There are 0 best solutions below