[R] Lattice and Beamer

From: Doran, Harold <HDoran_at_air.org>
Date: Mon, 28 Jun 2010 13:28:42 -0400


Two things I think are some of the best developments in statistics and production are the lattice package and the beamer class for presentation in Latex. One thing I have not become very good at is properly sizing my visuals to look good in a presentation.

For instance, I have the following code that creates a nice plot (sorry, cannot provide reproducible data).

bwplot(testedgrade~person_measure|gender + ethnicity, pfile, layout=c(2,5), main = 'Distribution of Person Measure by Grade\n Conditional on Gender and Ethnicity (Math)',

                xlab = 'Grade')

Now inside my latex document using the beamer class for presentation I have the following

\begin{frame}
\frametitle{Distribution of Person Parameters by Grade Conditional on Gender and Ethnicity}
\begin{figure}[htb]
\centering
\fbox{\includegraphics[scale=.3]{personGenEthn.pdf}}
\end{figure}
\end{frame}

I use the scale argument here. I do this totally randomly. I first start with scale=.5. Then, I create the document and look at it. If it seems to fit, I keep it. If it's too big, I resize it until it looks good. There must certainly be a much better way to size these for specific use with latex presentations.

Any thoughts?

Harold

        [[alternative HTML version deleted]]



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. Received on Mon 28 Jun 2010 - 19:27:41 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Jun 2010 - 20:10:42 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive