Partially-overlapping subplots cause plots beneath to be totally invisible
16 views (last 30 days)
Show older comments
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 Comments
Answers (1)
dpb
on 12 Oct 2016
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 Comments
See Also
Categories
Find more on Subplots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!