Title with hidden axis in matlab figure

Alec Jacobson

July 05, 2012

weblog/

I often hide the current axis in a matlab plot figure using:
set(gca, 'visible', 'off');
But then if I call
title('Hello');
The title is not visible (as it is a child object of a hidden axis). The fix is simple:
title('Hello','Visibility','on');