I want to create a custom BarLegend with continuous colors:
Block[{minmax,ticks, cf},
ticks = Function[{min, max},({#,StringForm["`` dBa",#]} )& /@ Range[min,max]];
minmax = {70,90};
cf = ColorData["LightTemperatureMap"][Rescale[#, minmax]] &;
BarLegend[{cf, minmax}, "Ticks" -> ticks @@minmax]
]
Ticks are properly displayed. But the BarLegend
is drawn using a solid color. What did I do wrong?