MATLAB App Designer,图形绘制(非数值数据)
MATLAB App Designer, Graph plotting (non-Numeric data)
Matlab 应用程序设计器中的 UIAxes
不支持非数字数据,例如 graph
图,在 UI 框架内是否有其他替代方法?
在 GUIDE 中我这样做:
% --- Executes on button press in Visualize.
function Visualize_Callback(hObject, eventdata, handles)
a = [1 2 3 4];
b = [2 3 4 1];
g = graph(a,b);
p = plot(g);
axis off
例如单击 Visualize
按钮,我将使图表显示在指南图中。框架。
我尝试在 App Designer 中这样做,它可以绘制数值,但对于图形可视化,我没有找到正确的方法。
methods (Access = private)
% Button pushed function: VisualizeButton
function VisualizeButtonPushed(app, event)
a = [1 2 3 4];
b = [2 3 4 1];
g = graph(a,b);
ax = app.UIAxes;
plot(ax,g)
end
end
UIAxes
不支持非数字数据,例如 graph
图,在 UI 框架内是否有其他替代方法?
在 GUIDE 中我这样做:
% --- Executes on button press in Visualize.
function Visualize_Callback(hObject, eventdata, handles)
a = [1 2 3 4];
b = [2 3 4 1];
g = graph(a,b);
p = plot(g);
axis off
例如单击 Visualize
按钮,我将使图表显示在指南图中。框架。
我尝试在 App Designer 中这样做,它可以绘制数值,但对于图形可视化,我没有找到正确的方法。
methods (Access = private)
% Button pushed function: VisualizeButton
function VisualizeButtonPushed(app, event)
a = [1 2 3 4];
b = [2 3 4 1];
g = graph(a,b);
ax = app.UIAxes;
plot(ax,g)
end
end