4

I want to get the interaсtive Matplotlib window in IPython notebook. I have several 2D points and I want to draw this. So I do

import matplotlib.pyplot as plt, mpld3
plt.scatter(points[0], points[1], color='r')
mpld3.show() 

But I get error Object of type 'ndarray' is not JSON serializable. So how can I win it?

Multifora
  • 133
  • 1
  • 10
  • I find another library for building interactive graphics. And it helps me. It's https://plot.ly/python/. – Multifora Oct 18 '18 at 17:11
  • 1
    Here is a [Fix for the issue](https://stackoverflow.com/questions/47380865/json-serialization-error-using-matplotlib-mpld3-with-linkedbrush) Also, you can read here [more details for the cause of the error](https://stackoverflow.com/questions/48015030/mpld3-with-python-error) – Arie Apr 10 '19 at 14:04
  • this worked for me: https://stackoverflow.com/questions/47380865/json-serialization-error-using-matplotlib-mpld3-with-linkedbrush – kryyy Jan 16 '20 at 15:02
  • Does this answer your question? [Json serialization error using matplotlib mpld3 with LinkedBrush](https://stackoverflow.com/questions/47380865/json-serialization-error-using-matplotlib-mpld3-with-linkedbrush) – Mohamed Taher Alrefaie Feb 10 '20 at 12:10

0 Answers0