From: Luca Cerone on
Dear all,
I have a small issue producing plots in Matlab on my Ubuntu machine:
when i plot something and use:

set(gca,'Color','none')

the background turns to black, though when saving using export_fig (found in the repositories) the result is correct.

Any idea why this is happening?
Cheers, -Luca
From: Oliver Woodford on
"Luca Cerone" <luca_cerone#_remove_this#@yahoo.it> wrote in message <i3rd9o$o6r$1(a)fred.mathworks.com>...
> Dear all,
> I have a small issue producing plots in Matlab on my Ubuntu machine:
> when i plot something and use:
>
> set(gca,'Color','none')
>
> the background turns to black, though when saving using export_fig (found in the repositories) the result is correct.
>
> Any idea why this is happening?
> Cheers, -Luca

On Ubuntu, when a figure's color is set to 'none', the shown color it isn't always white or hatched, but can sometimes be a previously used background color. During exporting, export_fig can change the background color to black, before changing it to white and then back to none. It is a MATLAB "feature" that the shown color remains black. Calling:

>> set(gcf, 'color', 'w')
>> set(gcf, 'color', 'none')

fixes it for me.

HTH,
Oliver