Tentative fix to allow `py.(i)plot(figure=fig)`. Needs to be revisited!