Unfortunately, at this time this script only works for line graphs, such as created via the plot command. You were probably trying to use the script on a bar or other non-typical matlab figure object.
Please refer to the full file description. To export to vector graphics files, use an advanced figure export (I recommend export_fig, http://www.mathworks.com/matlabcentral/fileexchange/23629).
I found a bug of this program. For example, when you try to change 1_by_2 legends to 2_by_1, this program will not work. Because the numpercolumn is 1, and the col is always -1.
Replace the code
“
if mod(i,numpercolumn)==1,
col = col+1;
end
“
with
“
if numpercolumn>1,
if mod(i,numpercolumn)==1,
col = col+1;
end
else
col=i-1;
end
“
to kill this bug.
I found a bug of this program. For example, when you try to change 1_by_2 legends to 2_by_1, this program will not work. Because the numpercolumn is 1, and the col is always -1.
Replace the code
“
if mod(i,numpercolumn)==1,
col = col+1;
end
“
with
“
if numpercolumn>1,
if mod(i,numpercolumn)==1,
col = col+1;
end
else
col=i-1;
end
“
to kill this bug.
Comment only