linpat.m

Plots line pattern in rectangular area at different angle, density etc.
1.1K Downloads
Updated 6 Jan 2005

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 (2024). linpat.m (https://www.mathworks.com/matlabcentral/fileexchange/6686-linpat-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Line Plots in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0