EPS print loses background color

2 次查看(过去 30 天)
cypher
cypher 2013-8-9
I am trying to automatically generate and export a large number of eps files, but matlab loses the background color. Due to the large number of files, exporting manually is not an option.
How can I keep the background color when exporting an EPS file?
to simplify, I tried something like this:
reset(0); % clean up
colordef black % set colordef
h = figure('Color',[0 0 0]); % create image, black background
x = rand(1,100); % define x
y = rand(1,100); % define y
c = rand(1,100); % define color coding
scatter(x,y,[],z); % plot them
xlabel('x'); % label x-axis
ylabel('y'); % label y-axis
title('title'); % title
legend('legend'); % legend
print(h,'example.eps','-depsc2') % print to file

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by