MATLAB: How plot step/lsim in an uifigure in app designer

app designercontrolControl System ToolboxerrorguiMATLABplotuifigure

I'm using APP Designer to plot a step response in a uiaxes or uifigure and I'm having this error:
"Error using DynamicSystem/stepplot (line 107)
Functionality not supported with figures created with the uifigure function. For more information, see Graphics Support in App Designer."
Can you help me?

Best Answer

See the attached app for an example.