Matplotlib giving error “OverflowError: In draw_path: Exceeded cell block limit”

后端 未结 3 1541
我在风中等你
我在风中等你 2021-02-05 02:51

I\'m trying to render an image using matplotlib with 100000000 data points and it produces the error OverflowError: In draw_path: Exceeded cell block limit

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-05 03:29

    Maybe the problem is because matplotlib uses default inline plotting, which means it connects the points. There's some limit to the points for that. But if you remove inline plotting, it might work. Try

    import matplotlib.pyplot as plt
    plt.plot(x, y, 'ro', linestyle="None")
    

    The 'ro' is for it to show red dots.

提交回复
热议问题