Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing in custom_tooltips and index the list for each nodes #228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leemojiang
Copy link

Set custom_tooltips for each nodes using custom_tooltips arg

Old version code

kmgraph,  mapper_summary, colorf_distribution = get_mapper_graph(scomplex,
                                                                 color_values,
                                                                 color_function_name='Distance to x-min',
                                                                 colorscale=my_colorscale)

# assign to node['custom_tooltips']  the node label (0 for benign, 1 for malignant)
for node in kmgraph['nodes']:
    node['custom_tooltips'] = y[scomplex['nodes'][node['name']]]

New version

ctooltips=  y

kmgraph,  mapper_summary, colorf_distribution = get_mapper_graph(scomplex,
                                                                 color_values,
                                                                 color_function_name="'Distance to x-min',
                                                                 colorscale=my_colorscale,
                                                                 custom_tooltips=ctooltips
                                                                 )



# assign to node['custom_tooltips']  the node label (0 for benign, 1 for malignant)
# assign to node['custom_tooltips']  the node label (0 for benign, 1 for malignant)
#for node in kmgraph['nodes']:
  #  node['custom_tooltips'] = y[scomplex['nodes'][node['name']]]

index the passed in custom_tooltips array for each node otherwise all the node will have the same custom_tooltips array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant