trouble with producing colorful images using pcolor command

I am recently using a new computer and a version of MATLAB 2011a is installed on it. When trying to produce images with the "pcolor" command from a fully rank 2-dimensional matrix, I just see a totally black figure without any image. The following error appears on the command window:
Exception in thread "AWT-EventQueue-0" java.lang.InternalError: HTHEME is null at sun.awt.windows.ThemeReader.paintBackground(Native Method) at sun.awt.windows.ThemeReader.paintBackground(Unknown Source) at com.sun.java.swing.plaf.windows.XPStyle$SkinPainter.paintToImage(Unknown Source) ...
I have also recently updated the JAVA program to the final version of 7 (64 bit). It would be so kind of you to help me to fix this error.

2 Comments

Try
imagesc(yourMatrix);
and tell us what is displayed
I could see a colorful image of the matrix using this command. However, it seems that different shading commands such as "shading interp" is not working with imagesc.
While googling the problem, I saw that if I use the following command then the image become visible:
set(gcf,'Renderer','ZBuffer')
Was it really a problem with Java?

Sign in to comment.

 Accepted Answer

So don't use pcolor at all. Despite me asking several times no one has ever told me why they want to use the deceptive pcolor instead of a normal display method that does what you expect. I don't like the way that pcolor has one less row and column than the array you're displaying and pixels with the same value won't get colored the same. Use imshow(), image(), or imagesc() instead.

More Answers (1)

You really need to use the Java that came with your version of MATLAB, as MATLAB versions are closely tied to specific Java versions.
It wasn't supposed to be that way... Java was supposed to be Portable! Portable! Portable!... but... To be honest, I don't know why Java ended up as temperamental as it did.

Community Treasure Hunt

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

Start Hunting!