why the curve in preview box not same as the original one ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
2 Kommentare
DGM
am 28 Apr. 2024
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
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.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Exploration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!