I get the following warning in r2011a
set(gcf, 'Color', 'None') Warning: Setting the ColorSpec to 'none' for a figure will not be allowed in a future release.
I use the "none" color so that I can print pdf and eps files with transparent backgrounds. How are you supposed to set a transparent background?
No products are associated with this question.
You can edit the eps file generated by print, and remove the line which creates the background rectangle, thus making the background transparent.
Or you can use the latest version of export_fig, which will do this for you when the -transparent option is specified, and will allow you to export to pdf as well.
Will take a look at how you edit the eps file in export_fig (and will likely accept your answer once I do). I still don't understand why the change in MATLAB was made.
Digging in the source of print I've found the colornone command in 2011b. It has a help section, but is not included in the local or net docs.
But the warning appears also. The print command simply disables the warning:
warning('off','MATLAB:hg:ColorSpec_None')
This does not look very trustworthy.
It seems odd that they are taking away functionality without providing a replacement. This usually means you are doing something odd. In this case, I don't think I am. My guess is that there will be a replacement by the time it is obsolete.
Note that this is not just a warning. The behaviour of print in R2011b has changed over R2011a. You cannot now save an eps or pdf with no background color, and TMW has provided no way around this (to my knowledge).
What do you mean transparent? Do you mean white background color? Would the pdf or eps file come out the same as set(gcf,'Color','None') as set(gcf,'Color',[1 1 1])?
I used to use whitebg(). But it's not really white background anymore since the default color is [.8 .8 .8]. whitebg() just turns it to [.3 .3 .3]. Same is the function colordef(). I
PowerPoint is the same. Anyway, I certainly can understand the difference between transparent and white. Thanks!
I just looked at your comments again more closely. You need:
set(gca,'color','none')
It's still the same for me, in MS Word or PowerPoint. In your question, shout it be gca or gcf?
1 Comment
Direct link to this comment:
http://mathworks.com/matlabcentral/answers/19907#comment_43691
+1. I'd like to know about 'transparent'.