Closed rjverheijden closed 2 years ago
Ah I found another workaround which is much easier thanks to @vmikk: https://github.com/joey711/phyloseq/issues/515#issuecomment-946742728
just use plot_ordination(..., justDF = TRUE)
and use the dataframe that it produces to plot the data:
DF<-plot_ordination(..., justDF = TRUE)
ggplot(data = DF, aes(x=DF[,1], y=DF[,2], ...) + geom_point(alpha = 0.5, na.rm=TRUE)
Hi there,
I am greatfully using the
plot_ordination()
function, but would like to set the transparency of the points in the PCoA plot (by using e.g.alpha = 0.5
). Asgeom_point()
is already inherently used in theplot_ordination()
function , it is unable to set aesthetics that are not included in theplot_ordination()
function likealpha
,fill
, etc.I used a work-around for myself by removing the
+geom_point(na.rm=TRUE)
part from the function and manually specify it outside the function (just copy pasted function from your GitHub and adjusted it locally), which allows more flexibility, but obviously has some limitations as well.Would it be possible to add the
alpha
andfill
aesthetics in theplot_ordination()
function or is there an alternative work-around which doesn't require running the function locally? Many thanks in advance!https://github.com/joey711/phyloseq/blob/9b211d94fbe065e1d2c55d61177958ca15129bd5/R/plot-methods.R#L1116