Communication
Language
Extract data from the figure file of MATLAB ("*.fig").
"legend" must be eliminated from the figure to load data by fig2data.
out = fig2data( fig_name, Name);
where Name is the properties for obtained lines or surfaces.
[2D case]
out = fig2data( fig_name, 'LineWidth', 'Color');
xdata = out.xdata;
ydata = out.ydata;
linewidth = out.LineWidth;
color = out.Color;
[3D case]
out = fig2data( fig_name, 'LineWidth', 'Color');
xdata2 = out.xdata;
ydata2 = out.ydata;
zdata2 = out.zdata;
linewidth = out.LineWidth;
color = out.Color;
where
xdata : XData for the figure file.
ydata : YData for the figure file.
zdata : ZData for the figure file.
fig_name : path to the figure file.
"demo.m" load the data from figure files in "./load/" directory, and plot these data.