How to create a legend with multiple rows or fit a legend within the plotting area. Following is my code and output plot
figure;
col = jet(numel(node_id_without_duplicates));
%legend('Node ');
for i=1:numel(node_id_without_duplicates)
specific_node = node_id_without_duplicates(i);
legendInfo{i} = ['Node ', num2str(specific_node)];
MTBF_Specific_Node; //This is the call of an another tool created by me and not included in this example.
end
legend(legendInfo);