2
A
回答
1
我认为你可以找到这部分的文档有用。
图形用户界面,显示和图形表格数据
http://www.mathworks.com/help/techdoc/creating_guis/bropmbk-1.html
请使用本机构plot_callback
功能tableplot.m
文件,以获得一个肮脏实现灵活的传奇。
function plot_callback(hObject, eventdata, column)
% hObject Handle to Plot menu
% eventdata Not used
% column Number of column to plot or clear
colors = {'b','m','r'}; % Use consistent color for lines
colnames = get(htable, 'ColumnName');
colname = colnames{column};
lgidx = get(haxes, 'UserData');
if isempty(lgidx)
lgidx = false(size(colnames));
end
if get(hObject, 'Value')
% Turn off the advisory text; it never comes back
set(hprompt, 'Visible', 'off')
% Obtain the data for that column
ydata = get(htable, 'Data');
set(haxes, 'NextPlot', 'Add')
% Draw the line plot for column
hplot = plot(haxes, ydata(:,column),...
'DisplayName', colname,...
'Color', colors{column});
lgidx(column) = true;
else % Adding a line to the plot
% Find the lineseries object and delete it
hplot = findobj(haxes, 'DisplayName', colname);
lgidx(column) = false;
delete(hplot);
end
if any(lgidx)
legend(haxes, colnames{lgidx});
else
legend(haxes, 'off')
end
set(haxes, 'UserData', lgidx);
end
1
一个例子:
x = cumsum(rand(100,3)-0.5); %# three series with 100 points each
h = plot(x);
legend(h, {'first' 'second' 'third'})
相关问题
- 1. 在Matlab中处理多个图像
- 2. MATLAB(图像处理)
- 3. Matlab'图像处理'
- 4. Matlab图像处理
- 5. Matlab多图像加载/处理
- 6. 图像处理在MATLAB中的错误
- 7. MATLAB图像处理帮助!
- 8. MATLAB K线图处理
- 9. Matlab图像阈值处理
- 10. matlab图像处理错误
- 11. 图像处理与Matlab的
- 12. Matlab的图像块处理
- 13. matlab图像处理3d
- 14. Matlab更新图像处理
- 15. 在Matlab图中显示多个图
- 16. Python vs Matlab在图像处理
- 17. MATLAB vs Simulink在数字图像处理?
- 18. matlab中的图像处理工具箱
- 19. matlab中的图像处理(分割)
- 20. 在一个视图中处理多个CALayer的绘图
- 21. 在视图上处理多个点击
- 22. 如何处理MATLAB中的多个时间序列?
- 23. 在Google地图中处理多个地理栅栏
- 24. 在matlab中清理图像
- 25. 在Matlab GUI中切换多个视图
- 26. 在matlab中比较多个图像
- 27. 在Matlab中填充多个图像
- 28. 功能处理在MATLAB
- 29. MATLAB中的阈值处理
- 30. Matlab中的鼠标处理
是否有可能增加一个传说呢?我似乎无法找到 – 2012-07-19 14:56:14
查看答案的更新。 – slitvinov 2012-07-20 17:11:34