linpat.m
No License
linpat creates a line pattern (hatching) in a rectangular area. Angle (1-179 deg) as well as line density, line style and color can be specified.
------------------------------------------------
Fills specified box with line pattern.
Use: linpat([x1 x2],[y1 y2],{options})
Options:
-'a' angle 1-179 deg
-'c' color [R G B]
-'d' pattern density
-'h' handle to plot axes
-'s' line style ('-.',':',...)
-'w' line width
Example:
linpat([0 150],[1 450],'a80','c[0 0 1]','w2')
->plots a blue line pattern, 80 deg angle with
line width 2
------------------------------------------------
Coordinates:
+-----------+(x2,y2)
|////////// |
|///////// |
|//////// |
|/////// |
|////// |
|///// |
|//// |
|///\ |
|// | angle|
|/ / |
(x1,y1)+-----------+
------------------------------------------------
Cite As
Stefan Billig (2026). linpat.m (https://www.mathworks.com/matlabcentral/fileexchange/6686-linpat-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > 2-D and 3-D Plots > Line Plots >
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
