我正试图对我的matlab GUI的滑块的某些部分进行着色,以便找到在那里发生的一些事件。我知道改变滑块的COMPLETE背景颜色的命令是:
set(handles.slider,'backgroundcolor','red');
有人知道如何改变背景颜色的一部分吗?
谢谢你的帮助
谢谢,似乎不能按我想要的方式去做。最后,我用一个时间轴的图创建了检测,如下图所示:可以在右下方
看到handles.ax=axes('NextPlot','add',... %get the axes where the detections will be plotted for an easy finding of the interference
'DataAspectRatio',[1 1 1],... %# match the scaling of each axis,
'XLim',[0 (handles.dataLength-20000)*(1/handles.fs)*(1e3)],... %# set the x axis limit,
'YLim',[0 eps],... %# set the y axis limit (tiny!),
'Color','none',...
'Position',[0.02 0.35 0.96 1]);
set(handles.ax,'Parent',handles.detectAx);axes(handles.ax); %get the axes where the plot will be made
最后,你只需要在你想要的行中绘制值