App Designer change colormap
조회 수: 47(최근 30일)
I need to change the color map, but matlab gives me such a warning and creates an empty graph
Specify a UIAxes handle as first argument.
gray2 = flipud(colormap('gray'));
title(app.UIAxes,'Time live server(i)');
Thanks in advance
DGM 2022년 5월 18일
I'm going to guess it's complaining about the missing handle on the gray2 line. If so, then do this:
gray2 = flipud(gray(256));
While it's possible, there isn't any need to call colormap() on that line. Since all you need is the colormap (the actual table of colors), just call the desired map generation function (i.e. gray()) with the desired table length. The result will be a simple numeric array, and doesn't attempt to interact with any graphics objects in the process.