How to draw a circle in a log-log plot?

7 visualizaciones (últimos 30 días)
Eneru Y
Eneru Y el 16 de En. de 2016
Comentada: Adam Danz el 24 de Mayo de 2019
Hello guys, I need to make a graph that shows two concentric circles of very different sizes. I need to draw a concentric circles in a log-log plot. How can I do?

Respuesta aceptada

Image Analyst
Image Analyst el 16 de En. de 2016
Use the FAQ to draw a circle, then exponentiate:
xCenter = 12;
yCenter = 10;
theta = 0 : 0.01 : 2*pi;
radius = 5;
x = radius * cos(theta) + xCenter;
y = radius * sin(theta) + yCenter;
xe = exp(x);
ye = exp(y);
loglog(xe, ye, 'LineWidth', 2);
axis square;
grid on;
hold on;
% Draw second circle
radius = 3;
x = radius * cos(theta) + xCenter;
y = radius * sin(theta) + yCenter;
xe = exp(x);
ye = exp(y);
loglog(xe, ye, 'LineWidth', 2);
  2 comentarios
Eneru Y
Eneru Y el 17 de En. de 2016
Thank you very much!
Adam Danz
Adam Danz el 24 de Mayo de 2019
Any idea how to keep the transformed circles centered at the (xCenter, yCenter) coordinates?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by