|
From: | Ben Abbott |
Subject: | [Octave-bug-tracker] [bug #30950] wrong axes ranges in imagesc(x, y, z) |
Date: | Fri, 03 Sep 2010 01:19:59 +0000 |
User-agent: | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Safari/533.4 |
Update of bug #30950 (project octave): Status: None => Patch Submitted Assigned to: None => bpabbott _______________________________________________________ Follow-up Comment #1: I've experimented with Matlab and found that the axis limits should be ... c = size (z, 2); xlim = 0.5 * ((x(end) - x(1)) * c / (c - 1) * [-1, 1] + (x(1) + x(end))); r = size (z, 1); ylim = 0.5 * ((y(end) - y(1)) * r / (r - 1) * [-1, 1] + (y(1) + y(end))); This works for both equi-space x/y vectors and for sorted random x/y vectors. I've attached a changeset. Testing would be appreciated. (file #21378) _______________________________________________________ Additional Item Attachment: File name: changeset.patch Size:1 KB _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30950> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |