Add legend item for overlapping semitransparent patch regions
이전 댓글 표시
I am trying to figure out if there is a way to create a new legend item for region of overlap between two semitransparant patch objects. Looking at the semitransparent example on the patch page, it shows how patches can overlap. Below, I took the example and changed it so that the red patch is a lot less visible. I would now want a legend that says something like "condition 1", "condition 2" and "conditions 1 and 2". I want to add this to make the plot more clear to someone with colorblindness who might have trouble inferring the overlap.
Ideally adding this 3rd legend object this could be done without searching for the overlap region and making a 3rd patch. Im not sure if this is actually possible though currently in Matlab.
v1 = [2 4; 2 8; 6 6.5];
f1 = [1 2 3];
figure
patch('Faces',f1,'Vertices',v1,'FaceColor','red','FaceAlpha',.3);
v2 = [2 4; 2 8; 8 8];
f2 = [1 2 3];
patch('Faces',f2,'Vertices',v2,'FaceColor','blue','FaceAlpha',.5);
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!