Highlighting columns in figure

2 ビュー (過去 30 日間)
Athos
Athos 2011 年 8 月 8 日
I have made a figure showing the values of a matrix by relative colorvalues [have made use of imagesc(matrix)]. I would like two highlight two colums (say 7 and 19) by making them lighter.
As such the final result will be a two highlighted vertical bands in the figure.
Any sugestions as to how I can do this?

採用された回答

Desiree
Desiree 2011 年 8 月 8 日
You can use property AlphaData to make certain columns transparent:
h = imagesc(rand(10));
ad = ones(10); ad(:,2) = 0.5; ad(:,7) = 0.5;
set(h,'AlphaData',ad)
  2 件のコメント
Athos
Athos 2011 年 8 月 8 日
Thank you, that worked great.
However, I have a small question. If I use axis, they seem to be mirrored (together with the labels) by this method. How could I fix this?
Athos
Athos 2011 年 8 月 8 日
Nevermind, the problem went away when I saved the figure.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by