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

Add hook_up_fig_with_struct_viewer() kwarg highlight_selected #337

Merged
merged 2 commits into from
May 15, 2023

Conversation

janosh
Copy link
Member

@janosh janosh commented May 15, 2023

A function that takes the clicked or last-hovered point and returns a dict of kwargs to be passed to go.Figure.add_annotation() to highlight said point. Set to False to disable highlighting.
Defaults to

lambda point: dict(
  x=point["x"], y=point["y"], xref="x", yref="y", text=f"<b>{point['hovertext']}</b>"
)

Looks like this:

Screenshot 2023-05-14 at 17 03 49

…y]], optional) to hook_up_fig_with_struct_viewer()

Function that takes the clicked or last-hovered point and returns a dict of
kwargs to be passed to go.Figure.add_annotation() to highlight said point.
Set to False to disable highlighting. Defaults to lambda point: dict(
  x=point["x"], y=point["y"], xref="x", yref="y", text=f"<b>{point['hovertext']}</b>"
)
@janosh janosh merged commit f7cc431 into main May 15, 2023
3 checks passed
@janosh janosh deleted the hook_up_fig_with_struct_viewer-highlight_selected branch May 15, 2023 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant