Closed lukesarre closed 1 year ago
Hi Luke,
excellent question! By default, ggplot does not allow multiple scales for the same thing (e.g. color or fill). I had the same problem in the past and used some hacky workarounds. Luckily, I just discovered, that there is a far better alternative now. You can use the ggnewscale
package:
install.packages("ggnewscale") # if not already installed
library(ggnewscale)
testPlot + geom_link(aes(fill=omega)) + new_scale_fill() + geom_gene(aes(fill=cluster_id))
Awesome, thank you Luke
Hello, Thank you for developing this excellent package. I'm in the process of developing some figures, and it would be very useful for me to be able to use categorical variables to determine the fill of genes, and continuous variables to determine the fill of the links. This may be functionality that is not supported, but it may be that I am making a silly error! Here is some code to reproduce what I am experiencing:
Kind regards,
Luke