I have an ordered dataframe:

edit_metric.mean <- edit_metric.mean[with(edit_metric.mean, order(chr, start, -edit_metric)), ]
head(edit_metric.mean)
        chr   start   geno edit_metric
1006983   1 3263157 ADAR_O           1
1006984   1 3263159 ADAR_O           1
1006985   1 3263161 ADAR_O           1
1006986   1 3263163 ADAR_O           1
1006987   1 3263165 ADAR_O           1
1006988   1 3263167 ADAR_O           1

The data contains four experimental genotypes. The data is sorted by chromosome, start position, and descending edit_metric. I plot the data with:

ggplot(edit_metric.mean,aes(x=start,y=edit_metric,color=geno)) + 
  geom_bar(position=position_identity(), stat="identity") +
  facet_wrap(~chr,scales="free") + 
  theme(aspect.ratio=1, axis.title.x=element_blank(), 
        axis.ticks.x=element_blank(), axis.text.x=element_blank()) +
  ylab("Edit-Events * Edit-Rate") +
  ggtitle(label="Average Edit-Events*Edit-Rate per Edit-Site, by Genotype")

RNA editing coverage, by chromosome, grouped by genotype

For small unplaced scaffold chromosomes, GL456221.1, GL456233.2, and GL456385.1, a strange black bar appears filling the bars. Why is this happening. How can I keep this from happening?

After consulting with AI, it was suggested that I add hard x and y axis limits, but this did not remove the mysterious black bars. I also want to remove the black boxes filling the legend keys.

0

There are 0 best solutions below