If I print a figure in MATLAB the background of the plot gets rendered black instead of white, like this:
(But in the figure window of MATLAB it is white as it is supposed to be)
This is the code similar to the one used to print the figure(but will run copy-paste):
figure;
set(0,'DefaultAxesFontSize',13)
set(0,'DefaultTextFontSize',13)
set(gcf, 'Renderer', 'painters');
y = 1:100;
plot(y)
xlabel('Some X', 'FontSize', 14)
ylabel('Some Y', 'FontSize', 14)
title('Example', 'FontSize', 15)
legend('some function')
print(gcf,'test1.pdf','-dpdf')
If I add the following line, however, it works (but there a slight grey background in the areas around the plot, of course)
set(gcf, 'color', [0.99 0.99 0.99])
My MATLAB version is R2013a (8.1.0.604)
edit:
set(gcf, 'InvertHardCopy', 'off');
does not resolve the issue.
edit2:
The problem seams to be caused by the HG2-Update.