MATLAB Answers

1

how to plot controlchart function into axes GUI

Asked by Safwana Razak on 13 Sep 2018
Latest activity Commented on by Safwana Razak on 14 Sep 2018
Accepted Answer by Jan
axes(handles.axes1);
p = controlchart(re,'charttype','s');
xlabel('Airflow (ft^3/min)')
ylabel('Frequency (counts)')
title('Airflow Histogram')
legend('off')
when i run guide new window open. i want the graph inside my axes in GUI
thanks

  1 Comment

Jan
on 13 Sep 2018
Today I've used the "{} Code" button to format your code.

Sign in to comment.

1 Answer

Answer by Jan
on 13 Sep 2018
Edited by Jan
on 13 Sep 2018
 Accepted Answer

See: doc controlchart (link)
parent — The handle of the axes to receive the control chart plot.
Default is to create axes in a new figure. Not permitted if there are
multiple chart types.
So try to replace
axes(handles.axes1);
p = controlchart(re,'charttype','s');
by
p = controlchart(re,'charttype','s', 'parent', handles.axes1);

  1 Comment

Thank you so much.

Sign in to comment.