Delete axis, keep legend
Show older comments
I need to have a subplot with an empty axis, but with a legend. My workaround to put a title on an empty subplot was:
if isempty(data) % Failsafe for empty section
pie(1); % Plots any pie chart
title(data_title);
cla; % Clears axis
end
But it does not work for the legend, it vanishes with it.
How can I deal with it?
1 Comment
Alexandre Cucatti dos Santos
on 6 Aug 2019
Accepted Answer
More Answers (0)
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!