Partially-overlapping subplots cause plots beneath to be totally invisible
조회 수: 13 (최근 30일)
이전 댓글 표시
When I plot multiple subplots on a figure, and the subplots' position vectors have partial overlap, the later subplots cause the earlier ones (partially beneath) to not display at all. How do I set the transparency so that overlapping subplots do not prevent the earlier ones from being visible? Thank you.
댓글 수: 0
답변 (1개)
dpb
2016년 10월 12일
It's more than that. From the subplot doc 'Tips' section:
"If a subplot specification causes a new axes object to overlap any existing axes, subplot deletes the existing axes object and uicontrol objects."
It isn't just occluding the underlying plots, they've been deleted.
What you can do is illustrated in an example for subplot...
figure
y = zeros(4,15);
for k = 1:4
y(k,:) = rand(1,15);
subplot(2, 2, k)
plot(y(k,:));
end
hax = axes('Position', [.35, .35, .3, .3]);
bar(hax,y,'EdgeColor','none')
set(hax,'XTick',[])
As given in the example, the barplot axes covers up the corners of the four subplots...you can change that behavoir somewhat by
set(hax,'color','none')
and get
instead. That help, maybe???
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!