How to plot a disc with a given center c and radius r

33 vues (au cours des 30 derniers jours)
Mourchid
Mourchid le 6 Jan 2016
Hi friends,
how can i draw a disc which is centered at (x0,y0), which has radius r and which is filled by color c, the circle should be colored in black.

Réponse acceptée

jgg
jgg le 6 Jan 2016
Modifié(e) : jgg le 6 Jan 2016
You can use this answer:
But instead of using h = plot(xunit, yunit); use h=fill(xunit,yunit,'k') instead.
The colour c is black 'k' above, but you can change it with a colour spec like this.

Plus de réponses (1)

Image Analyst
Image Analyst le 7 Jan 2016
Circles, discs, ellipses, arcs, etc. are all covered by the FAQ. See code samples in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by