NeLy-EPFL / DeepFly3D

Motion capture (markerless 3D pose estimation) pipeline and helper GUI for tethered Drosophila.
GNU Lesser General Public License v3.0
89 stars 17 forks source link

matplotlib versions >= 3.9 show a slightly zoomed in 3D plot #55

Closed Dominic-DallOsto closed 1 month ago

Dominic-DallOsto commented 1 month ago

Problem

matplotlib v3.9 has the extra factor of 25/24 added to the zoom that earlier versions didn't have, which causes 3D plots to appear slightly zoomed in on newer versions

Old:

image

New:

image

Dominic-DallOsto commented 1 month ago

Solution

This is explained in the matplotlib docs here. To force the old behaviour we just have to set plt.rcParams['axes3d.automargin'] = True