Can you provide a complete, standalone example that reproduces the 
problem. Otherwise all I can do is guess.

The usual culprit is forgetting to close figures after you're done with 
them.

Mike

On 10/10/2013 09:05 AM, Martin MOKREJŠ wrote:
> Hi,
>    rendering some of my charts takes almost 50GB of RAM. I believe below is a 
> stracktrace
> of one such situation when it already took 15GB. Would somebody comments on 
> what is
> matplotlib doing at the very moment? Why the recursion?
>
>    The charts had to have 262422 data points in a 2D scatter plot, each point 
> has assigned
> its own color. They are in batches so that there are 153 distinct colors but 
> nevertheless,
> I assigned to each data point a color value. There are 153 legend items also 
> (one color
> won't be used).
>
> ^CTraceback (most recent call last):
> ...
>      _figure.savefig(filename, dpi=100)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/figure.py", line 1421, 
> in savefig
>      self.canvas.print_figure(*args, **kwargs)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py", 
> line 2220, in print_figure
>      **kwargs)
>    File 
> "/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 
> 505, in print_png
>      FigureCanvasAgg.draw(self)
>    File 
> "/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 
> 451, in draw
>      self.figure.draw(self.renderer)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/artist.py", line 54, 
> in draw_wrapper
>      draw(artist, renderer, *args, **kwargs)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/figure.py", line 1034, 
> in draw
>      func(*args)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/artist.py", line 54, 
> in draw_wrapper
>      draw(artist, renderer, *args, **kwargs)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/axes.py", line 2086, 
> in draw
>      a.draw(renderer)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/artist.py", line 54, 
> in draw_wrapper
>      draw(artist, renderer, *args, **kwargs)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/collections.py", line 
> 718, in draw
>      return Collection.draw(self, renderer)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/artist.py", line 54, 
> in draw_wrapper
>      draw(artist, renderer, *args, **kwargs)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/collections.py", line 
> 276, in draw
>      offsets, transOffset, self.get_facecolor(), self.get_edgecolor(),
>    File "/usr/lib64/python2.7/site-packages/matplotlib/collections.py", line 
> 551, in get_edgecolor
>      return self._edgecolors
> KeyboardInterrupt
> ^CError in atexit._run_exitfuncs:
> Traceback (most recent call last):
>    File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
>      func(*targs, **kargs)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/_pylab_helpers.py", 
> line 90, in destroy_all
>      gc.collect()
> KeyboardInterrupt
> Error in sys.exitfunc:
> Traceback (most recent call last):
>    File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
>      func(*targs, **kargs)
>    File "/usr/lib64/python2.7/site-packages/matplotlib/_pylab_helpers.py", 
> line 90, in destroy_all
>      gc.collect()
> KeyboardInterrupt
>
> ^C
>
>
> Clues what is the code doing? I use mpl-1.3.0.
> Thank you,
> Martin
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
                    _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to