Skip to content

Commit

Permalink
Update trajectories for drawable area
Browse files Browse the repository at this point in the history
  • Loading branch information
chraibi committed Feb 27, 2024
1 parent 21d1361 commit 8970a8b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion analysis_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
)


Expand Down
2 changes: 1 addition & 1 deletion traj_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8970a8b

Please sign in to comment.