thanks for the tips, but I don't think the sunflowerplot() and the hexbin() are the right plot option for me. Though I find the sunflowerplot a very nice thing - if it is possible to alter the plot to my needs it will be great.
I have three different columns I need to plot. one is for the x-axis, the second for the y-axis and the third one is the informations which come in the plot itself. The sunflowerplot compare two columns with each other.
By "legend", do you instead mean tick labels? The actual legend is the color bar on the right.
BTW, the answer to your logic question is that your data is in a triangular shape (well,
partner1~partner2is). This is likely due to how you generated those values.Edit: You can test what I mentioned above regarding shape with
with(data, table(parner1>partner2)).Actually I do mean the bar at the side of the image :-)
If you just want more colors then try
scale_fill_gradientn().I wonder whether making such a heatmap of your data is the best way to vizualize the results in the first place. In the heatmap, genomic positions are converted to non-numeric values which makes it hard to see the relative distances along the genome. Furthermore, I think there is too much data per pixel and the distribution of "substraction-values" is very scewed towards the lower numbers which makes it hard to see the different colors (maybe you should log-transform the substraction-values).
But what do you really want to show to the viewer? The things I can think of are:
In any case, it is very hard to answer with the tile-plot you are trying to make.
In case of 1 and 2, make a karygram overview of the distribution (histogram) of interactions along the chromosomes. Then use
geom_histogram() + facet_wrap(~chr,...)In case of 3, compure the pairwise correlation coefficients between all positions and make a How Do I Draw A Heatmap In R With Both A Color Key And Multiple Color Side Bars?
It is not really continuous genomic positions, but bins of 1000 (or 5000) positions summarized into one value. And I do have only one chromosome. I thought a heatmap will be better, because of the better (coloured) overview. (Is there a way to do a histograms with different colours for specific values ranges?). I will try the histogram - BTW did you mean karyogram (Is it a GRanges Object?).