code: def _show_mpl_backend_errors(self):
          
          if not self.external_kernel:
              self.shellwidget.silent_execute(
                      "get_ipython().kernel._show_mpl_backend_errors()")
          self.shellwidget.sig_prompt_ready.disconnect(
              self._show_mpl_backend_errors)
docs: Show possible errors when setting the selected Matplotlib backend.