File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -804,10 +804,10 @@ def _scatter_min_data(
804804
805805 Args:
806806 axes: The matplotlib axes to plot on.
807- ped_data: DataFrame containing a single pedestrian's data.
807+ ped_data: DataFrame containing pedestrian data.
808808 color: Color of the scatter plot marker.
809809 """
810- min_data = ped_data [ped_data .frame == ped_data . frame . min ()]
810+ min_data = ped_data . loc [ped_data .groupby ( ID_COL )[ FRAME_COL ]. idxmin ()]
811811 axes .scatter (
812812 min_data .distance ,
813813 min_data .time ,
@@ -825,13 +825,13 @@ def _scatter_min_data_with_color(
825825
826826 Args:
827827 axes: The matplotlib axes to plot on.
828- ped_data: DataFrame containing a single pedestrian's data.
828+ ped_data: DataFrame containing pedestrian data.
829829 norm: Normalization for the colormap based on speed.
830830 cmap: The colormap to use for coloring the line based on speed.
831831 frame_rate: Frame rate used to adjust time values.
832832 color: Color of the scatter plot marker.
833833 """
834- min_data = ped_data [ped_data .frame == ped_data . frame . min ()]
834+ min_data = ped_data . loc [ped_data .groupby ( ID_COL )[ FRAME_COL ]. idxmin ()]
835835 axes .scatter (
836836 min_data .distance ,
837837 min_data .time ,
You can’t perform that action at this time.
0 commit comments