Drawing raises not implemented error

Issue #10 resolved
Leon van der Graaff created an issue

The following code taken from the manual raises an NotImplemented exception:

NotImplementedError: It is not currently possible to manually set the aspect on 3D axes

from py_pol.stokes import * 

S = Stokes('Linear light')
S.linear_light(azimuth=0)
print(S)
S.draw_poincare()

Further more, the option to turn off the equal axis does not work, raises the same exception

from py_pol.stokes import * 

S = Stokes('Linear light')
S.linear_light(azimuth=0)
print(S)
ax, = S.draw_poincare(axis_equal=False)

Name: matplotlib
Version: 3.2.2

Name: py-pol
Version: 1.0.1

Comments (3)

  1. JESUS DEL HOYO MUÑOZ

    Apparently, matplotlib has ax.set_aspect('equal') implemented for IPhython but not for Python, that’s why it worked for us as we were performing the tests from jupyter notebooks. I have released a hotfix and the axis_equal=True now seems to work (version 1.0.2).

  2. Leon van der Graaff reporter

    Thanks for the effort and the extremely fast response! I can confirm that using ax,fig = S.draw_poincare(axis_equal=False) now works.

    This error probably due to a recent change in Matplotlib, which actually disabled ax.set_aspect('equal') on 3D axis for it’s unreliable behavior.
    Maybe IPython is still an older Matplotlib version?

  3. Log in to comment