Thread Subject: patch over lines

Subject: patch over lines

From: Darrel Robertson

Date: 25 Sep, 2009 20:08:03

Message: 1 of 3

I have some streamlines and quiver arrows I want to patch over the top of to block out values that are inside my structure. However neither patch nor fill actually get displayed over the top of the lines, even when I specifically tell uistack to place it on top. Is there a simple way to patch over the top of the lines, without resorting to regriding to avoid the structure (which in my case is complex)?

For a simple example:
w=load('wind');
i=10;
u=w.u(:,:,i); v=w.v(:,:,i); x=w.x(:,:,i); y=w.y(:,:,i);
pcolor(x,y,sqrt(u.^2+v.^2));shading('interp');colorbar
hold on;
quiver(x,y,u,v,'w-') % I now have a nice quiver plot
theta=0:pi/8:2*pi;
x2=100+10*sin(theta); y2=40+10*cos(theta); % a circle
h=patch(x2,y2,'k');

If you run this you can still see the quiver arrows which I want to hide behind the circle. I've tried stuff like 'uistack(h,'top')' but I can't seem to cover up the arrows. I also have streamlines and other data and a more complex shape so I don't want to regrid. Any idea how to cover the arrows graphically?

Subject: patch over lines

From: Jerome Briot

Date: 25 Sep, 2009 21:53:01

Message: 2 of 3

Hi,

w=load('wind');
i=10;
u=w.u(:,:,i); v=w.v(:,:,i); x=w.x(:,:,i); y=w.y(:,:,i);
pcolor(x,y,sqrt(u.^2+v.^2));shading('interp');colorbar
hold on;
quiver(x,y,u,v,'w-') % I now have a nice quiver plot
theta=0:pi/8:2*pi;
x2=100+10*sin(theta); y2=40+10*cos(theta); % a circle
z2 = ones(1,numel(theta));
h=patch(x2,y2,z2,'k');

Jerome

Subject: patch over lines

From: Darrel Robertson

Date: 29 Sep, 2009 13:45:17

Message: 3 of 3

Thanks! That was exactly what I needed.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
patch cover hid... Darrel Robertson 25 Sep, 2009 16:09:06
rssFeed for this Thread

Contact us at files@mathworks.com