Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
scatter plot into shaded area

Subject: scatter plot into shaded area

From: J G

Date: 15 May, 2012 21:29:17

Message: 1 of 3

Suppose I have the following code:

scatter(a,b,'bo')
hold on
scatter(c,d,'r^')

which results in a scatter plot with two distinct regions of blue circles and red triangles. I now want to turn this into some sort of area plot, i.e. plot a line where the blue circles meet the red triangles and shade each area. Is there a simple way to find the coordinates of this line?

Thanks.

Subject: scatter plot into shaded area

From: ImageAnalyst

Date: 15 May, 2012 22:40:23

Message: 2 of 3

You mean like a voronoi diagram? Or something like TriScatteredInterp
to give "in between" locations "in between" colors that smoothly
vary? Why don't you post a picture somewhere (e.g. tinypic.com) that
shows what you have, and what you'd like to get.

Subject: scatter plot into shaded area

From: J G

Date: 15 May, 2012 23:03:06

Message: 3 of 3

Thanks for your help but I think using K = convhull(X,Y) solves my problem.

Tags for this Thread

No tags are associated with this thread.

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.

Contact us