Open tiemvanderdeure opened 2 months ago
The issue here is that the colorrange has to be a tuple - we should have a better error though.
plot(rand(10), color = 3, colorrange = (1, 10))
should work.
I guess we could also have a convert for abstract vectors which just takes extrema
for colorrange...
Ah of course, I thought it was weird that no one would have run into this before. ;)
I got thrown of by the fact that it worked for color = 1
and color = 2
- and still don't get why those other examples don't error?
I think it's reasonable to require colorrange to be a tuple, allowing vectors and calling extrema opens a whole lot of edge cases and users can just call extrema themselves. Maybe this should just have a check and a more straightforward error message? Passing a range as the colorrange is an easy mistake to make.
Supplying a color and a colorrange errors sometimes, seemingly only if the color is an integer above 2.
To reproduce, simply:
All of the following code works as expected:
stacktrace: