policytree icon indicating copy to clipboard operation
policytree copied to clipboard

Including variable labels in the policy tree visualization

Open njawadekar opened this issue 2 years ago • 1 comments

Based on existing documentation, I understand that when outputting a policy tree object into a visualization using the plot.policy_tree function, one can add the leaf.labels argument to ensure that the "treatment" or "control" recommendations will be labelled as such.

Similarly, how can one ensure that the variable labels (rather than the variable names) are output in this plot? (i.e., in the data visualization of the policy tree, I would like the variable "SBP" to appear as its corresponding label, "Systolic Blood Pressure").

njawadekar avatar Jan 03 '23 18:01 njawadekar

Hi @njawadekar, you can rename tree$columns to the names you prefer, then plot.

erikcs avatar Jan 05 '23 05:01 erikcs