[R] barchart in lattice 0.18-5

Deepayan Sarkar deepayan.sarkar at r-project.org
Sun Apr 25 05:32:05 CEST 2010

On Sat, Apr 24, 2010 at 7:43 PM, Felix Andrews <felix at nfrac.org> wrote:
> On 25 April 2010 08:41, Erich Studerus <erich.studerus at bli.uzh.ch> wrote:
>> Hello
>> After updating to R version 2.11.0, the xlim argument of the lattice
>> barchart function does no longer work as expected. For example, the
>> following code does not produce the same result in lattice lattice_0.18-3
>> and lattice_0.18-5
>> barchart(t(matrix(1:3,1:3)),horizontal=F,box.width=1,xlim=c(0.5,3.5))
>> In lattice_0.18-3, I could use xlim to remove the spaces between the left
>> y-axis and the first bar and between the right y-axis and the last bar. This
>> is no longer possible in lattice_0.18-5. Is this a bug?
> Yes, and it is my fault.
> I am testing a fix.

Note that the ``correct'' way to do this (that does not depend on the
numeric mapping of the categorical axis) would be

         lattice.options = list(axis.padding = list(factor = 0.5)))


More information about the R-help mailing list