How to hatch an area?

How to hatch an area?

Post by Armin Muel » Fri, 08 Jul 2005 03:56:39


Hi,

I'd like to hatch some area within a figure. There is a file called
"hatch.m" on file exchange, but that is a little bit outdated. Anybody
got something better?

Thanks!
Armin
 
 
 

How to hatch an area?

Post by PB » Fri, 08 Jul 2005 04:21:57


Hi Armin!

It works perfect for me in R14. Are there any features that you are
missing, or is it just that it was created using R11?

/PB

 
 
 

How to hatch an area?

Post by Armin Muel » Fri, 08 Jul 2005 17:49:57


Well, the 'demo' mode isn't running any more.

Even worse, the hatch angles change under some odd circumstances after
calling:

contourf(pymm, -pxmm, sqrt(vx'.^2+vy'.^2), 0:10:60);
colormap(1-gray)
set(gca, 'ydir', 'reverse')
xlabel('Y in mm');
ylabel('Z in mm');
axis equal
axis tight
hnd = patch([0 28 28 0], [0 0 -13 -13], 'w', 'EdgeColor', 'none');
hatch(hnd, 45, [0 0 0], '-', 8, 1)
hatch(hnd, -45, [0 0 0], '-', 8, 1) % This should be orthogonal!
text(-24, -5, '\phi=0)

But that's more due to the automatic scaling of MATLAB. How can I tell
that I don't want to give away much space, but I want a quadratic grid?

Thanks
Armin