MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by John
on 4 Oct 2012

What I am plotting is a slice of data (a contour plot), perpendicular to an image that shows the ground surface. If I use a colorbar just plotting the contour plot, I don't have any problems. However, if I have both the image and the contour plot, the color bar goes crazy. it fills the whole figures window with numbers and "x y z" like a matrix. Has anyone encountered this? Is there a way to just associate a colorbar with a single plot when the axes has multiple plots?

*No products are associated with this question.*

Answer by John
on 4 Oct 2012

Accepted answer

Ok, many thanks to the folks at Matlab support. fixed this problem for me. the problem is with the opengl renderer. Because my figure has transparency, it was necessary to use opengl, but, by switching to software and off the graphics card using the command:

opengl software

The issue was fixed.

## 1 Comment

## John

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/49894#comment_103122

I realize now that what it does is multiply all of the labels. so if I remove the x-labels, x-ticks, etc, it doesn't have the same problem. I would like to keep the labels on of course, only one instance of each rather than dozens. It also multiplies things I added to the plot with text(). This is very strange behavior.