Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dxtbx.plot_detector_models fails on matplotlib 3.5 #475

Closed
ndevenish opened this issue Feb 2, 2022 · 0 comments · Fixed by #476
Closed

dxtbx.plot_detector_models fails on matplotlib 3.5 #475

ndevenish opened this issue Feb 2, 2022 · 0 comments · Fixed by #476

Comments

@ndevenish
Copy link
Collaborator

Which means that it currently fails on DIALS 3.8.

  File "/dls_sw/apps/dials/dials-v3-8-1/conda_base/lib/python3.9/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 426, in do_3d_projection
    signature = inspect.signature(artist.do_3d_projection)
AttributeError: 'Arrow3D' object has no attribute 'do_3d_projection'

This seems to be discussed in matplotlib/matplotlib#21688 with a fix, but making this change appears to change

image

to

image

So there seems to be something wrong with the projection....

phyy-nx added a commit that referenced this issue Feb 3, 2022
Fixes #475

Thanks @ndevenish for the report and initial starting point at matplotlib/matplotlib#21688.  That implementation didn't give us the nice Z zoom that we want, so after some digging, set_zlim gets us there.  The call to nonsingular is what set_zlim does if zmin == zmax, as is the case for a flat detector.  It seems to expand out the Z a bit. Calling it directly avoids a UserWarning.

Also fix orthographic=True (not sure when this broke)
ndevenish pushed a commit that referenced this issue Feb 3, 2022
Fixes #475

Also fix orthographic=True (not sure when this broke)
ndevenish pushed a commit that referenced this issue Feb 7, 2022
Fixes #475

Also fix orthographic=True (not sure when this broke)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant