The are entries suggesting the usage of export_fig
package for exporting figures from MATLAB. However, when I use export_fig
without any xlabel
, the output figure has the x-tick labels trimmed from the bottom. With xlabel
there are no problems. Am I doing something wrong here or have you also faced this problem?
I am attaching two figures and an example code.
Thanks,
observeCropped = 1;
t = 0:.001:2;
f = @(t) sin(2*pi*t);
plot(t, f(t));
title('sin(t)');
if observeCropped
export_fig sin1.pdf
else
xlabel('time');
export_fig sin2.pdf
end
This is not a problem. It's work correct. If you want x-tick label without trimming try this code:
observeCropped = 1;
t = 0:.001:2;
f = sin(2*pi*t);
plot(t, f(t));
title('sin(t)');
xlabel(' ');
if observeCropped
export_fig sin1.pdf
else
export_fig sin2.pdf
end
:)