function [xdata, ydata] = fig_extract()
%extract data from the current figure

h = gcf;
axesObjs = get(h, 'Children');
dataObjs = get(axesObjs, 'Children');

xdata = get(dataObjs, 'XData');
ydata = get(dataObjs, 'YData');
end