From 039a027108c393335073fee2bdf71471d90ccc7c Mon Sep 17 00:00:00 2001 From: wendtalexander Date: Mon, 23 Jan 2023 09:33:47 +0100 Subject: [PATCH] adding plots --- code/plot_event_timeline.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/plot_event_timeline.py b/code/plot_event_timeline.py index c5342d0..93920b9 100644 --- a/code/plot_event_timeline.py +++ b/code/plot_event_timeline.py @@ -104,7 +104,6 @@ def correct_chasing_events( def main(datapath: str): # behabvior is pandas dataframe with all the data bh = Behavior(datapath) - embed() # chirps are not sorted in time (presumably due to prior groupings) # get and sort chirps and corresponding fish_ids of the chirps chirps = bh.chirps[np.argsort(bh.chirps)] @@ -125,7 +124,7 @@ def main(datapath: str): fish1 = (chirps[chirps_fish_ids == all_fish_ids[0]] / 60) /60 fish2 = (chirps[chirps_fish_ids == all_fish_ids[1]] / 60) /60 - fig, ax = plt.subplots(4, 1, figsize=(10, 5), height_ratios=[0.5, 0.5, 0.5, 6]) + fig, ax = plt.subplots(4, 1, figsize=(10, 5), height_ratios=[0.5, 0.5, 0.5, 6], sharex=True) # marker size s = 200 ax[0].scatter(physical_contact, np.ones(len(physical_contact)), color='red', marker='|', s=s)