Bug introduced in 10.0 and fixed in 10.1
I'm sorry if this is a duplicate, but I don't even know how to look for it.
I had this line of code that worked on a Notebook I wrote on Mathematica 9.0:
BarLegend[{colorf[#] &, {0, 30}}]
colorf
is a Blend going from 0 to 30 (40 actually, but I don't think it really matters).
I just installed Mathematica 10.0, and it no longer works: the bar is all red (i.e. colorf[0]
). Why is this happening?
edit: colorf
is defined as follows
colorf=Blend[{{0, Red}, {20, Yellow}, {40, Green}}, Round[#, 0.1]] &;
colorf = Blend[{Red, Blue}, #] &; BarLegend[{colorf, {0, 30}}]
works fine in V. 10.0.2. -- maybe it is the definition ofcolorf
and usingcolof[#] &
? $\endgroup$BarLegend
s with continuous gradients introduced in version 10 (I'm using v10.0.2). $\endgroup$