I'm analysing NGS data using the phyloseq
package. I want to create a PCoA (Bray-curtis DM) plot using following code:
ord_bc_pcoa<-ordinate(physeq,method="PCoA", distance="bray")
pcoa_plot_1<-plot_ordination(physeq,ord_bc_pcoa,color="variable1", shape="variable2") +
geom_point(size=4) +
scale_color_manual(values = c("var1X"="red","var1Y"="#55BE25","var1Z"="blue")) +
scale_shape_manual(values = c("var2A"=0,"var2B"=2,"var2C"=3,"var2D"=4,"var2D"=5,"var2E"=6,"varF"=7,"var2G"=8)) +
ggtitle("title1")
pcoa_plot_1
In the resulting plot, the shapes look like this:
As you can see, the shapes are plotted twice, at a different size within eachother. Also, if I would manually assign a 'filled' shape to a variable (e.g. shape code 22), it also does not appeared filled on the plot, but still has a empty fill.
When I run another geom_point()
plot of ggplot2, I do get the good looking shapes.
How can I fix this?