MATLAB Answers

How to show axes when I build a GUI Scatter plot

16 views (last 30 days)
Jiali
Jiali on 14 Jun 2015
Answered: Walter Roberson on 14 Jun 2015
how to show axes and minortick when I build a GUI Scatter plot? By using the following code, no axes are shown in GUI. Please help me. I appreciate your efforts.
function Axes1_CreateFcn(hObject, eventdata, handles)
axis equal;
function Load_Callback(hObject, eventdata, handles)
axes(handles.Axes1);
hold on;
if ~isempty(A)
scatter(A(:,1),A(:,2),25,'b','filled');
scatter(B(:,1),B(:,2),25,'g','filled');
end
% here, A,B are data matrix that I want to plot

  0 Comments

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 14 Jun 2015
function Load_Callback(hObject, eventdata, handles)
axes(handles.Axes1);
if ~isempty(A)
scatter(A(:,1),A(:,2),25,'b','filled');
hold on;
scatter(B(:,1),B(:,2),25,'g','filled');
end

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags