Partially-overlapping subplots cause plots beneath to be totally invisible

조회 수: 31 (최근 30일)
George
George 2016년 10월 12일
답변: dpb 2016년 10월 12일
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.

답변 (1개)

dpb
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???

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by