[R] padding "bug" in lattice/levelplot

Paul Boutros paul.boutros at utoronto.ca
Fri Oct 17 16:48:30 CEST 2008


Thanks for the rapid response Deepayan -- that's what I was looking  
for.  Thanks also for your ongoing support of lattice, it's very much  
appreciated!
Paul

Quoting Deepayan Sarkar <deepayan.sarkar at gmail.com>:

> On 10/16/08, Paul Boutros <paul.boutros at utoronto.ca> wrote:
>> Hello,
>>
>>  I have encountered some unexpected behaviour with levelplot that may simply
>> be a misunderstanding on my part.
>>
>>  If I create a levelplot from a matrix with named columns, some "padding"
>> space appears at the top and bottom of the heatmap.  Here is an   
>> example, [...]
>
> This is because the named columns get treated as a factor, and cause
> the corresponding axis annotation code to be triggered. This isn't
> easy to fix without major changes. A simple workaround is to change
> the padding for factors in the call to levelplot:
>
> levelplot(data, lattice.options = list(axis.padding = list(factor = 0.5)))
>
> It may make sense for this to happen by default; I'll check if that
> has any potential drawbacks.
>
> -Deepayan
>



More information about the R-help mailing list