3
votes

I have some vector (matrix 2*64) points that I draw in a standard way on a compass plot.

compass(data)

This plot looks like this:

compass plot

Now I'm doing kmeans clustering on my data. After clustering I have a vector of 8 center points (x,y) that I want to draw on the same compass plot like a circle with some diameter R.

First thing I did was creating new compass layer on that plot using command:

compass(centers(:,1), centers(:,2), "o")

"markersize" property doesn't work here. The result of that plot is:

compass plot with center points

there are some small center circles visible (along with some points describing default arrow), but that is not what I need.

I need something like this: enter image description here

Is it possible to do that? Does octave (matlab) alows us to draw new objects of different types (circles) on existing plots?

1

1 Answers

4
votes

If you instead use an ordinary plot when you want to plot your circles it works fine.

% # Random data in [-1,1]
x = 2*rand(1,10)-1;
y = 2*rand(1,10)-1;

compass(x,y)
hold on
plot(x,y,'ok','MarkerSize',15,'LineWidth',3)

Compass plot with circles.