From 8970a8b94df100b303d1c3ca4ac79406bd7cfb48 Mon Sep 17 00:00:00 2001 From: Mohcine Chraibi Date: Tue, 27 Feb 2024 18:15:19 +0100 Subject: [PATCH] Update trajectories for drawable area --- analysis_tab.py | 2 +- app.py | 2 +- plots.py | 4 ++-- traj_tab.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/analysis_tab.py b/analysis_tab.py index 5ee22ac..90c14f1 100644 --- a/analysis_tab.py +++ b/analysis_tab.py @@ -477,7 +477,7 @@ def run_tab3() -> None: calculations, dv, c1 = ui_tab3_analysis() selected_file = str( st.selectbox( - ":open_file_folder: **Select a file:**", + ":open_file_folder: **Select a file**", st.session_state.files, key="tab3_filename", ) diff --git a/app.py b/app.py index 5aaa791..ffe8c5d 100644 --- a/app.py +++ b/app.py @@ -26,7 +26,7 @@ msg = st.empty() activate_tab2 = st.toggle("Activate", key="tab2", value=False) if activate_tab2: - filename = str(st.selectbox("Select a file:", st.session_state.files)) + filename = str(st.selectbox(":open_file_folder: **Select a file**", st.session_state.files)) st.session_state.selected_file = filename traj_tab.run_tab2(filename, msg) diff --git a/plots.py b/plots.py index f36a655..19f9baf 100644 --- a/plots.py +++ b/plots.py @@ -394,7 +394,7 @@ def get_scaled_dimensions(geominX, geomaxX, geominY, geomaxY): def plot_trajectories_mpl(ax, data, scale: int = 1, shift_x: int = 0, shift_y: int = 0): - """Plot data and update axis.""" + """Plot data and update axis with matplotlib.""" pid = data["id"].unique() for ped in pid: @@ -404,7 +404,7 @@ def plot_trajectories_mpl(ax, data, scale: int = 1, shift_x: int = 0, shift_y: i (pedd["y"] - shift_y) * scale, "-", color="black", - lw=0.8, + lw=0.1, ) diff --git a/traj_tab.py b/traj_tab.py index bd128d7..3d54e8b 100644 --- a/traj_tab.py +++ b/traj_tab.py @@ -49,7 +49,7 @@ def run_tab2(selected_file: str, msg: DeltaGenerator) -> None: st.write("---------") columns_to_display = ["id", "frame", "x", "y"] display = rc0.checkbox("Data", value=False, help="Display data table") - do_plot_trajectories = rc1.checkbox("Plot", value=False, help="Plot trajectories") + do_plot_trajectories = rc1.checkbox("Plot", value=True, help="Plot trajectories") do_animate = rc2.checkbox( "Animation", value=False,