Dear R'ers, I would like to use barplot or a similar function to plot data demonstrating the distribution of the length of a kind of conservation in about 25000 DNA sequences. My data look like this: #Total sequences: 23873 0 19936 1 218 2 391 3 477 4 360 5 431 6 294 7 215 8 320 9 209 10 160 (.....) 99 0 100 1 101 0 102 0 103 1 104 0 105 0 106 0 107 0 108 0 109 1 Therefore, I would like to show the column representing 0 (with 19936 sequences) "cut" so it doesn't dominate the rest of the plot. Also, starting from about 10 sequences, I would like to group the rest of the sequences into groups of 5 each (for instance, 10-15, 16-20, 21-25 etc). I have looked extensively in the help pages and in some online fora, but have not found an answer to this question. I would greatly appreciate any tips. Thanks, Peter
Dr. med. Peter Robinson wrote:> Dear R'ers, > > I would like to use barplot or a similar function to plot data > demonstrating the distribution of the length of a kind of conservation in > about 25000 DNA sequences. My data look like this: > ... > > Therefore, I would like to show the column representing 0 (with 19936 > sequences) "cut" so it doesn't dominate the rest of the plot. Also, > starting from about 10 sequences, I would like to group the rest of the > sequences into groups of 5 each (for instance, 10-15, 16-20, 21-25 etc). >Hi Peter, Have a look at gap.barplot in the plotrix package. I would suggest something like this: gap.barplot(y,c(500,19800),main="Skewed distribution", yaxlab=c(200,400,19900),ytics=c(200,400,19900)) where y is the right column of your data. Jim