Closed VGalata closed 7 years ago
Hi!
So the default location for the color transitions is at the respective quantiles your data - e.g. if you have 6 colors, the color transitions will be at the 0th, 20th, 40th, 60th, 80th and 100th quantiles, where the 0th quantile corresponds to the minimum value and the 100th quantile corresponds to the maximum value.
These transition positions work nicely for highlighting the difference between relative high and low values. Your data seems to be quite skewed, hence why the transitions happen very close to the minimum (the 20th, 40th, 60th quantiles etc are very close to the minimum value).
The heat.lim
argument specifically restricts the legend itself rather than the colors appearing in the heatmap (I will make this clearer in the documentation).
I suspect that colors in the original legend are correct, it's just that the transitions are happening to close to the minimum value that the dark green is only for such a small range of values.
If you plot a histogram of your data, you will probably see a large number of very small values and very few large values...
Let me know if this is helpful or if I've misunderstood the issue and I can try to help further :)
Hi!
I see now that my problem was that I misunderstood the description of the heat.pal
argument. Thank you very much for your help!
Hi,
I have a problem with
superheat
when using a custom color palette: I want to define custom colors and transition values but the result is not always as expected. I tried different calls:0.008 0.125 2.000 35.700 32.000 512.000
Basic call:
heat.pal=colorRampPalette(c("#009900", "#ffcc00"))(6)
heat.pal
and is also different from the color actually used in the heatmapheat.pal=colorRampPalette(c("#009900", "#ffcc00"))(6)
andheat.lim=c(0,512)
heat.pal=colorRampPalette(c("#009900", "#ffcc00"))(6)
,heat.pal.values=plot_data$summary
with and withoutheat.lim=c(0.008,512)
orheat.lim=c(0,512)
heat.pal=colorRampPalette(c("#009900", "#ffcc00"))(6)
andheat.lim=c(0.008,512)
Screenshots are below. Used version: 0.1.0
Thank you in advance!
Screenshots (same order as the listed
superheat
calls):