Plot weighted sparsity pattern

6 visualizaciones (últimos 30 días)
Ji Hyun Ko
Ji Hyun Ko el 16 de Jul. de 2012
Hi,
I am trying to visualize a weighted (i.e., color-coded) sparsity pattern. I tried "spy" but it only shows '1' and '0', and I want to show the weighted (color coded with spectra) dots.
For example, I created the adjacency matrix (for graph theory) using Pearson's correlation thresholded at p<0.01. However, I want to show the rho's in some thing like spy...
Please help!
Best,
Ji Hyun

Respuesta aceptada

bym
bym el 16 de Jul. de 2012
Editada: bym el 16 de Jul. de 2012
See if this gets you close
x = rand(100);
y = zeros(100);
y(x<.025) = x(x<.025);
cmap = [1 1 1;jet];
imagesc(y)
colormap(cmap)
  1 comentario
Ji Hyun Ko
Ji Hyun Ko el 17 de Jul. de 2012
It works perfect! Thank you!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Sparse Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by