Plot weighted sparsity pattern

7 ビュー (過去 30 日間)
Ji Hyun Ko
Ji Hyun Ko 2012 年 7 月 16 日
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

採用された回答

bym
bym 2012 年 7 月 16 日
編集済み: bym 2012 年 7 月 16 日
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 件のコメント
Ji Hyun Ko
Ji Hyun Ko 2012 年 7 月 17 日
It works perfect! Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSparse Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by