My BarLegend has a weird line appearing in it. Why??
BarLegend[{GrayLevel, {0, 1}}]
After reviewing my code, I realised that setting Mesh
options for ArrayPlot
can affect BarLegend
in unforeseen ways. The code below produces the "weird" line:
SetOptions[ArrayPlot, Mesh -> {All, None}];
BarLegend[{GrayLevel, {0, 1}}]
Whereas removing the Mesh
fixes the problem.
SetOptions[ArrayPlot, Mesh -> None];
BarLegend[{GrayLevel, {0, 1}}]