MATLAB: How to remove automatic selection/highlighting of the figure/axes when I use the PLOTEDIT function

highlighthighlightingMATLABplotedit

Using the PLOTEDIT function will highlight the whole figure or axes. How do I do remove this automatic selection/highlighting?
Here are steps to reproduce the issue:
figure
surf(peaks)
plotedit

Best Answer

You can set the "SelectionHighlight" property of the figure or axes to "off" in order to hide the selection highlighting. Here is an example:
figure
surf(peaks)
set(gcf,'SelectionHighlight','off')
set(gca,'SelectionHighlight','off')
plotedit
If you would like, you can further switch the default selection highlighting properties to "off" for figures and/or axes:
set(0,'DefaultFigureSelectionHighlight','off')
set(0,'DefaultAxesSelectionHighlight','off')
To have this persist between MATLAB sessions, you can place this in a "startup.m" file. Please refer to the following link for more information about using a "startup.m" file: