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

Improve PanelWidgets with visible widget and make color deterministic #100

Merged
merged 7 commits into from
Apr 23, 2024

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Apr 23, 2024

Also, memorizing the color when using groupby by using a dim expression instead of cycle.

screenrecord-2024-04-23_15.15.41.mp4
Code
import hvplot.pandas
import pandas as pd
from holonote.annotate import Annotator, SQLiteDB
from holonote.app import PanelWidgets
import panel as pn

# Setup
speed_data = pd.read_parquet("../assets/example.parquet")
curve = speed_data.hvplot("TIME", "SPEED")

annotator = Annotator(
    curve,
    fields=["category"],
    connector=SQLiteDB(table_name="styling"),
)

start_time = pd.date_range("2022-06-04", "2022-06-22", periods=5)
end_time = start_time + pd.Timedelta(days=2)
data = {
    "start_time": start_time,
    "end_time": end_time,
    "category": ["A", "B", "A", "C", "B"],
}
annotator.define_annotations(pd.DataFrame(data), TIME=("start_time", "end_time"))

# News stuff
annotator.groupby = "category"
pn.Row(PanelWidgets(annotator), annotator * curve)

Copy link

codspeed-hq bot commented Apr 23, 2024

CodSpeed Performance Report

Merging #100 will not alter performance

Comparing 1d_gui (74eefa9) with main (d9ec31e)

Summary

✅ 6 untouched benchmarks

@hoxbro hoxbro changed the title Add 1D gui interface Improve PanelWidgets with visible widget and make color deterministic Apr 23, 2024
@hoxbro
Copy link
Member Author

hoxbro commented Apr 23, 2024

I will merge this and continue working on the 1D GUI in another PR.

@hoxbro hoxbro merged commit 3b08c28 into main Apr 23, 2024
17 checks passed
@hoxbro hoxbro deleted the 1d_gui branch April 23, 2024 15:28
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