Why does exporting a SCATTER figure using the PRINT command with the '-dill' flag not work in MATLAB 7.0 (R14)?
1 view (last 30 days)
Show older comments
When exporting a figure to Adobe Illustrator format created using the SCATTER function, MATLAB returns errors and does not create the file, or creates it incompletely.
Reproduction steps:
X=[.25 .75];
Y=[.25 .75];
C=[1 0 0; 0 0 1];
scatterHandle=scatter(X,Y,25,C);
print -dill myScatter
I get the following error:
??? Error using ==> print
Error using ==> print
Error using ==> graphics\private\render
Error using ==> hardcopy
Adobe Illustrator driver does not print in Z-Buffer or OpengGL mode.
If the attempt is made to set to the 'painters' renderer using:
set(gcf, 'renderer', 'painters')
The following warning is returned and the circles no longer appear on the SCATTER plot:
Warning: RGB color data not yet supported in Painter's mode.
Accepted Answer
MathWorks Support Team
on 9 Mar 2010
This is an issue with the way the patches store CData. The following makes a direct colormapping for each of the markers so that now Painters should be able to render the plot correctly:
X=[.25 .75];
Y=[.25 .75];
C=[1 0 0; 0 0 1];
colormap(C)
scatterHandle=scatter(X,Y,25,1:size(C,1));
print -dill myScatter.ai %where myScatter.ai is the filename being created
0 Comments
More Answers (0)
See Also
Categories
Find more on Scatter Plots 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!