MATLAB: How to improve the grid line contrast for black figure backgrounds in MATLAB R2014b

MATLAB

The default contrast for grid lines on a black background produced by executing the function 'whitebg' is faint in MATLAB R2014b. How can I improve this contrast?

Best Answer

The 'GridAlpha' and 'MinorGridAlpha' properties can be modified to increase this contrast.
By default, the grid line contrast may be too faint:
hf = figure;
plot(1:10,1:10);
grid on; grid minor;
whitebg;
However, by changing these values the contrast is improved:
hf = figure; 
plot(1:10,1:10);
grid on; grid minor;
set(get(hf,'CurrentAxes'),'GridAlpha',0.4,'MinorGridAlpha',0.7);
whitebg;
An enhancement request has been submitted to improve the default contrast.