how to change the transparency of individual colors in the colormap of an image?
10 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I'm using bubblechart to display my data as shown below;
bubblechart(x2xz,z2xz,ones(size(x2xz)),n2xz,'MarkerFaceAlpha',0.1,'MarkerEdgeAlpha',0.2);
-this works. However it would be better if I could make MarkerFaceAlpha a variable, so that it changes based on the value of n2xz (which currently controls the colour of the bubbles). Unfortunately MarkerFaceAlpha has to be a scalar, not a vector, with bubblechart.
The plot command accepts colours in this format (where the fourth column is the transparency); 'Color',[0.0 0.0 1.0 0.3], but when I build a colormap with four columns and try to use that instead of using the MarkerFaceAlpha option, the colormap command rejects it.
I have googled this and searched Matlab Answers, but nothing useful was found.
Any suggestions would be gratefully received. Thank you.
Gordon Cooper
0 件のコメント
回答 (1 件)
DGM
2024 年 5 月 18 日
編集済み: DGM
2024 年 5 月 18 日
I don't have a new enough version to use bubblechart() or dig into its properties, but the behavior of plot() with RGBA tuples is undocumented, so don't extrapolate too far about what might be supported.
I don't know of anything which accepts a Mx4 RGBA color table. The few places I remember finding RGBA tuples in hidden properties, they weren't consistently unit-scale floats. You might be able to dig into hidden properties to make undocumented things work, but they might not.
Maybe someone has more insight into the newer stuff though.
参考
カテゴリ
Help Center および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!