why the curve in preview box not same as the original one ?

조회 수: 1 (최근 30일)
noura
noura 2024년 4월 28일
댓글: DGM 2024년 4월 28일
  댓글 수: 2
Torsten
Torsten 2024년 4월 28일
Seems the curve is reflected on the x-axis.
DGM
DGM 2024년 4월 28일
The y-axis direction is reversed, but grabit is plotting the captured points normally. To make matters worse, you calibrated off the axes ruler endpoints (as instructed), which means your calibration is wrong. The x-axis ruler does not span [-20 15]. The y-axis ruler does not span [-2.5 0.5].
In fact, the y-ticks aren't evenly spaced. Is that truly nonlinear? Is it an error? Is it just a fake graph? Given that the spacing is not only nonuniform, but nonmonotonic, I'm going to have to assume that this isn't actually real data or a real graph.
y = [0.2 0 -0.5 -1 -1.5 -2];
dy = abs(diff(y)); % data units between ticks
dypx = [51 123 102 142 120]; % the pixels between ticks
dypx./dy % pixels per data unit in y-direction
ans = 1x5
255 246 204 284 240
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
When grabit tells you to pick the origin and maximum, don't pick the origin and maximum. Pick the most extreme tick marks that have known values. Otherwise, you're just guessing.
When you do, it'll render the curve right-side up, because that's the way it works, and it will cut the preview off at the extreme tick marks, because that's the way it works. If it seems cumbersome and hard to use because you can't see what you're doing, then that's because it is.
That said, if the y-axis is not uniformly spaced, then the captured results are going to be wrong anyway. If it's a fake graph, then I don't understand why transcribing it is even important.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Exploration에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by