I am running the library fantaxtic in R studio. I want to make a bar chart or something like that. However, in the legend I don't want any title in the legend and the category Other
is located at the end the phyla names.
Is it posible?
This is my code:
library(fantaxtic)
sample_order<-c('Control.t0','Control.t30', 'Control.t60', 'LPSC.232.t30', 'LPSC.232.t60', 'APS.Control.t0', 'APS.Control.t30', 'APS.LPSC.232.t30','APS.Control.t60', 'APS.LPSC.232.t60')
top_nested <- nested_top_taxa(physeq_Fungi, top_tax_level = 'Phylum', nested_tax_level = 'Order', n_top_taxa = 5, n_nested_taxa = 5)
test<-plot_nested_bar(top_nested$ps_obj, top_level = "Phylum", nested_level = "Order", nested_merged_label = "Other Orders", palette = c('Ascomycota' = 'green' , 'Basidiomycota' = 'purple" , 'Cryptomycota' = "blue", 'LKM15' = "red", 'Mucoromycota' = "yellow")) + facet_wrap(~Oxidation, scales = "free_x") + theme(plot.title = element_text(hjust = 0.6, size = 12, face = "bold", color = 'black'), legend.title = element_text(color = 'black', face = "bold"), legend.key.size = unit(8, "points"), legend.position = 'bottom', axis.text.x = element_text(angle = 0, hjust = 0.5, color = 'black'), axis.text.y = element_text(color = 'black'), strip.text = element_text(face = "bold", color = 'black'))
Thanks in advance
DEb!
I tried to solve it by myself but I have not reached any positive result yet.
I want to eliminate the label Order
in the legend and the taxa called Other
is at the end of the others taxa.