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

조회 수: 4 (최근 30일)
Eneru Y
Eneru Y 2016년 1월 16일
댓글: Adam Danz 2019년 5월 24일
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?

채택된 답변

Image Analyst
Image Analyst 2016년 1월 16일
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
Eneru Y
Eneru Y 2016년 1월 17일
Thank you very much!
Adam Danz
Adam Danz 2019년 5월 24일
Any idea how to keep the transformed circles centered at the (xCenter, yCenter) coordinates?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by