
function L = show(f, R, parent)    
    n = parent(:)';
    
    % set self referential nodes (roots) to zero
    n(n == [1:numel(f)]) = 0;
    
    treeplot(n);
    
    a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    L = reshape(a(R(:))', size(f));
    
    c = get(gca, "Children");    
    x = get(c(2), "XData");
    y = get(c(2), "YData");
    
    text(x, y, a(R(:))', "VerticalAlignment", "bottom", "HorizontalAlignment", "right");
end
