Reputation: 83177
Is there any way to prevent XTickLabels from overlapping with YTickLabels in a figure in Matlab?
Good:
Bad (-2 and -5 are overlapping):
Code (I would prefer a solution that is not customized to this particular piece of code):
Good:
wavelet_name = 'coif1';
[~,psi,xval] = wavefun(wavelet_name,10);
scale = 1;
shift = 1;
x_min = -1;
x_max = 8;
plot([x_min, shift+xval.*scale, x_max],[0, psi, 0]);
axis([x_min x_max -2 3]);
set(gca,'FontSize',50)
save_figure( [wavelet_name '_scale' num2str(scale) '_shift' num2str(shift)] )
Bad: (I only changed x_min = -1;
to x_min = -5;
)
wavelet_name = 'coif1';
[~,psi,xval] = wavefun(wavelet_name,10);
scale = 1;
shift = 1;
x_min = -5;
x_max = 8;
plot([x_min, shift+xval.*scale, x_max],[0, psi, 0]);
axis([x_min x_max -2 2]);
%title('Sym2 Wavelet');
set(gca,'FontSize',50)
save_figure( [wavelet_name '_scale' num2str(scale) '_shift' num2str(shift)] )
I use Matlab R2014a with Windows 7 SP1 x64 Ultimate.
Upvotes: 1
Views: 148
Reputation: 1105
It seems that this problem has been fixed in Matlab R2014b. The execution of your code privides the following figure.
Upvotes: 1