using grabit with log scales

조회 수: 62 (최근 30일)
C.G.
C.G. 2020년 12월 1일
댓글: KHANDOKER NUZHAT ISLAM 2021년 1월 19일
I have used 'grabit' from the matlab file exchange, to extract the data from a published graph to compare with my own data.
The graph I am using has log scales on both the X and Y axis (pic attached). I have managed to recreate this in MATLAB with a linear scale (pic attached). Is there a way to get this back to a log scale to compare with my data properly?

채택된 답변

Tarunbir Gambhir
Tarunbir Gambhir 2020년 12월 4일
편집: Tarunbir Gambhir 2020년 12월 4일
There is not any support for image with log-scale in GRABIT yet. However, as a workaround you could do the following.
For this particular image, in GRABIT, set the origin of the x-axis as 1 ( for 10^1) and the max of x-axis as 5 (for 10^5). Similarly for y-axis, set the origin as -2 ( for 10^-2) and the max of y-axis as 1 (for 10^1). After getting the points, you could do the following to get the same plot on a log-scale:
load('Data001.mat','Data001');
x = Data001(:,1);
y = Data001(:,2);
% convert the points to linear-scale
x = 10.^x;
y = 10.^y;
% plotting the points on the log-scale
loglog(x,y);
  댓글 수: 2
C.G.
C.G. 2020년 12월 4일
Thank you this method worked well!
KHANDOKER NUZHAT ISLAM
KHANDOKER NUZHAT ISLAM 2021년 1월 19일
I tried this method, but this is not working for me. I am not getting expected values on the y-axis which has the log scale. Maybe I am missing something?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by