[R] Lattice, ggplot, and pointsize

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Tue May 21 17:17:33 CEST 2013


That is like complaining that your hammer does not fit these newfangled Philips screws.

These are different tools. Do not expect them to interoperate.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Milan Bouchet-Valat <nalimilan at club.fr> wrote:

>Le mardi 21 mai 2013 à 23:30 +1000, Duncan Mackay a écrit :
>> Hi
>> 
>> See par.settings in xyplot
>> 
>> Things are also controlled by
>> trellis.par.get()
>> to see values
>> trellis.par.set()
>> 
>> eg
>> xyplot(~Freq|Year, data = sheep2,
>>             groups   = farm,
>>             par.settings = list(strip.background = list(col =
>"transparent"),
>>                                 axis.text = list(cex = 0.75),
>>                                 par.xlab.text = list(cex = 0.80),
>>                                 par.ylab.text = list(cex = 0.80)) ,
>...)
>> 
>> HTH
>Thanks, but that's not really my question. I've already found the way
>to
>change text size. What I'm wondering is whether something could be done
>so that the pointsize argument that is passed to graphical devices has
>an effect on Lattice and ggplot2 plots.
>
>
>Regards
>
>
>> Duncan
>> 
>> Duncan Mackay
>> Department of Agronomy and Soil Science
>> University of New England
>> Armidale NSW 2351
>> Email: home: mackay at northnet.com.au
>> 
>> 
>> 
>> At 21:18 21/05/2013, you wrote:
>> >Hi!
>> >
>> >When inserting R plots into a document using odfWeave, I fought for
>a
>> >while to get Lattice plots use the same text size as base plots. I
>> >eventually discovered that specifying a point size via e.g.
>> >svg(pointsize=10) has no effect on Lattice plots. One needs to
>adjust
>> >the size manually via:
>> >trellis.par.set(fontsize=list(text=10, points=8))
>> >
>> >This is also developed for both Lattice and ggplot2 by this blog
>post:
>> >http://gforge.se/2013/03/exporting-plain-lattice-or-ggplot/
>> >
>> >So I am wondering whether is a by-design limitation or whether this
>> >could be improved. I find it very useful to be able to adapt text
>size
>> >to the output device instead of changing plotting parameters for
>each
>> >plotting system (especially when you change the resolution of PNG
>> >output, or move from one output device to another).
>> >
>> >Thanks in advance
>> >
>> >______________________________________________
>> >R-help at 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.
>> 
>> ______________________________________________
>> R-help at 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.
>
>______________________________________________
>R-help at 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.



More information about the R-help mailing list