hfill and vfill
h = vfill(xbounds,ColorSpec,varargin) creates fill objects bounded by the values xbounds. ColorSpec defines the color of the fill objects. Optional varargin can be used to set edgecolor, transparency, etc.
Syntax
hfill(scalarValue)
hfill([ystart yend])
hfill([ystart1,yend1,ystart2,yend2,...,ystartn,yendn])
hfill(...,ColorSpec)
hfill(...,ColorSpec,'PatchProperty','PatchValue')
hfill(...,'bottom')
h = hfill(...)
Description
hfill(scalarValue) places a horizontal line along y = scalarValue.
hfill([ystart yend]) fills a horizontal shaded region bounded by ystart and yend.
hfill([ystart1,yend1,ystart2,yend2,...,ystartn,yendn]) fills multiple horizontal regions.
hfill(...,ColorSpec) defines the face color of the patch(es) created by hfill. ColorSpec can be one of the Matlab color names (e.g. 'red'), abbreviations (e.g. 'r', or rgb triplet (e.g. [1 0 0]). ColorSpec may also be 'gray'.
hfill(...,ColorSpec,'PatchProperty','PatchValue') defines patch properties such as 'EdgeColor' and 'FaceAlpha'.
hfill(...,'bottom') places the newly created patch(es) at the bottom of the uistack.
h = hfill(...) returns handle(s) of newly created patch objects.
Cite As
Chad Greene (2024). hfill and vfill (https://www.mathworks.com/matlabcentral/fileexchange/43090-hfill-and-vfill), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: hline and vline, Improved 'vline'
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.