Two questions concerning ListDensityPlot ...
- To: mathgroup at smc.vnet.net
- Subject: [mg28497] Two questions concerning ListDensityPlot ...
- From: Daniel Kattnig <d.kattnig at chello.at>
- Date: Sun, 22 Apr 2001 21:03:15 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Dear Mathematica experts,
I'm actually trying to visualize sparsity patterns of matrixes using
Mathematica's ListDensityPlot. However, doing so I have uncounted two
problems ...
1. Given a (sparse) matrix A, I'm trying to establish a one-to-one
correspondence between the plot and the matrix it is based on, i.e. I want
the A[[1,1]] element to be plotted at the upper left and
A[[Dimensions[A][[1]],Dimensions[A][[2]]]] at the lower right corner. I've
realized this by plotting Partition[Reverse@Flatten[A],Dimensions[A][[2]]]
instead of A. However, doing so, I do not succeed in adjusting the labels
appropriately since setting
MeshRange->{{0,Dimensions[A][[1]]},{Dimensions[A][[2]],0}} does not invert
the numbering of the ordinate as I've expected. Therefor my question is:
How can I plot the matrix preserving the one-to-one correspondence and
adjust the mesh such that the upper left corner corresponds to x=1, y=1 and
the lower right to x=Dimensions[A][[2]], y=Dimensions[A][[1]]?
2. I'm desperately looking for a color function that allows the
intermediate values to be kept white, while maxima and minima are colored
red and blue respectively with the "color intensity" indicating their
absolute value. Applied to my sparse matrix problem I want the negative
entries to be blue, the positive to be red whereas the majority of entries
corresponding to zero should remain white. By the way, any suggestions
concerning the visualization of complex valued entries are also highly
appreciated. Is there an easy way to keep the phase information?
Sincerely,
Kattnig
two questions concerning ListDensityPlot