For Programmers: Free Programming Magazines  


Home > Archive > Matlab > December 2005 > Re: print does not save the figure background colo









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: print does not save the figure background colo
PB

2005-12-17, 7:05 pm

Pink Magic wrote:
>
>
> When plotting a complex surface with surf, I set figure
> background colour with the command:
>
> set(gcf,'Color'='cyan');
>
> and the background became cyan in the Matlab graph
> window indeed. However, after saving this graph with
>
> print -djpeg99 graph.jpg
>
> I discovered that in the file the background is turned
> back to the default white. Same is true for -depsc2
> and -dtiff. Whether it is possible at all to save the
> figure background color in the file?
> Regards, PM
>


I guess you made a typo above, it should read
set(gcf,'Color','cyan')
Anyway, add this before printing
set(gcf,'InvertHardcopy','off')

hth
/PB
Pink Magic

2005-12-17, 9:59 pm

In article <ef20129.0@webx.raydaftYaTP>, pbodin@_REMOVE_THiS_kth.se says...
> Pink Magic wrote:
>
> I guess you made a typo above, it should read
> set(gcf,'Color','cyan')
> Anyway, add this before printing
> set(gcf,'InvertHardcopy','off')
>
> hth
> /PB


Yes, I made a typo, should be coma not equal. Sorry.
Many thanks for the advice.
Regards, PM

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com