[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rudimentary tick positions
From: |
Michael Goffioul |
Subject: |
Re: rudimentary tick positions |
Date: |
Tue, 5 Feb 2008 15:00:57 +0100 |
On Tue, Feb 5, 2008 at 6:39 AM, Shai Ayal <address@hidden> wrote:
> Well, we already have get_axis_limits in graphics.cc which attempts to
> find the "nicest" limits, So the limits are probably "nice" by the
> time we get to calc_ticks. However I will look at them to see that
> they are "compatible" in the sense that they both agree on the meaning
> of "nice"
The auto-scaling should be aware of the current tick spacing, otherwise
you won't get nice results. For instance, look at the following screenshot
obtained with "plot(rand(1,100))". As you can see below, the xlim should
have been extended to [0,100] and ylim to [0,1]. OTOH, if limits mode
were manual, then the tick arrays should not have contained out-of-bounds
ticks (xticks/yticks should not contain 0 and yticks should not contain 1).
octave.exe:10> get(gca, 'xlim')
ans =
1 100
octave.exe:11> get(gca, 'ylim')
ans =
0.020000 0.980000
octave.exe:12> get(gca, 'xtick')
ans =
0 20 40 60 80 100
octave.exe:13> get(gca, 'ytick')
ans =
0.00000 0.20000 0.40000 0.60000 0.80000 1.00000
screenshot.gif
Description: GIF image
rudimentary tick positions, John W. Eaton, 2008/02/05