Placement of axis labels at minor breaks with ggplot2

后端 未结 1 535
臣服心动
臣服心动 2020-12-22 04:59

I am using ggplot2 to do some plotting of genomic data, so the basic format is that there is a chromosome and a position along it. I convert the positions to be on a contin

相关标签:
1条回答
  • 2020-12-22 05:14

    How about this?

    breaks <- c(0, cumsum(chromosome_length))
    scale_x_continuous("Genome Position", breaks = breaks + 0.5, labels = breaks)
    
    0 讨论(0)
提交回复
热议问题