MATLAB: Is it possible to add an InvertHardcopy property to axes and titles

axesexportfigurelabel;MATLABsettingstext;title

When printing a figure, the colors of the axes and title is not changed while the color of the figure is. If the original figure had white text on a black background, as is the case when the command
colordef black
is executed before opening a figure, the axes ticks, axes labels and the title do not appear on the export (white text on white background). Having a property for the axes similar to the InvertHardcopy property for a figure would prevent this issue from occuring.

Best Answer

In order to print an axes object properly on an inverted figure, you need to set the colors manually before printing. The following example shows how to do this:
% Invert color of axes, labels, and tick marks to white
set(gca,'XColor',[1 1 1],'YColor',[1 1 1],'ZColor',[1 1 1]);
%If there is a title, invert its color also (this will not fail when no title exists):
t=get(gca,'Title');
set(t,'Color',[1 1 1]);