Dr. Ottorino-Luca Pantani
2008-Jan-29 16:59 UTC
[R] on trellis.par.set/get (reproducing figures from Pinheiro & Bates)
Dear R users, I would like to exactly reproduce a figure like the 1.5 or 1.9 or 4.13 from the book Mixed effects models in S and S-Plus. Not for the sake of it, but because I have my own data I would like to plot in that fashion (no colors) If I write plot(ergoStool) I can get a good informative plot with colors, but I would like to have a B&W one instead. I've played a little with trellis.par.set managing to change some aspect of the appearance of the plot, for example with prove.theme<- list( dot.line = list(col = 1, lty = 3, lwd = 1), fontsize = list(text = 12, points = 10) ) trellis.par.set(prove.theme) plot(ergoStool) I also queried trellis.par.get by names(trellis.par.get()) but still I'm not able to figure out which are the parameters, if any, that control "pch" and "col" of the symbols. Any help is highly appreciated. -- Ottorino-Luca Pantani, Universit? di Firenze Dip. Scienza del Suolo e Nutrizione della Pianta P.zle Cascine 28 50144 Firenze Italia Tel 39 055 3288 202 (348 lab) Fax 39 055 333 273 OLPantani at unifi.it http://www4.unifi.it/dssnp/
Deepayan Sarkar
2008-Jan-29 18:45 UTC
[R] on trellis.par.set/get (reproducing figures from Pinheiro & Bates)
On 1/29/08, Dr. Ottorino-Luca Pantani <ottorino-luca.pantani at unifi.it> wrote:> Dear R users, > I would like to exactly reproduce a figure like the 1.5 or 1.9 or 4.13 > from the book > Mixed effects models in S and S-Plus. > Not for the sake of it, but because I have my own data I would like to > plot in that fashion > (no colors) > > > If I write > > plot(ergoStool) > > I can get a good informative plot with colors, but I would like to have > a B&W one instead.Have you tried trellis.device(color = FALSE) plot(ergoStool) -Deepayan
Dr. Ottorino-Luca Pantani
2008-Jan-30 08:37 UTC
[R] on trellis.par.set/get (reproducing figures from Pinheiro & Bates)
Deepayan Sarkar ha scritto:> On 1/29/08, Dr. Ottorino-Luca Pantani <ottorino-luca.pantani at unifi.it> wrote: > >> Dear R users, >> I would like to exactly reproduce a figure like the 1.5 or 1.9 or 4.13 >> from the book >> Mixed effects models in S and S-Plus. >> Not for the sake of it, but because I have my own data I would like to >> plot in that fashion >> (no colors) >> >> >> If I write >> >> plot(ergoStool) >> >> I can get a good informative plot with colors, but I would like to have >> a B&W one instead. >> > > Have you tried > > trellis.device(color = FALSE) > plot(ergoStool) > > -Deepayan > >Thanks once more for your help. It works but the symbols are not the same as reported in the book. Now, if I can push your patience a little further, how can I change the plot symbols ? -- Ottorino
Deepayan Sarkar
2008-Jan-30 16:30 UTC
[R] on trellis.par.set/get (reproducing figures from Pinheiro & Bates)
On 1/30/08, Dr. Ottorino-Luca Pantani <ottorino-luca.pantani at unifi.it> wrote:> Deepayan Sarkar ha scritto: > > On 1/29/08, Dr. Ottorino-Luca Pantani <ottorino-luca.pantani at unifi.it> wrote: > > > >> Dear R users, > >> I would like to exactly reproduce a figure like the 1.5 or 1.9 or 4.13 > >> from the book > >> Mixed effects models in S and S-Plus. > >> Not for the sake of it, but because I have my own data I would like to > >> plot in that fashion > >> (no colors) > >> > >> > >> If I write > >> > >> plot(ergoStool) > >> > >> I can get a good informative plot with colors, but I would like to have > >> a B&W one instead. > >> > > > > Have you tried > > > > trellis.device(color = FALSE) > > plot(ergoStool) > > > > -Deepayan > > > > > Thanks once more for your help. > It works but the symbols are not the same as reported in the book. > Now, if I can push your patience a little further, how can I change the > plot symbols ?The symbols happen to be controlled by the "superpose.symbols" setting; other than guessing from the names, this is also indicated by the output of show.settings() So to change it, you would do trellis.par.set(superpose.symbol = list(pch = <...>)) or some variant of this. -Deepayan
Maybe Matching Threads
- R code to reproduce (while studying) Bates & Watts 1988
- dividing a dataframe column by different constants
- Rearranging long tables, Sweave, xtable, LaTeX
- Is there in R a function equivalent to the mround, as found in most spreadsheets?
- substituting dots in the names of the columns (sub, gsub, regexpr)