Skip to content

Commit

Permalink
Change in the colormap call method of the interactive visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
panagiotisanagnostou committed Jul 1, 2024
1 parent 348091d commit ddba727
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/HiPart/interactive_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def Splitpoint_Manipulation_Callback(
category_order = {
"cluster": [str(i) for i in range(len(np.unique(data_matrix["cluster"])))]
}
color_map = matplotlib.cm.get_cmap("tab20", number_of_nodes)
color_map = matplotlib.colormaps["tab20"].resampled(number_of_nodes)
colList = {str(i): _convert_to_hex(color_map(i)) for i in range(color_map.N)}

with open(data["new_input_object"], "rb") as cls_file:
Expand Down Expand Up @@ -420,7 +420,8 @@ def Splitpoint_Manipulation_Callback(
order = {
"cluster": [str(i) for i in range(len(np.unique(data_matrix["cluster"])))]
}
map = matplotlib.cm.get_cmap("tab20", number_of_nodes)

map = matplotlib.colormaps["tab20"].resampled(number_of_nodes)
color_list = {str(i): _convert_to_hex(map(i)) for i in range(map.N)}

with open(data["new_input_object"], "rb") as obj_file:
Expand Down

0 comments on commit ddba727

Please sign in to comment.