Errors plotting after installing mpld3

I saw a notification from PyCharm prompting to install mpld3 for interactive plots and I accepted it.

Since then, my plots that previously worked are now failing. I have noticed that for very simple plots, such as

import matplotlib.pyplot as plt
x = [1, 2, 3]
y = [1, 2, 3]
plt.plot(x, y)
plt.show()

work fine, but when trying to use my actual datasets I get an error. How can I solve this issue? Either to plot my actual datasets, or to return to the previous behavior static plots in the plot toolbar?

I found that if I use matplotlib.use('qtagg') then the plot using my data also works fine, which makes me thing this is a PyCharm issue.

The error I get:

Error: failed to send plot to http://127.0.0.1:63342
Traceback (most recent call last):
 File "C:\Users\jakub\AppData\Local\Programs\PyCharm Professional\plugins\python\helpers\pycharm_display\datalore\display\display_.py", line 86, in _send_display_message
   urllib_request.urlopen(url, buffer)
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 216, in urlopen
   return opener.open(url, data, timeout)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 519, in open
   response = self._open(req, data)
              ^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 536, in _open
   result = self._call_chain(self.handle_open, protocol, protocol +
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 496, in _call_chain
   result = func(*args)
            ^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 1377, in http_open
   return self.do_open(http.client.HTTPConnection, req)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 1352, in do_open
   r = h.getresponse()
       ^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\http\client.py", line 1378, in getresponse
   response.begin()
 File "C:\Users\jakub\anaconda3\Lib\http\client.py", line 318, in begin
   version, status, reason = self._read_status()
                             ^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\http\client.py", line 279, in _read_status
   line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\socket.py", line 706, in readinto
   return self._sock.recv_into(b)
          ^^^^^^^^^^^^^^^^^^^^^^^
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
 File "C:\Users\jakub\AppData\Local\Programs\PyCharm Professional\plugins\python\helpers\pycharm_display\datalore\display\display_.py", line 61, in try_empty_proxy
   urllib_request.urlopen(url, buffer)
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 216, in urlopen
   return opener.open(url, data, timeout)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 519, in open
   response = self._open(req, data)
              ^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 536, in _open
   result = self._call_chain(self.handle_open, protocol, protocol +
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 496, in _call_chain
   result = func(*args)
            ^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 1377, in http_open
   return self.do_open(http.client.HTTPConnection, req)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\urllib\request.py", line 1352, in do_open
   r = h.getresponse()
       ^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\http\client.py", line 1378, in getresponse
   response.begin()
 File "C:\Users\jakub\anaconda3\Lib\http\client.py", line 318, in begin
   version, status, reason = self._read_status()
                             ^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\http\client.py", line 279, in _read_status
   line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\jakub\anaconda3\Lib\socket.py", line 706, in readinto
   return self._sock.recv_into(b)
          ^^^^^^^^^^^^^^^^^^^^^^^
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
2
Hello,
Unfortunately, this is a known issue: https://youtrack.jetbrains.com/issue/PY-49055/Unable-to-show-large-plots-in-PyCharm-with-sciview.
Please vote for it to raise its relevance and receive updates regarding its status. If you are not familiar with voting on YouTrack, you may find relevant information in this article (https://www.jetbrains.com/help/youtrack/server/vote-for-issues.html).
2

请先登录再写评论。