> To: Nils Wagner <nwagner@...>
> Cc: SciPy Users List <scipy-user@...>,
> Subject: Re: [Matplotlib-users] Visualizing Sparsity Pattern of matrices
> From: John Hunter <jdhunter@...>
> Date: Thu, 11 Nov 2004 09:16:03 -0600
>>>>>>"Nils" == Nils Wagner <nwagner@...> writes:
> Nils> Hi all, Structure plots provide a quick visual check on the
> Nils> sparsity pattern of the matrix. A structure plot is a
> Nils> rectangular array of dots; a dot is black if the
> Nils> corresponding matrix element is nonzero otherwise it is
> Nils> white.
> Nils> Is it possible to generate such plots with scipy or should
> Nils> we switch over to matplotlib ?
> Here's another implementation that uses images - likely to be much
> faster for very large matrices.
As part of a programming environment for optimization in Python (soon to
be released hopefully), I use Matplotlib for the graphics. I created
several functions imitating Matlab's spy() using scatter(). My sparse
matrices are represented in linked-list, compressed column or compressed
row storage using the PySparse implementation
Using scatter, I can plot the sparsity pattern of matrices with several
thousands of lines and columns in a blink on my 1.7GHz P4 laptop. Using
color maps, you can even color your dots according to the magnitude of
the element they represent (a 2-dimensional "city plot" of a matrix).
Get latest updates about Open Source Projects, Conferences and News.