Shaded areas in scatter figure

7 ビュー (過去 30 日間)
Tom
Tom 2012 年 2 月 8 日
I would like to emphasize 6 areas in a scatter figure by shading the background areas and labeling them. So far I could only emphasize the areas by adding lines (hv, hh1, hh0).
figure
scatter(iDLvector,kaDLvector,'DisplayName','iDLvector,kaDLvector')
xlabel('iDL')
ylabel('kaDL')
title('Displaced-Lognormal Distribution')
axis([-0.25 0.25 -3 3])
hv = line([0 0],[-3 3]);
hh1 = line([-0.25 0.25],[1 1]);
hh0 = line([-0.25 0.25],[0 0]);
set([hh0 hv hh1],'LineStyle','--','Color','k')
figure(gcf);
The first area would be (-0.25 0) for the horizontal and (1 3) for the vertical, the second area (-0.25 0) for the horizontal and (0 1) for the vertical, and so on...
Thank you very much!

採用された回答

Matt Tearle
Matt Tearle 2012 年 2 月 8 日
Something like this?
patch([-0.25,0,0,-0.25],[1 1 3 3],[0.5 0 0.8],'FaceAlpha',0.4,'EdgeColor','none')
patch([0,0.25,0.25,0],[-3 -3,0,0],[0 1 0.5],'FaceAlpha',0.4,'EdgeColor','none')
(etc)

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by