TIGRE icon indicating copy to clipboard operation
TIGRE copied to clipboard

plot_geometry error in fresh Python install

Open jbgeb opened this issue 11 months ago • 3 comments

Expected Behavior

Plot the defined (or default) geometry using the demo script d01_CreateGeometry.py

Actual Behavior

Opens empty Matplotlib window. Returns error:

Exception in Tkinter callback

...

AttributeError: 'PathPatch3D' object has no attribute '_axlim_clip'

Code to reproduce the problem (If applicable)

This happens with a newly installation of tigre in a conda environment and running the first demo script (d01_CreateGeometry.py)

Specifications

  • Python version: 3.13.1
  • OS: Ubuntu 22.04.5 LTS

Package Versions:

  • matplotlib: 3.10.0
  • numpy: 2.2.1
  • pytigre: 3.0.0

jbgeb avatar Jan 02 '25 13:01 jbgeb

Thanks, I'll investigate!

In any case, this is just an auxiliary visualizing function, the computational part of TIGRE will work for you anyways, don't let it stop you :)

AnderBiguri avatar Jan 02 '25 21:01 AnderBiguri

I also meet this error.

blanklijiaustc avatar Jan 10 '25 09:01 blanklijiaustc

In "plot_geometry.py" Add the following after imports at the top of the file:

import mpl_toolkits.mplot3d.art3d as art3d

if not hasattr(art3d.PathPatch3D, "_axlim_clip"):
    art3d.PathPatch3D._axlim_clip = False

zhiyuuu avatar Jun 24 '25 02:06 zhiyuuu