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 Center および File ExchangeData Exploration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by