How do I use legend2latex for bar-graphs?
1 view (last 30 days)
Show older comments
Hi! I'm trying to use legend2latex to get my legend converted to a latex-code which I'm able to use with laprint. It works verry well with normal graphs, but now I tryied it with a bar-graph and got the following error and I don't know what I have to change because on the page of the package (<http://www.mathworks.de/matlabcentral/fileexchange/25426-legend-to-latex-converter>) there is the information of an update which offers the opportunity for bar-graphs.
ans =
flat
Subscripted assignment dimension mismatch.
Error in legend2latex (line 91)
patchColor(i,:) = get(ud.handles(i),
'FaceColor');
My example which causes the error:
fig1=figure(1);
e=[2 3; 3 4;4 5];
bar(e);
hold on;
legend('abc','def');
legend2latex(fig1);
Thanks a lot in advance!
1 Comment
Yannick
on 16 Oct 2013
Hi Philipp, you should probably try to contact the author of the File Exchange submission (Emile Demarteau) directly first, since they developed that code.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!