Correct.
On Tue, May 28, 2013 at 9:42 AM, zetah wrote:
> Albert Kottke wrote:
> >
> >I had this problem as well. I think my solution was to tell the
> >garbage collector to collect.
> >
> >import gc
> >import numpy as np
> >import matplotlib.pyplot as plt
> >
> >def draw_fig(arr, fn):
> >fi
Albert Kottke wrote:
>
>I had this problem as well. I think my solution was to tell the
>garbage collector to collect.
>
>import gc
>import numpy as np
>import matplotlib.pyplot as plt
>
>def draw_fig(arr, fn):
>fig = plt.figure()
>ax = fig.add_subplot(111)
>ax.contourf(arr)
>plt.s
I had this problem as well. I think my solution was to tell the garbage
collector to collect.
import gc
import numpy as np
import matplotlib.pyplot as plt
def draw_fig(arr, fn):
fig = plt.figure()
ax = fig.add_subplot(111)
ax.contourf(arr)
plt.savefig(fn)
plt.close(fig)
gc
"zetah" wrote:
>
>Eric Firing wrote:
>>
>>plt.close(fig) # that should take care of it
>
>Thanks for your quick reply.
>
>I tried before posting `plt.close()` and it didn't work, but also
>`plt.close(fig)` doesn't change memory pumping with every loop.
>BTW, I'm on Windows with Matplotlib
Eric Firing wrote:
>
>plt.close(fig) # that should take care of it
Thanks for your quick reply.
I tried before posting `plt.close()` and it didn't work, but also
`plt.close(fig)` doesn't change memory pumping with every loop.
BTW, I'm on Windows with Matplotlib 1.2.1
-
On 2013/05/27 9:51 PM, zetah wrote:
> Hi,
>
> if I use something like this:
>
> ==
> import numpy as np
> import matplotlib.pyplot as plt
>
> def draw_fig(arr, fn):
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax.contourf(arr)
>