Asked by Vance Blake
on 23 Aug 2019 at 14:32

Hello, I am trying to draw to circles using viscircles but some of the circles end up in random space instead of around the center coordiantes ive given them. Below is the code I am using to draw my circles and a picture of what is happening on the plot. Any help would be greatly appreciated

% draw exlcusion range circles b/w hormone seeds and hormone seeds

HS_kept_x = HS_kept(:, 1);

HS_kept_y = HS_kept(:, 2);

LengthHS_kept = length(HS_kept);

radii_node2 = 8;

hold on

for i = 1:n

centers_node5 = [x(i), y(i)];

elim_circles3(i) = viscircles(centers_node5, radii_node2, 'color', 'k', 'linestyle', '--');

end

for j = 1:LengthHS_kept

centers_HS_kept = [HS_kept_x(j), HS_kept_y(j)];

elim_circles4(j) = viscircles(centers_HS_kept, radii_node2, 'color', 'k', 'linestyle', '--');

end

Opportunities for recent engineering grads.

Apply Today
## 20 Comments

## Adam Danz (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_738342

## Vance Blake (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_738616

## Adam Danz (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_738623

## Vance Blake (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_738648

## Adam Danz (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_738650

## Vance Blake (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_738849

## Adam Danz (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_738851

## Vance Blake (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739105

## Adam Danz (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739154

## Vance Blake (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739166

## Adam Danz (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739196

## Vance Blake (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739226

## Adam Danz (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739259

## Vance Blake (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739284

## Adam Danz (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739292

## Vance Blake (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739447

## Adam Danz (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739456

## Vance Blake (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739580

## Vance Blake (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739931

## Adam Danz (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/477335-using-viscircles-to-draw-circles-around-points#comment_739948

Sign in to comment.