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

3 次查看(过去 30 天)
  2 个评论
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 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by