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

Clear region after using define_annotations #50

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Nov 6, 2023

It would give some unintuitive behavior:

import holoviews as hv
import pandas as pd

from holonote.annotate import Annotator, SQLiteDB

hv.extension("bokeh")

connector = SQLiteDB(filename=":memory:")
annotator = Annotator({"x": float}, connector=connector)
data = {"description": ["A", "B"], "start_number": [0.1, 0.5], "end_number": [0.4, 0.8]}
annotator.define_annotations(pd.DataFrame(data), x=("start_number", "end_number"))

hv.Curve([]) * annotator

Before:

screenrecord-2023-11-06_15.49.03.mp4

After:

screenrecord-2023-11-06_17.50.36.mp4

@hoxbro hoxbro enabled auto-merge (squash) November 6, 2023 16:51
@hoxbro hoxbro merged commit 38ed7aa into main Nov 6, 2023
12 checks passed
@hoxbro hoxbro deleted the clear_region_after_define branch November 6, 2023 16:51
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