0

I have created a plot of coverage vs gene. I would like to plot the genes (x axis) from lowest coverage value (y axis) to largest. I used the function "plot" but it automatically sorts the gene names from lowest to highest. How do I arrange them from lowest coverage to highest instead?

Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
user1250704
  • 115
  • 1
  • 2
  • 7
  • 1
    Your question seems to be answered here: http://stackoverflow.com/questions/2375587/reorder-levels-of-a-data-frame-without-changing-order-of-values – Chase May 29 '13 at 02:51
  • If you use ggplot2 it's probably necessary to make the names an ordered factor. – Roland May 29 '13 at 06:54

1 Answers1

0

Maybe switch the ylim:

plot(1:10, ylim=c(10,1))
nnn
  • 4,985
  • 4
  • 24
  • 34