Skip to content

Commit

Permalink
layout.py: cosmetics
Browse files Browse the repository at this point in the history
Fix the indentation of the example, and the units of the angle-
properties (they are given in degrees, not radians).
  • Loading branch information
jordibc committed Jan 16, 2025
1 parent b861159 commit 3026c8a
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions ete4/smartview/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@
Example of a tree style in use::
my_tree_style = {
'shape': 'circular', # or 'rectangular'
'radius': 5,
'angle-start': -pi/2,
'angle-end': pi/2, # alternatively we can give 'angle-span'
'node-height-min': 10,
'content-height-min': 5,
'collapsed': {'shape': 'outline', 'fill-opacity': 0.8},
'show-popup-props': None, # all defined properties
'hide-popup-props': ['support'], # except support
'is-leaf-fn': lambda node: node.level > 4,
'box': {'fill': 'green', 'opacity': 0.1, 'stroke': 'blue'},
'dot': {'shape': 'hexagon', 'fill': 'red'},
'hz-line': {'stroke-width': 2},
'vt-line': {'stroke': '#ffff00'},
'aliases': {
'support': {'fill': 'green'}, # changes the default one
'my-leaf': {'fill': 'blue', 'font-weight': 'bold'},
'shape': 'circular', # or 'rectangular'
'radius': 5,
'angle-start': -180,
'angle-end': 180, # alternatively we can give 'angle-span'
'node-height-min': 10,
'content-height-min': 5,
'collapsed': {'shape': 'outline', 'fill-opacity': 0.8},
'show-popup-props': None, # all defined properties
'hide-popup-props': ['support'], # except support
'is-leaf-fn': lambda node: node.level > 4,
'box': {'fill': 'green', 'opacity': 0.1, 'stroke': 'blue'},
'dot': {'shape': 'hexagon', 'fill': 'red'},
'hz-line': {'stroke-width': 2},
'vt-line': {'stroke': '#ffff00'},
'aliases': {
'support': {'fill': 'green'}, # changes the default one
'my-leaf': {'fill': 'blue', 'font-weight': 'bold'},
},
}
Expand Down

0 comments on commit 3026c8a

Please sign in to comment.