Dear all, I want to ask a very basic question. I am making a bubble plot using ggplot2 having table structure:
GO term Number Class Type 1. Metabolism 5 start duf BP 2. Photosynthesis 10 hzs BP 3. Nucleus 15 hs CC 4. Kinase 16 hs MF
I want to make a bubble plot having Number on x axis, GO term on y axis, bubble color should be based on Class and background color will be based on Type. My R code is:
ggplot(bubble_plot, aes(x=Number, y=GO term, size = Number, col = Class)) + geom_point(alpha=0.7)
With this I am getting the desired plot except the background color, When I am using "fill = Type", I am not getting the background color based on the BP, CC or MF based on the " Type" column in the table.
The desired plot should look like:
Thanks in advance