Closed FelixErnst closed 3 years ago
How about this:
plotAbundanceDensity(tse[1:3,], abund_values = "relabundance",
order_descending = NA, point_shape = 19)
plotAbundanceDensity(tse[1:3,], abund_values = "relabundance", order_descending = NA, point_shape = 19)
Clearly better, yes, but edges in circles still remain. Passing the colour argument does not do the trick, and I have not yet found a solution by manipulating the points afterwards with geom_point()
for instance.
Well, we can live with this now (adding example with pch=19 for clarity) but this is rather fundamental, how to manipulate key aspects of these visual objects. Similar needs may arise again.
I think this is clearly a case of ggplot2
huge functionality. I can only change the default colour with a bit of weird code, since scale_fill_manual
works only, when there is a scale.
p <- plotAbundanceDensity(tse[1:3,], abund_values = "relabundance",
order_descending = NA, point_shape = 19)
p$layers[[1]]$aes_params$fill <- "red"
p
The option advanced argument point_colour
is now supported. However, I must say, that the default "grey70" looks better with the alpha set to 1
plotAbundanceDensity(tse[1:3,], abund_values = "relabundance",
order_descending = NA, add_legend = TRUE, point_colour = "black")
plotAbundanceDensity(tse[1:3,], abund_values = "relabundance",
order_descending = NA, add_legend = TRUE, point_colour = "black", point_alpha = 1) # Most horrible
plotAbundanceDensity(tse[1:3,], abund_values = "relabundance",
order_descending = NA, add_legend = TRUE, point_alpha = 1) # best
Hmm yes. If there is no easy way to manipulate the figure either through function arguments, or through post-hoc manipulation of the ggplot object, then I think this is a clear limitation for the current system logic. But if there is no solution available, this is still acceptable I think.
Is the problem that
colour
match withcolour_by
? Otherwise I think it should work, andcolour
should be passed further? Is there an argument that makescolour_by
specific?Error in retrieveCellInfo(object, colour_by) : cannot find 'red'