%% Script File for the MATLAB Tips Chapter
%% Copying Figures

fplot(@sin, [-pi, pi], 'b'); sincurve = get(gca, 'Children');
figure; fplot(@cos, [-pi, pi], 'r:'); copyobj(sincurve,gca)