Strange rendering of colorbar when plotting lines in many colors
1 view (last 30 days)
When plotting lines in many colors, the colorbar looks strange when the figure renderer is set to 'painters'.
The following code plots N lines with N colors according to colormap.
For me the colorbar looks normal if N<165. Greater values lead to strange rendering with a reduced color range and a sharp edge somewhere in the middle. Increasing N further leads to a black colorbar with no colors displayed at all.
However, when exporting the graph or changing the renderer to 'zbuffer' or 'opengl' the colorbar looks normal for all N.
How can I avoid this behavior except for manually changing the renderer for every figure?