MATLAB: How to hiding the legend

legendneural networkplot

Hi all I used Neural Network ToolBox and the plotted regression is one of the toolbox's functions. how can I hiding the legend and the y-axis label?
thank you for help

Best Answer

hl=findobj(gcf,'type','legend')
delete(hl)