ggplot2 heatmap : how to preserve the label order ?

Posted by Tg on Stack Overflow See other posts from Stack Overflow or by Tg
Published on 2010-06-07T13:24:04Z Indexed on 2010/06/07 14:12 UTC
Read the original article Hit count: 404

Filed under:
|
|

I'm trying to plot heatmap in ggplot2 using csv data following casbon's solution in

http://biostar.stackexchange.com/questions/921/how-to-draw-a-csv-data-file-as-a-heatmap-using-numpy-and-matplotlib

the problem is x-label try to re-sort itself. For example, if I swap label COG0002 and COG0001 in that example data, the x-label still come out in sort order (cog0001, cog0002, cog0003.... cog0008).

Is there anyway to prevent this ? I want to it to be ordered as in csv file

thanks

pp

© Stack Overflow or respective owner

Related posts about r

    Related posts about ggplot2