lis-epfl / apg_trajectory_tracking

Training efficient drone controllers with Analytic Policy Gradient
115 stars 15 forks source link

matplotlib 3d not working #6

Closed vwueest closed 8 months ago

vwueest commented 9 months ago

For me the matplotlib 3d stopped working using Ubuntu 20.04, python 3.8.16, matplotlib 3.7.4 @NinaWie could you

  1. check your version of matplotlib
  2. and also if changing this works for you as well: rendering.py, line 400:
    ax = plt.axes(projection="3d")
    # ax = axes3d.Axes3D(fig)

    If so, i'd say we change the code to that since that fixed the rendering for me

NinaWie commented 8 months ago

Thanks for checking this. My version of matplotlib was 3.3, so quite old. The rendering worked in 3.3 with both lines (either ax = axes3d.Axes3D(fig) or ax = plt.axes(projection="3d"). When I updated matplotlib, only the new version (ax = plt.axes(projection="3d")), worked, as you observed. I therefore agree to changing the line :)

vwueest commented 8 months ago

Alright, done, updated https://github.com/lis-epfl/apg_trajectory_tracking/commit/45c7521f3ddd605c3e87b481fea9547e1cad9925