error when using create_3d_figure

Are you by any chance using Wayland? 3D graphics are currently not supported on Wayland (because VTK doesn’t support the EGL context provided by QT… it’s technical and I hope they support it one day). What I do instead is set the environment variable QT_QPA_PLATFORM=xcb before running python (or ipython, or jupyter) to force graphics to run in XWayland compatibility mode. Not perfect but it does work.