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-处理两个subploted图像
- 9. Java中的图像处理,如MATLAB图像处理工具箱
- 10. 在matlab中处理数据
- 11. Matlab帮助图像处理
- 12. Matlab图像阈值处理
- 13. matlab图像处理3d
- 14. Matlab更新图像处理
- 15. Matlab的图像块处理
- 16. 图像处理与Matlab的
- 17. MATLAB图像处理帮助!
- 18. MATLAB K线图处理
- 19. matlab图像处理错误
- 20. 同时在matlab中处理多个数据
- 21. 处理多个图像
- 22. matlab中的图像处理工具箱
- 23. MATLAB vs Simulink在数字图像处理?
- 24. Python vs Matlab在图像处理
- 25. 在Matlab图中显示多个图
- 26. 在一个视图中处理多个CALayer的绘图
- 27. 在视图上处理多个点击
- 28. 作为批处理位图,我可以在Matlab中保存很多图吗?
- 29. Matlab的 - 处理
- 30. matlab并行处理在几个节点
是否有可能增加一个传说呢?我似乎无法找到 – 2012-07-19 14:56:14
查看答案的更新。 – slitvinov 2012-07-20 17:11:34