MATLAB: How to set axes color to ‘none’

axesbackgroundcolorMATLABnone

How can I set axes color to 'none'?

Best Answer

You can execute the following command to set the "axes" color to 'none':
MATLAB R2014b and later:
ax = gca; % ax is the handle to the axes
ax.Color = 'none';
Prior to MATLAB R2014a:
set(ax, 'Color', 'none');
You can find the relevant documentation for the above "axes" property in the following link:
From MATLAB R2018a, you can also do the same from the Property Editor as well by following the steps below:
1. Click on the axes.
2. Select More Properties.
3. Scroll down to the tab titled "Box Styling"
4. In the "Color" field type "none" and save.