Colourkey parameter documentation #95
Unanswered
forbiddenpersimmon
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When adjusting
create.heatmap()
plot colourkey, parameter documentation is unclear on expected behavior. If data frame values do not actually include the specified values they will not appear on the colourkey. Generating plot with parametercolourkey.labels.at = seq(5, 20, 5)
with a matrix whose value range does not actually include passed values (5 and 20 in this case) results in colourkey without ticks starting and ending in those locations. Spacing between ticks is also not even and is based on actual data value range in matrix, which may not be ideal for attractive plots.Additionally, with this behavior using the related parameter
colourkey.labels
may give undesirable results. For example, usingcolourkey.labels = seq(5, 20, 5)
withcolourkey.labels.at
as described above will result in a colourkey that looks like this:colourkey.labels
in this case is behaving as expected. Since there are only two tick marks (labelled 10 and 15 in the first image),colourkey.labels
will simply take the first two labels passed to it. However, based on the parameter documentation I would expect it to make four ticks at 5, 10, 15 and 20 and label them accordingly (as pictured below in workaround example).The workaround is using the
at
parameter. Removing the two above parameters and instead includingat = seq(5, 20, 0.01)
produces plot with colourkey:Notably, once
at
parameter is included changingcolourkey.labels.at
andcolourkey.labels
works as expected based on documentation.at
documentation was unclear to me as an inexperienced user and did not realize thatat
would change the colourkey, or that defining colourkey endpoints not in the bounds of data frame would result in issues outlined above. Hope this helps!Beta Was this translation helpful? Give feedback.
All reactions