This function creates a full-page layout consisting of a decision tree plot, a heatmap, and optional evaluation results. It is designed for use in reporting classification or clustering trees with additional visual indicators.
draw_all(
prepare_tree,
heat,
total_w = 297,
total_h = 210,
layout,
x_eval_start = 15,
y_eval_start = NULL,
eval_text = 7,
eval_res = NULL,
print_eval = TRUE,
show_col_prox = TRUE,
show_row_prox = TRUE
)Draws the full visualization to the current graphics device.
Called for its side effect; returns invisible(NULL).
A list returned from a tree preparation function,
containing plot_data and branches for tree structure.
A grob object representing the heatmap visualization. Usually generated with grid.grabExpr(draw(...))
Total width of the drawing in mm. Default is 297 (A4 landscape width).
Total height of the drawing in mm. Default is 210 (A4 landscape height).
A list specifying layout parameters: tree_w, tree_h, margin, and offset_h.
X-axis starting position (in mm) for evaluation text. Default is 15.
Y-axis starting position (in mm) for evaluation text. If NULL, it will be computed automatically.
Font size for the evaluation text. Default is 6.
A list with evaluation result text from eval_tree() (including data_info, train_metrics, and test_metrics).
Logical, whether to show evaluation results. Default is TRUE.
Logical, whether to show column proximity.
Logical, whether to show row proximity.
# \donttest{
# See dtGAP() for a full end-to-end example
# that internally calls draw_all().
# }
Run the code above in your browser using DataLab