Setting axis background color and saving as pdf
Show older comments
Hi,
I'm trying to saveas a pdf of a figure in which the axis background is light gray, while the rest of the background (figure background, I suppose?) is the standard clear/white. I've tried this by setting the background to gray by:
set(gca,'Color',[.8 .8 .8]);
but saveas seems to cancel this color change out. I've also tried using:
set(gcf,'InvertHardCopy','off');
and this sets the entire figure background to gray (as seen in the attached image), but I don't want the area outside the plot to be gray. Can anyone help with this?
Thanks, Jonathan
Answers (1)
Jonathan
on 17 Jan 2014
1 vote
1 Comment
Mark Vaughan
on 29 Sep 2020
this solution works wonderfully well...thanks!!
Categories
Find more on Performance and Memory in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!