在 Matlab GUI 滑块中引入多种背景颜色
Introduce Multiple Background Colors In Matlab GUI slider
我正在尝试为我的 matlab GUI 的滑块的某些部分着色,以便及时定位某些事件发生的位置。我知道更改滑块的完整背景颜色的命令是:
set(handles.slider,'backgroundcolor','red');
有谁知道如何只更改背景颜色的一部分。
感谢您的帮助。
谢谢,好像不能按照我想的方式去做。最后,我用时间轴图创建了检测,如下图所示:
it can be seen in the right down part
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
最后,你只需要在你想要的行中绘制值
我正在尝试为我的 matlab GUI 的滑块的某些部分着色,以便及时定位某些事件发生的位置。我知道更改滑块的完整背景颜色的命令是:
set(handles.slider,'backgroundcolor','red');
有谁知道如何只更改背景颜色的一部分。
感谢您的帮助。
谢谢,好像不能按照我想的方式去做。最后,我用时间轴图创建了检测,如下图所示: it can be seen in the right down part
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
最后,你只需要在你想要的行中绘制值