On Sat, Apr 24, 2010 at 7:43 PM, Felix Andrews <fe...@nfrac.org> wrote:
> On 25 April 2010 08:41, Erich Studerus <erich.stude...@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

barchart(t(matrix(1:3,1:3)),horizontal=F,box.width=1,
         lattice.options = list(axis.padding = list(factor = 0.5)))

-Deepayan

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to