HJC
HJC

Reputation: 131

Matlab didn't save background color correctly

I am trying to save the figure with a black background. But Matlab was only able to print it in white. I notice a similar question here:

Save MATLAB figure with different background color

But this does not solve my issue. My code is like this:

scatter3(randn(1000,1),randn(1000,1),randn(1000,1))
set(gca,'color','k')
set(gcf,'color','k')
set(gcf, 'InvertHardCopy', 'off');

I got my axis region black but the background is still white. Can you guys help me out?

I am using Matlab 2013a, if this matters. Thanks in advance!

Upvotes: 2

Views: 1603

Answers (1)

HJC
HJC

Reputation: 131

Thanks Dan for helping me on this problem. I write this basically because someone might not read the comments...

You can use saveas command to get your figures. That will solve the background issue.

Upvotes: 1

Related Questions