[R] LatticeExtra Parallel

Deepayan Sarkar deepayan.sarkar at gmail.com
Thu Jul 8 06:42:18 CEST 2010


On Tue, Jul 6, 2010 at 8:29 PM, Ben Wilkinson <bjlwilkinson at gmail.com> wrote:
> Thanks - that helps put the data on the same scale but it doesn't actually
> add the scale as it still shows min and max on the axis.

The scale maps from (min, max) -> (0, 1). You can compute and specify
tick positions and labels accordingly.

rng <- range(unlist(lapply(lapply(iris, as.numeric), range)))

prng <- pretty(rng)

parallel(iris, common.scale = TRUE,
         scales = list(x = list(at = (prng-min(rng))/diff(rng),
                                labels = prng)))

-Deepayan



>
> On Sun, Jul 4, 2010 at 10:49 PM, Deepayan Sarkar <deepayan.sarkar at gmail.com>
> wrote:
>>
>> On Sun, Jul 4, 2010 at 12:59 PM, Ben Wilkinson <bjlwilkinson at gmail.com>
>> wrote:
>> > I have put together a chart of 1,000 monthly data series using parallel
>> > and
>> > I really like the way it displays the data. Is there a way to achieve
>> > something similar in terms of display using the actual scale (
>> > consistently
>> > across all the data) as opposed to min/max ?
>>
>> You mean like
>>
>> parallel(iris, common.scale = TRUE)
>>
>> ?
>>
>> -Deepayan
>
>



More information about the R-help mailing list