MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mathematica 6: No more memory available problem with ListDensityPlot

Hello Kezhao,

All though the dataset might not be too large, a problem is
the fact that the new version of ListDensityPlot in Mathematica (6.0) will
make polygons of each of the pixels. Now for smaller images this already
generates a lot of memory-consumption, but especially when your
image is quite large it will eat away everything you've got in your memory. 

A better way to solve this problem would be to use ArrayPlot. This function has similar behavior as the old ListDensityPlot. The only difference is that it considers Arrays, and not Images. You can see this difference in the the way coordinates are used within the image. An image plotted with arrayplot appears to be upside down. To solve this, set the option DataReversed to True.  

Another solution would be to use the package MathVisionTools, which has 
a function called RasterPlot, which does the same thing as ArrayPlot, but is slightly faster. MathVisionTools is developed at the Technical University of Eindhoven (Netherlands) and can be downloaded from
(you will have to acquire a login code from the authors).  

ArrayPlot[d,AspectRatio=C2=AE 0.3,ColorFunction=C2=AE"Rainbow",DataReversed=C2=AETrue]



  • Prev by Date: Re: An Elegant way of plotting the Pole-Zero diagram
  • Next by Date: Re: Possible Bug Report: CoefficientList
  • Previous by thread: Mathematica 6: No more memory available problem with ListDensityPlot
  • Next by thread: MathLink Wrapper