4.0

4.0 | 2 ratings Rate this file 3 Downloads (last 30 days) File Size: 4.92 KB File ID: #6686
image thumbnail

linpat.m

by Stefan Billig

 

06 Jan 2005 (Updated 06 Jan 2005)

Plots line pattern in rectangular area at different angle, density etc.

| Watch this File

File Information
Description

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)+-----------+
 
  ------------------------------------------------

MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
15 May 2007 Matthias Brunner

Works well, except in log-plots. However, I'll use it!

03 Dec 2008 Patrick Osei Darko

please i need help on a project that i'm working on. I want to write a simple program using matlab to load the coordinate and heights from either excel or notepad for it to plot the coordinates and contour using the heights.also the legend must also appear.please Isimply dont know how to go about it or wher to start from .I urgently need your help.hoping to hear from you!

13 May 2009 Andras Czigany

I need to compare two stacked histogram in one chart. Because Matlab can not create a grouped AND stacked histogram, I made it overlaying them with different width. The result is still not visually comfortable so I needed something to distinguish, but no easy method exists for creating a pattern on a patch.
The hatch scripts here are producing bitmap data, so not comfortable for me.
Then I found this. Although it is treating the angle a bit strange for me (thats why its not 5/5), I am satisfied.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
annotation Stefan Billig 22 Oct 2008 07:39:17
customization Stefan Billig 22 Oct 2008 07:39:17
hatching Stefan Billig 22 Oct 2008 07:39:17
line pattern Stefan Billig 22 Oct 2008 07:39:17
plot Stefan Billig 22 Oct 2008 07:39:17
graphics Stefan Billig 22 Oct 2008 07:39:17
line pattern Andras Czigany 13 May 2009 09:33:53
fill Andras Czigany 13 May 2009 09:34:08
bar Andras Czigany 13 May 2009 09:34:23
plot Andras Czigany 13 May 2009 09:34:25

Contact us at files@mathworks.com