No BSD License  

Highlights from
hatch.m

3.75

3.8 | 8 ratings Rate this file 72 Downloads (last 30 days) File Size: 8.01 KB File ID: #2075
image thumbnail

hatch.m

by Iram Weinstein

 

07 Aug 2002 (Updated 07 Aug 2002)

Create cross-hatched filled regions.

| Watch this File

File Information
Description

This is an old file by Kirill K. Pankratov thaat used to be on the file exchange. I've updated it to run on Matlab 5+.

MATLAB release MATLAB 5.3.1 (R11.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (9)
29 Aug 2002 Steve Chiswell

Usefull m file. I often need hatched shading for b&w figures in journals. Hopefull this will do the job.
Took me a while to figure out how to run it

16 Oct 2003 Troy Goodson

I've done some limited testing of this
m-file with Matlab 6.5.0.196271 (R13.0.1)
and it's been working very well!
Thanks so much Iram!
Troy.

09 Feb 2005 Gene Smith

I have used this to create complex bar graphs. It took a while to figure out how to use it. My usage was

hdl = patch(x,y,'w','EdgeColor'.'k'); % using MATLAB "patch" to establish the border

hatch(hdl,[30,8,2],'b')

I did notice at cetain angles some of my small bars had the hash lines at strange angles.

10 Feb 2005 Dimitri Pavlidis  
06 Jul 2005 Joel Lindop

Very useful, thanks a lot!
One tiny change worth making: the function definition on the first line is missing its output variables. Change to:
function lh = hatch(obj,angle,color,style,step,width)
if you want access to the handle (lh).

17 Apr 2006 Bob Farrell

Now need to include 'v6' as first arg to bar function in order for demo to work. Even though this was exactly what I was looking for (and amazed that this isn't built in), I ended up not using it partly because I didn't understand why exactly horizontal or exactly vertical lines jump one pixel -- wasn't asthetic to my eye for manuscript quality.

30 Sep 2008 Martin Mul

Nice program, but i have one question:
If I hatch it hatches to one side of my graph. How do i manage to hatch also the other side of this graph?

23 Jun 2009 Scott Beaver

This didn't work for me-- the hatch lines would not rotate in my figures, and no hatch lines were drawn using "hatch demo." Perhaps an issue with my Linux_64 machine?

04 May 2011 Neil Dalchau

Generally works, but could not get the angle to work. I'm using Matlab on Windows 7, 32-bit.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
specialized Iram Weinstein 22 Oct 2008 06:46:58
plotting Iram Weinstein 22 Oct 2008 06:46:58
hatrched Iram Weinstein 22 Oct 2008 06:46:58
fill Iram Weinstein 22 Oct 2008 06:46:58
pankratov Iram Weinstein 22 Oct 2008 06:46:58
graph types Iram Weinstein 22 Oct 2008 06:46:58
graphics Iram Weinstein 22 Oct 2008 06:46:58
fill Katya 07 Jun 2010 15:03:02
fill liu 27 May 2011 03:41:51
fill niluthpol 24 Nov 2011 23:28:30
hatrched niluthpol 24 Nov 2011 23:28:38

Contact us at files@mathworks.com