You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Disabling excessive pop-ups in Analyze videos #3164
Is your feature request related to a problem? Please describe.
In the Analyze videos tab of the GUI, when one selects the checkboxes Plot trajectories and Show trajectory plots and chooses a set of body parts, four pop-up plots appear once the Analyze Videos button is clicked. These plots have the titles Figure 1, Figure 2, Figure 3, and Figure 4.
However, if the Analyze Videos button is pressed again and Show trajectory plots is still checked, 8 figures pop up. If the button is pressed again, 12 figures pop up, and so on.
Describe the solution you'd like
It would be great if whenever Analyze Videos button is pressed and Show trajectory plots is selected, only four plots pop up, corresponding to the current selection of body parts.
Describe alternatives you've considered
This isn't an alternative per se, more a proposed solution. Add the following in line 307 of deeplabcut/utils/plotting.py, in the function plot_trajectories:
# Close existing figures if showing new ones to prevent accumulation
# when the Analyze Videos button is pressed multiple times
if showfigures:
plt.close("all")
Additional context
The sets of four plots that appear correspond to hist.png, plot.png, plot-likelihood.png, and trajectory.pn in videos/plot-poses of the opened DLC project.
Activity
Close figures before plotting to avoid overflowing the screen with ol…
deruyter92 commentedon Jan 6, 2026
Hi @gianmarco-terrones, this sounds reasonable to me. I have created PR #3168 for your proposed feature, please try it if you want.
Close figures before plotting (#3168)
deruyter92 commentedon Feb 13, 2026
This issue was resolved in PR #3168