setting axis limits weirdness
Ben Abbott
bpabbott at mac.com
Wed Sep 24 08:42:21 CDT 2008
On Sep 24, 2008, at 3:07 AM, Michael Goffioul wrote:
> On Tue, Sep 23, 2008 at 5:37 PM, Ben Abbott
> <benjamin.abbott at tqs.com> wrote:
>> hmmm ...
>>
>> I notice that a subsequent attempt to set the limits does work.
>>
>> x = [-0.1, 1.0];
>> y = [-0.7, 0.7];
>> figure (1, 'visible', 'off');
>> h = plot (x, y);
>> set (gca, 'xlim', x);
>> set (gca, 'ylim', y);
>> set (gca, 'xlim', x);
>> set (gca, 'ylim', y);
>> xlimits = get (gca, 'xlim')
>>
>> Looks like the limmode is switching to manual a bit late.
>
> The problem is that xlimmode is switched to manual
> after calling the updater (update_xlim). This updater is
> responsible for computing the tick marks, but when it
> is called, xlimmode is still auto. I think the fix would be
> to switch xxxmode properties before anything else in
> genprops.awk. This might have other unwanted side effects,
> but the only way to know is to try it.
>
> Ben or John, could you take care of the change (it's only
> moving 2 lines of code in genprops.awk, around line 341)?
>
> Michael.
Ok, I've built and verified the axis scaling works correctly.
Any thoughts on what the side effects might be?
Do you recommend we just proceed with a patch, and cross our
fingers? ;-)
Ben
More information about the Bug-octave
mailing list