Skip to content

Commit

Permalink
add support for 'scTop' plot item in hierarchy visualizations
Browse files Browse the repository at this point in the history
  • Loading branch information
perceptualrobots committed Nov 5, 2024
1 parent c1ed39e commit 5a6c5d0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nbs/04_hierarchy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,15 @@
" top_done=False\n",
" plot_items = plots.split(',')\n",
" for plot_item in plot_items:\n",
" if plot_item == 'scTop':\n",
" top_done=True\n",
" for level in self.get_top_level():\n",
" if isinstance(level, list):\n",
" for node in level:\n",
" plots_list.append(create_plot_item(node.get_reference_function(), node.get_perception_function(), node.get_name()))\n",
" else:\n",
" plots_list.append(create_plot_item(level.get_reference_function(), level.get_perception_function(), level.get_name()))\n",
"\n",
" if plot_item == 'scEdges':\n",
" top_done=True\n",
" for func in self.get_preprocessor()[1:]:\n",
Expand Down
9 changes: 9 additions & 0 deletions pct/hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,15 @@ def create_plot_item(func1, func2=None, ptitle=None):
top_done=False
plot_items = plots.split(',')
for plot_item in plot_items:
if plot_item == 'scTop':
top_done=True
for level in self.get_top_level():
if isinstance(level, list):
for node in level:
plots_list.append(create_plot_item(node.get_reference_function(), node.get_perception_function(), node.get_name()))
else:
plots_list.append(create_plot_item(level.get_reference_function(), level.get_perception_function(), level.get_name()))

if plot_item == 'scEdges':
top_done=True
for func in self.get_preprocessor()[1:]:
Expand Down

0 comments on commit 5a6c5d0

Please sign in to comment.