Why are pie charts in multiple subplots black?

6 visualizaciones (últimos 30 días)
K E
K E el 31 de Jul. de 2012
I have a program that generates many pie charts, each within its own subplot. Oddly, after I apply a legend or resize the figure manually, the pies all turn black so that you can no longer see the color wedges. If you follow the example below then maximize the figure so you can see the pies, they should be black. This used to work in 2010 and now in R2012a it does not. What could be the cause?
figure ;
nCol = 23 ; nRow = 15 ;
iPlot = 0 ;
for iRow = 1:nRow
for iCol = 1:nCol
iPlot = iPlot + 1 ;
subplot(nRow, nCol, iPlot) ;
pie(rand(1, 6))
end
end
% When we reach this point and resize, pies are in color
% Some time after this point, pies switch to black
delete(findobj('type', 'text'))
labels = {'A', 'B', 'C', 'D', 'E', 'F'} ;
legend(labels) ;
  3 comentarios
K E
K E el 1 de Ag. de 2012
Excellent suggestion, will update the question.
Oleg Komarov
Oleg Komarov el 1 de Ag. de 2012
I cannot reproduce the problem (but I am using the pre-release 2012b). Still, it took several minutes to complete (no dedicated graphics card).

Iniciar sesión para comentar.

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 1 de Ag. de 2012
They're in color for me after the text deletion step (the text was in black).
  3 comentarios
Sean de Wolski
Sean de Wolski el 1 de Ag. de 2012
What renderer are you using?
get(gcf,'renderer')
K E
K E el 1 de Ag. de 2012
Editada: K E el 2 de Ag. de 2012
OpenGL. But when I switched to zbuffer or painters, the black pies returned to color! Time for me to learn more about renderers. I also found the figure slow to generate in opengl, and this answer has some useful information on that problem.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by