Why does MATLAB crash when I try to export a figure with a y-axis label on a RedHat 8 machine?

6 views (last 30 days)
Why does MATLAB crash when I try to export a figure with a y-axis label on a RedHat 8 machine?
I have plotted some data and added a label to the y-axis using the YLABEL function.When I try to export the figure to a file, MATLAB crashes.To observe this behavior, execute the following code on a RedHat 8 machine:
figure(1);
ylabel('Y');
print -dpng test.png
This produces a crash that begins with the following lines:
------------
Segmentation violation detected at Mon Oct 27 09:35:49 2003
------------
Configuration:
MATLAB Version: 6.5.1.199709 (R13) Service Pack 1
Operating System: Linux 2.4.20-20.8smp #1 SMP Mon Aug 18 14:39:22 EDT 2003 i686
Window System:The XFree86 Project, Inc (40201000), display :0.0
Current Visual: 0x23 (class 4, depth 16)
Processor ID: x86 Family 6 Model 11 Stepping 1, GenuineIntel
Virtual Machine:Java 1.3.1 with Blackdown Java-Linux Team Java HotSpot(TM) Server VM
(mixed mode)
Register State:
eax = 00000041 ebx = 4126422c
ecx = 41264ca0 edx = 00000288
esi = 089b9578 edi = 0000001d
ebp = bfff42f8 esp = bfff4290
eip = 4119ec6e flg = 00010246
Stack Trace:
[0] libc.so.6:0x4119ec6e(0x41264ca0, 0x089b96f8, 0, 0x40052334)
[1] libc.so.6:__libc_free~(0x089b96f8, 0x41264ca0, 0xbfff4348, 0x40029a86) + 124 bytes
[2] libut.so:mw_free(0x089b9700, 0x41061b04, 0x0898b66d, 0x40024e6e) + 187 bytes
[3] libut.so:utFree(0x089b9700, 0x41061b04, 0xbfff4658, 0x40f9d9db) + 46 bytes
[4] libmwuix.so:UIX_DrawStringIntoBitmap(WinRec_tag *, char const *, int)(0x41be45a0, 0x41b6d380 "Y (mm)", 90, 0x40dfc7ce) + 4901 bytes
[5] libmwgui.so:wm_DrawStringIntoBitmap(0x41be45a0, 0x41b6d380 "Y (mm)", 90, 0x4073c2c6) + 69 bytes
[6] libmwhg.so:RenderTextZbuffer(GObject_tag *, XFormedData *, RenderBuffer*)(0x08431928, 0x41b6d0f0, 0x082d9c28, 0x40760005) + 1175 bytes
[7] libmwhg.so:GO_RenderZbuffer(0x08431928, 0x41b6d0f0, 0x082d9c28, 0x406f43f2) + 44 bytes
[snip]

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This has been verified as a a bug in MATLAB 6.5 (R13) and later versions in the way figures with y-axis labels are exported on RedHat 8 machines.
Currently, to work around this issue, try the following:
1) Export to another format. In particular, exporting to one of the PostScript formats should work.
2) Change the "Rotation" property of the y-axis label text object. The problem appears to be related to text objects with their "Rotation" property set to 90. Try setting the rotation to a slightly different value, like 89 or 91. This is accomplished by the following commands:
figure(1);
ylabel('Y', 'Rotation', 91);
print -dpng test.png

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!