export_fig Warning: RGB color data not yet supported in Painter's mode
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Michael Backmann
il 3 Nov 2011
Commentato: Spigge
il 7 Ago 2014
Hi!
I'm using the function 'export_fig' to save my figures in pdf format. When I try to save, it shows me this error:
"Warning: RGB color data not yet supported in Painter's mode
In legendcolorbarlayout>doParentResize at 335
In /usr/site/hpc/x86_64/glibc-2.5/generic/matlab/R2011a/toolbox/matlab/graphics/hardcopy.p>hardcopy at 22
In graphics/private/render at 142
In print>LocalPrint at 271
In print at 228
In print2eps at 42
In export_fig at 377
In vertical_plot at 404
In main_function at 166"
This Warning is repeated for maybe 30 times. Then the figure is saved to pdf, but the contourplot is missing. -only the edges of the contourplot are visible. You can download the original figure and the pdf file on this link:
How can I fix this problem?
Im using MATLAB 7.12.0 (R2011a) on a supercomputer. Ghostscript 8.70-6.e15 is installed.
Thank you!
-Michael
1 Commento
Walter Roberson
il 3 Nov 2011
Your link is to a .rar file, which reduces the number of people who will download it. For example my system does not handle .rar files.
Risposta accettata
Qiaonan Duan
il 25 Lug 2013
Modificato: Qiaonan Duan
il 25 Lug 2013
My solution is to add all your colors to colormap. Then index them when ploting.
For example, for a scatter plot:
cmap = .....; %self defined colormap
colorIdx = ....; %map color to each dot by index
colormap(cmap); %change colormap variable to customized colormap
scatter(X,Y,s,colormap); % This scatter plot is able to export as eps.
Più risposte (4)
Jan
il 3 Nov 2011
This is not a problem of export_fig, but of the export of vector graphics: With the OpenGL and ZBuffer renderers you can create nice 3D graphics using RGB values to define the colors of objects. But then you can export pixel graphics only.
To create scalable vector graphics for the PDF export, the Painters renderer is used. But then you cannot use a Z-buffer painting, transparency and shaded RGB colors.
1 Commento
Spigge
il 7 Ago 2014
The post is old but this issue continues to cause problems. I want to export to pfd or eps but I get the same warnings (42 of them to be precise) and a poor quality as a result. How can I identify ALL objects that need to be coverted to indexed color? I have several hundered graphical objects of different types in my application. I have tried using findall(gcf,'type','patch') but only 12 out of the 42 warnings seem to be caused by patch objects. What else should I look for and can I use the same fix as Solution 1-6OTPQE for all types of identified objects?
Thanks
Fredrik
Walter Roberson
il 3 Nov 2011
Before calling export_fig, try
set(gcf, 'Renderer', 'zbuffer')
drawnow();
0 Commenti
Oliver Woodford
il 25 Mar 2012
I added a paragraph in this issue to the export_fig webpage: http://sites.google.com/site/oliverwoodford/software/export_fig
0 Commenti
Vedere anche
Categorie
Scopri di più su Graphics Performance in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!