[R] multiple lty on same panel in xyplot

Deepayan Sarkar deepayan.sarkar at gmail.com
Mon Aug 10 05:19:38 CEST 2009


On 8/7/09, Duncan Mackay <mackay at northnet.com.au> wrote:
> Hi RUsers
>
>  I like to keep the plots self contained and avoid changing the current
> device parameters by using the par.settings.
>  To see what I could achieve by using par settings I tried the following and
> several variants but could not get black points.
>
>  xyplot(yM + yF ~ x,
>         panel = panel.superpose,
>         type = c("l", "p"),
>         distribute.type = TRUE,
>         par.settings = list(superpose.line = list(lty = c(1,2),
>                                                   col = c("black","black")),
>                             superpose.points = list(pch = c(1,1), col =
> c("black","black")),

'superpose.points' should be 'superpose.symbol'.

A convenient shortcut is

   par.settings = simpleTheme(col = "black", lty = c(1, 2), pch = 1)

Try

str(simpleTheme(col = "black", lty = c(1, 2), pch = 1))

to see what that does.

-Deepayan

>                             plot.symbol = list(pch = c(1,1), col =
> c("black","black"))
>                             ),
>         key = list(text = list(c("male", "female")),
>                    lines = Rows(pset$superpose.line, 1:2),
>                    pch = 1,
>                    type = c("l", "p")))
>
>  What am I missing? Does the points reference refer to Grid settings?
>
>  Regards




More information about the R-help mailing list