image thumbnail

pcboundary - boundary lines of pcolor blocks

version 1.0.1 (1.91 KB) by liuyang-y2003
Drawing boundary lines of connected components plotted by pcolor function.

3 Downloads

Updated 04 Jul 2021

View License

pcboundary draws boundary lines of blocks plotted by pcolor function
<SYNTAX>
pcboundary(X,Y,C)
pcboundary(X,Y,C,Name,Value)
<INPUT>
X,Y,C: the same inputs used by pcolor(X,Y,C)
<OPTIONAL INPUT>
Name,Value pair arguments
'box' - 'on' | 'off', draw lines between number blocks and NaN or margin blocks
general line properties in Matlab, including 'color', 'linestyle', and 'linewidth'
<NOTE>
set the LineStyle of pcolor to 'none' before using pcboundary, see example
<EXAMPLE>
[X,Y] = meshgrid(20:-1:1,1:20);
C = round(rand(20)*2);
C(4:6,4:7)=NaN;
clf
h = pcolor(X,Y,C);
h.LineStyle = 'none';
pcboundary(X,Y,C,'box','on','color','k','linewidth',1);
<COPYRIGHT>
Author: Tutu.vi
Contact: vi@tu-tu.org
Date: 2021-07-04
Version: 1.0.1

Cite As

liuyang-y2003 (2021). pcboundary - boundary lines of pcolor blocks (https://www.mathworks.com/matlabcentral/fileexchange/95268-pcboundary-boundary-lines-of-pcolor-blocks), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!