Skip to content

Commit

Permalink
Standardize leading white space for edge labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mepland authored and parrt committed Dec 31, 2022
1 parent a45e264 commit a79aa94
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dtreeviz/trees.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,9 @@ def instance_gr():
path = self.shadow_tree.predict_path(x)
leaf = f"leaf{path[-1].id}"
if self.shadow_tree.is_classifier():
# TODO both regular spaces,  , and   do not move edge_label away from the line
edge_label = f" &#160;Prediction<br/> {path[-1].prediction_name()}"
edge_label = f" Prediction<br/> {path[-1].prediction_name()}"
else:
edge_label = f" &#160;Prediction<br/> {myround(path[-1].prediction(), precision)}"
edge_label = f" Prediction<br/> {myround(path[-1].prediction(), precision)}"
return f"""
subgraph cluster_instance {{
style=invis;
Expand Down

0 comments on commit a79aa94

Please sign in to comment.