drawing a circle

3 views (last 30 days)
lowcalorie on 23 May 2012
Answered: Chad Greene on 9 Dec 2014
please help i need to draw a green circle of radius 0.8 centered at x =2 , y=1.5 and display the result with the correct aspect ratio that is as a circle not an ellipse
then i need to fill the circle with gray and mark the center of the circle with a black X

Answers (2)

Image Analyst
Image Analyst on 23 May 2012
Make sure you set "axis square" or "axis equal" and call "hold on" before you call text() or plot() to put on the "X".
Oleg Komarov
Oleg Komarov on 23 May 2012
Have you checked the link? It has code examples.
Also do NOT double post.
Your post is NOT an emergency:
Walter Roberson
Walter Roberson on 23 May 2012
You do not actually need "hold on" before using text() or line() or patch() or a small number of other primitive calls. However, plot() is not a primitive call and you _do_ need "hold on" before using it to overlay data on the same axes.

Sign in to comment.

Chad Greene
Chad Greene on 9 Dec 2014
With circles
axis equal


Find more on 2-D and 3-D Plots in Help Center and File Exchange


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!