Matplotlib errors result in a memory leak. How can I free up that memory?

后端 未结 2 2042
盖世英雄少女心
盖世英雄少女心 2020-12-05 08:38

I am running a django app that includes matplotlib and allows the user to specify the axes of the graph. This can result in \'Overflow Error: Agg complexity exceeded

2条回答
  •  长情又很酷
    2020-12-05 09:12

    I find here http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg11809.html , it gives an interesting answer that may help

    try replacing :

    import matplotlib.pyplot as plt
    fig = plt.figure()
    

    with

    from matplotlib import figure
    fig = figure.Figure()
    

提交回复
热议问题