Why is the position of my labels incorrect when I use XLABEL, YLABEL, and/or ZLABEL in MATLAB 6.5 (R13) on UNIX/Linux?

2 views (last 30 days)
Why is the position of my labels incorrect when I use XLABEL, YLABEL, and/or ZLABEL in MATLAB 6.5 (R13) on UNIX/Linux?
I have created a GUI using GUIDE. The following is the only code I have added to the skeleton:
axes(handles.axes1);
axis([-4 3 -2 9]);
xlabel('x(cm)');
The position of the xlabel is incorrect if I run my GUI on UNIX (xlabel is located at (0,0)). However, xlabel is positioned correctly on Windows 2000.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
This is a bug in MATLAB 6.5 (R13) that our development staff is currently investigating.
To avoid the problem, set the Units property for the labels to 'normalized' and then change only the axes limits:
axes(handles.axes1);
h = xlabel('x(cm)');
set(h,'units','norm')
axis([-4 3 -2 9]);

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!