0

Trying to determine how to keep the colored legend and remove the greyscale one. problem occured when I added the *labs(colour = "cover type") line.

enter image description here

nmds_plot_new <- ggplot(plot_df, aes(x = NMDS1, y = NMDS2)) +
  coord_fixed() +
  geom_point(aes(color = covertype, shape = covertype), size = 3, alpha = 0.8) +
  stat_ellipse(aes(color = covertype)) +
  scale_color_manual(values = pal) +
  geom_segment(data = fit_spp, aes(x = 0, xend = NMDS1, y = 0, yend = NMDS2),
           arrow = arrow(length = unit(0.25, "cm")),
           col = "black") +
  geom_text(data = fit_spp, aes(label = species), family="serif") +
  labs(title = "NMDS") + labs(colour = "Cover Type") +
  theme(text = element_text(family = "serif")) +
  clean_background

Tried finding a solution elsewhere but came up short.

1
  • Try giving them both the same title labs(colour = "Cover Type", shape = "Cover Type"). It's easier to help you if you include a simple reproducible example with sample input that can be used to test and verify possible solutions.
    – MrFlick
    Commented Aug 4, 2023 at 19:56

0

Browse other questions tagged or ask your own question.