How do I add sample annotations to this data?
0
0
Entering edit mode
13 months ago
simranv96 • 0

I was able to generate this dot plot using ggplot2 from scratch. I would like to add sample annotations (similar to the ones you'd see in heat maps where they annotate clusters). I have another data frame containing sample IDs and their respective subtypes. Pseudocode would be appreciated.

enter image description here

R data visualization ggplot2 • 656 views
ADD COMMENT
2
Entering edit mode

maybe try a simple facet_grid(~group,scales="free",space="free") where group is the column in you dataframe containing the sample annotation. Without any example it will be difficult to help you.

ADD REPLY
0
Entering edit mode

So this absolutely serves the function I wanted to achieve, Thank you so much for that. Can we make it colorful though :P Also, is it possible to wrap text, for the one that seems to be cut off?

enter image description here

ADD REPLY
0
Entering edit mode

Please check this post by Yun to see how it can be made colorful annotation layer.

ADD REPLY

Login before adding your answer.

Traffic: 1854 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6