I've been trying to change the legend symbols of my plot. This question here was really helpful, however I'm trying to create symbols that go from 1-33, and whenever I have 2 digits I get an error. Is there a way to adapt this code for this purpose? Here's a figure of my plot with labels from 1-9 then random letters just so it would show.
Here's my code (R v3.6.2, RStudio 1.2) for this plot:
ggplot(data_plot, aes(x = EV1, y = EV2, color = local)) +
geom_point(size = 0, stroke = 0) +
geom_text(check_overlap = F, aes(label = map_id, colour = local), show.legend = FALSE) +
guides(colour = guide_legend(override.aes = list(size = 5, shape = c(utf8ToInt("1"), utf8ToInt("2"), utf8ToInt("3"), utf8ToInt("4"), utf8ToInt("5"), utf8ToInt("6"), utf8ToInt("8"), utf8ToInt("9"), utf8ToInt("A"), utf8ToInt("F"), utf8ToInt("K"), utf8ToInt("G"),utf8ToInt("F"), utf8ToInt("K"), utf8ToInt("G"),utf8ToInt("F"), utf8ToInt("K"), utf8ToInt("G"), utf8ToInt("F"), utf8ToInt("K"), utf8ToInt("G"), utf8ToInt("F"), utf8ToInt("K"), utf8ToInt("G"), utf8ToInt("F"), utf8ToInt("K"), utf8ToInt("G"), utf8ToInt("F"), utf8ToInt("K"), utf8ToInt("G"), utf8ToInt("F"), utf8ToInt("K"), utf8ToInt("G"), utf8ToInt("F"))))) +
labs(title = "Microsatellite data", x = "PC1 (14.6%)", y = "PC2 (10.0%)", color = "Locality") +
theme_bw()