![]() Please find what I think is a reprex minimal dataset and code below. Thank you for alerting me to reprex - it has taken a while to get my head around it, but I think I have it now! Labeller = labeller(BothLabels = RmType)) ![]() #Make a function to remove the first part of BothLabels #Use BothLabels as the facetting variable Ggplot(DF, aes(x = R, y = Value)) + geom_boxplot() + library(ggplot2)ĭF % unite("BothLabels", type, morphotype, sep = "_", remove = FALSE) Your RmType() function would have to use a more flexible regex since I could get away with always removing just two characters. The last plot is what I understand you want. Is there a way to sort the order of the facet boxes by the mean of the morphotype they are sorted into? Is there a way to create two overarching headings above the strip that summarise this sort (as opposed to at the moment where the type is specified in every facet-grid box). There are only two Types within the data. Is there a way to suppress the Type labels? ![]() I would like to create new labels for the strip that only include the variables from Morphotype and not the type. The data is sorted by type and morphotype - both of which are displayed in the strip title. ![]() P +guides(fill=guide_legend(nrow=8))+ theme( = element_blank(), legend.position = "none", = element_blank(), = element_blank()) +facet_grid(~Type+Morphotype, space="free", scales="free") ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |