MATLAB: Ensure that patch is displayed

patchplot

I want to ensure that the patchs I plot are always displayed, not depending if they are to small compared to the current axes units.
The following minimal plot illustrates the issue:
axisLim=10000;
figure
hold on
plot(1:axisLim);
p1=patch([10 10 500 500],[0 axisLim axisLim 0],[1 1 1 1],
'EdgeColor','none',wFaceColor','r')
p2=patch([9000 9000 9001 9001],[0 axisLim axisLim 0],[1 1 1 1],
'FaceColor','r','EdgeColor','none')
The patch p1 will be visible, whereas the second won't. How can I make sure that all patchs are visible?

Best Answer

To obtain the desired effect (always show the patches in-dependably on how small they are, put the 'EdgeColor' the same color as the 'FaceColor'.
axisLim=10000;
figure
hold on
plot(1:axisLim);
p1=patch([10 10 500 500],[0 axisLim axisLim 0],[1 1 1 1],...
'EdgeColor','r','FaceColor','r')
p2=patch([9000 9000 9010 9010],[0 axisLim axisLim 0],[1 1 1 1],...
'FaceColor','r','EdgeColor','r')
hold off
I think this behavior should make sense with another pair value variable, such as ('appearIfThickerThan',Units), where units could be specified with percentage axes units or inches or so on. The 'FaceColor',and 'EdgeColor' should work the same way if I use 'EdgeColor','none' or 'EdgeColor' with the same color as the 'FaceColor'.