#LyX file created by tex2lyx 2.0.8.1
\lyxformat 413
\begin_document
\begin_header
\textclass beamer
\begin_preamble
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Filename: template.Rnw
% Author: Paul Johnson
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\sfdefault}{lmss}
\renewcommand{\ttdefault}{lmtt}
\usepackage{listings}
\usepackage{url}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{Sweavel}\newenvironment{topcolumns}{\begin{columns}[t]}{\end{columns}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{dcolumn}\usepackage{booktabs}\usepackage{multicol}
% use 'handout' to produce handouts
%\documentclass[handout]{beamer}
\usepackage{wasysym}\usepackage{pgfpages}\newcommand{\vn}[1]{\mbox{{\it #1}}}\newcommand{\vb}{\vspace{\baselineskip}}\newcommand{\vh}{\vspace{.5\baselineskip}}\newcommand{\vf}{\vspace{\fill}}\newcommand{\splus}{\textsf{S-PLUS}}\newcommand{\R}{\textsf{R}}
\usepackage{listings}\lstset{tabsize=2, breaklines=true,style=Rstyle}
\usetheme{Antibes}
%Switch comment character to turn on/off \pause commands given as \pausealt
%\newcommand{\pausealt}{\par }
\newcommand{\pausealt}{\pause}
\usepackage{color}\definecolor{gray1}{gray}{0.75}
\newlength{\figurewidth}
\figurewidth \textwidth % This is for rectangular graphs
\newlength{\figurewidthB}
\figurewidthB .7\textwidth % This is for square graphs
\expandafter\def\expandafter\insertshorttitle\expandafter{%
\insertshorttitle\hfill\insertframenumber\,/\,\inserttotalframenumber}
%=============================================================================
%
\title[Plotting II] % (short title, use only with long paper titles)
{Plotting II}
\subtitle{Important Ingredients in the Best Plot Recipes}
\author[Johnson] {Paul E. Johnson\inst{1,2}}
\institute[University of Kansas]{\inst{1} Department of Political Science \\
University of Kansas \and \inst{2}Center for Research Methods and Data Analysis \\ University of Kansas} % (optional, but mostly needed)
[2013] % (optional, should be abbreviation of conference name)
{2013}
\subject{Plotting (2)}
%=============================================================================
%=============================================================================
\end_preamble
\use_default_options false
\language english
\language_package none
\inputencoding utf8
\fontencoding T1
\font_roman lmodern
\font_sans lmss
\font_typewriter lmtt
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\paperfontsize 11
\spacing single
\use_hyperref 0
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\use_mhchem 0
\use_mathdots 0
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date true
\use_refstyle 0
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
% In document Latex options:
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
fvset
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
listparameters=
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
setlength{
\backslash
topsep}{0em}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset FormulaMacro
\def\Sweavesize {\scriptsize}
\end_inset
\begin_inset FormulaMacro
\def\Rcolor {\color{black}}
\end_inset
\begin_inset FormulaMacro
\def\Rbackground {\color[gray]{0.95}}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-Roptions.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
titlepage
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%=============================================================================
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Outline
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand tableofcontents
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%=============================================================================
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
section{Saving Plots}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
The Screen as an Output Device
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
You make a nice plot and view it on the screen.
\end_layout
\begin_layout Itemize
The
\begin_inset Quotes eld
\end_inset
window
\begin_inset Quotes erd
\end_inset
is a device, as far as R is concerned.
\end_layout
\begin_layout Itemize
You can create more than one plotting device. Try:
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-sav10.lyx"
\end_inset
or
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-sav15.lyx"
\end_inset
That should create a new
\begin_inset Quotes eld
\end_inset
screen
\begin_inset Quotes erd
\end_inset
device and the next plot command you run will draw on it.
\end_layout
\begin_layout Itemize
Possible to have several devices, and alternate among them.
\end_layout
\begin_layout Itemize
What's my current device? Run:
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-sav20.lyx"
\end_inset
\end_layout
\begin_layout Itemize
Related functions:
\begin_inset Quotes eld
\end_inset
dev.next()
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
dev.set()
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
dev.off()
\begin_inset Quotes erd
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
A Printer is also a Device
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Send the current device's output to the default printer
\end_layout
\begin_deeper
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-sav30.lyx"
\end_inset
\end_layout
\end_deeper
\begin_layout Itemize
Here's our major problem. If the screen device is a different size & shape, then copying or printing it to another device & shape will usually create a ugly result.
\end_layout
\begin_layout Itemize
Users frequently note that a plot looks great if they draw it on a 8 inch by 6 inch plot, but when they try to print that in a smaller section of paper, the result is horrible.
\end_layout
\begin_layout Itemize
Furthermore, on-screen devices do not always gracefully resize when we stretch and resize them.
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
% _____________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Save pdf, postscript, png, etc
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Things we call
\begin_inset Quotes eld
\end_inset
file types
\begin_inset Quotes erd
\end_inset
or
\begin_inset Quotes eld
\end_inset
formats
\begin_inset Quotes erd
\end_inset
are
\series bold
devices
\series default
in R.
\end_layout
\begin_layout Itemize
Recall the
\begin_inset Quotes eld
\end_inset
window
\begin_inset Quotes erd
\end_inset
where you see the graph is a
\begin_inset Quotes eld
\end_inset
device
\begin_inset Quotes erd
\end_inset
in the eyes of R.
\end_layout
\begin_layout Itemize
Problems arise translating
\begin_inset Quotes eld
\end_inset
that
\begin_inset Quotes erd
\end_inset
device into a file-formatted device.
\end_layout
\begin_deeper
\begin_layout Itemize
Screen devices are generally
\begin_inset Quotes eld
\end_inset
square
\begin_inset Quotes erd
\end_inset
, say 7
\begin_inset Quotes erd
\end_inset
by 7
\begin_inset Quotes erd
\end_inset
\end_layout
\begin_layout Itemize
A screen device output sized for 7
\begin_inset Quotes erd
\end_inset
x 7
\begin_inset Quotes erd
\end_inset
will look bad if it is written into a 6 inch x 4 inch output device.
\end_layout
\begin_layout Itemize
This is a major problem with Rstudio, because it constrains the graphic device to be a particular rectangle on the screen.
\end_layout
\end_deeper
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%__________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Many Devices Are Available
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Today, I almost always save in
\family typewriter
pdf
\family default
or
\family typewriter
png
\family default
devices.
\family typewriter
pdf
\family default
is scalable,
\family typewriter
png
\family default
is for web pages.
\end_layout
\begin_layout Itemize
Many other excellent devices exist, I'm considering studying up on
\family typewriter
svg
\family default
or
\family typewriter
tikz
\family default
\end_layout
\begin_layout Itemize
\family typewriter
xfig
\family default
device creates output that can be revised in xfig (Godfather of free line art software). That's useful sometimes.
\end_layout
\begin_layout Itemize
\family typewriter
pdf
\family default
is now R's default recommendation (was postscript when I started)
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Ask your system what it has.
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Run
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-sav50.lyx"
\end_inset
should list the base devices and some other possibilities your system
\emph on
might
\emph default
have.
\end_layout
\begin_layout Itemize
Check your particular system for extra devices.
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-sav55.lyx"
\end_inset
Today I see
\end_layout
\begin_layout Standard
\begin_inset FormulaMacro
\def\Sweavesize {\scriptsize}
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{Schunk}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{Soutput}
\end_layout
\end_inset
jpeg png tiff tcltk X11 aqua http/ftp sockets TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE libxml fifo cledit iconv NLS profmem cairo TRUE TRUE TRUE TRUE TRUE TRUE TRUE
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{Soutput}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{Schunk}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_____________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
\begin_inset Quotes eld
\end_inset
But I Can Just Point and Click,
\begin_inset Quotes erd
\end_inset
you say...
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
Almost all of my students don't pay attention to me on this. They use a
\begin_inset Quotes eld
\end_inset
graphical environment
\begin_inset Quotes erd
\end_inset
with a pull down menu
\begin_inset Quotes eld
\end_inset
File Save As
\begin_inset Quotes erd
\end_inset
. I say STOP that.
\end_layout
\begin_layout Standard
Why?
\end_layout
\begin_layout Itemize
\series bold
Quality
\series default
The result will be bad if the output device shape and size is not similar to the screen device. Better to create a
\begin_inset Quotes eld
\end_inset
certain
\begin_inset Quotes erd
\end_inset
sized device and let R write on it.
\end_layout
\begin_layout Itemize
\series bold
Reproducibility
\series default
: Pointing and Clicking does not equal reproducible output. You can't
\begin_inset Quotes eld
\end_inset
give
\begin_inset Quotes erd
\end_inset
that to students & co-authors
\end_layout
\begin_layout Itemize
\series bold
Speed
\series default
: Suppose you need to scan through 200 datasets and make 3 plots each. Do you really want to point-and-click through there? Really?
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
The Step-by-Step Procedure
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
Your Code will
\end_layout
\begin_layout Enumerate
Create an output device (pdf, png, etc)
\end_layout
\begin_layout Enumerate
Run the commands that create the figure (will not show on the screen)
\end_layout
\begin_layout Enumerate
Turn off the device in order to finish off the file.
\end_layout
\begin_layout Standard
While you are
\begin_inset Quotes eld
\end_inset
experimenting
\begin_inset Quotes erd
\end_inset
with code, don't execute code in steps 1 and 3, so you can see output on screen. If you see my example code with
\family typewriter
if (SAVEME) pdf(file = "somefile.pdf", ...)
\family default
, you will know what what I mean.
\end_layout
\begin_layout Standard
Check WorkingExample scripts like
\begin_inset Quotes eld
\end_inset
glm-logit-unbalanced-1.R
\begin_inset Quotes erd
\end_inset
or
\begin_inset Quotes eld
\end_inset
glm-logit-compareLinks-1.R
\begin_inset Quotes erd
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Save Files from the R Script
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
I try to remember to have this
\begin_inset Quotes eld
\end_inset
boiler plate
\begin_inset Quotes erd
\end_inset
at the top of every R program that I write when I might need to save graphs
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-009.lyx"
\end_inset
\end_layout
\begin_layout Itemize
These set my taste for the
\begin_inset Quotes eld
\end_inset
postscript
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
pdf
\begin_inset Quotes erd
\end_inset
output devices.
\end_layout
\begin_layout Itemize
\emph on
IF
\emph default
I remember those, then saving a file is not so tedious.
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Explain those arguments
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Description
\begin_inset ERT
status collapsed
\begin_layout Standard
horizontal = FALSE
\end_layout
\end_inset
: I prefer
\begin_inset Quotes eld
\end_inset
portrait
\begin_inset Quotes erd
\end_inset
output
\end_layout
\begin_layout Description
\begin_inset ERT
status collapsed
\begin_layout Standard
onefile = FALSE
\end_layout
\end_inset
: Don't try to put all plots into a single file (I want separate images in separate files)
\end_layout
\begin_layout Description
\begin_inset ERT
status collapsed
\begin_layout Standard
onefile = FALSE
\end_layout
\end_inset
: vital for postscript devices. Otherwise, no bounding box is included and the result is not true EPS (Encapsulated Postscript)
\end_layout
\begin_layout Description
\begin_inset ERT
status collapsed
\begin_layout Standard
paper = "special"
\end_layout
\end_inset
: Helps with pdf output. Otherwise, it assumes all pdf images are full page size
\end_layout
\begin_layout Description
family="Times" : I prefer to see figures with fonts that match the text.
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Typical Experience
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
First, begin with the process of creating a graph. Run it on screen until you get it right, and then
\begin_inset Quotes eld
\end_inset
wrap
\begin_inset Quotes erd
\end_inset
your commands in this way:
\end_layout
\begin_deeper
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-posts10.lyx"
\end_inset
\end_layout
\end_deeper
\begin_layout Itemize
BIG WARNING 1. If you
\begin_inset Quotes eld
\end_inset
turn on
\begin_inset Quotes erd
\end_inset
the file device, you will not get to see the output on the screen in the R graphic device.
\end_layout
\begin_layout Itemize
BIG WARNING 2. If you
\begin_inset Quotes eld
\end_inset
turn on
\begin_inset Quotes erd
\end_inset
an output device, and forget to run dev.off(), you will cause lots of trouble for yourself. Try it and see.
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%___________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
If You Forget the Boilerplate
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
You omit pdf.options, then you need to write in details each time, e.g.
\end_layout
\begin_deeper
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pdf30.lyx"
\end_inset
\end_layout
\end_deeper
\begin_layout Itemize
Instead of
\end_layout
\begin_deeper
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pdf31.lyx"
\end_inset
\end_layout
\end_deeper
\begin_layout Itemize
Even if you did set pdf.options, you can customize
\end_layout
\begin_deeper
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pdf32.lyx"
\end_inset
\end_layout
\end_deeper
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%___________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Conditionalize Code To Make This Less Tedious
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Do your on-screen work like this
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-014.lyx"
\end_inset
\end_layout
\begin_layout Itemize
To save figures in files, change
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{verbatim}
\end_layout
\end_inset
SAVEME <- TRUE
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{verbatim}
\end_layout
\end_inset
\end_layout
\begin_deeper
\begin_layout Standard
and then run the whole script over again.
\end_layout
\end_deeper
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%______________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Another Way To Make This Less Tedious
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Let R number the figures for you.
\end_layout
\begin_layout Itemize
Put this in the program BEFORE creating plots
\end_layout
\begin_deeper
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-015.lyx"
\end_inset
\end_layout
\end_deeper
\begin_layout Itemize
When finished, tell R to stop creating output files.
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-016.lyx"
\end_inset
\end_layout
\begin_layout Itemize
When you run this program, no graphs will
\begin_inset Quotes eld
\end_inset
show on the screen.
\begin_inset Quotes erd
\end_inset
\end_layout
\begin_layout Itemize
Each graph you draw will go in a separate file,
\family typewriter
myfile001.pdf
\family default
,
\family typewriter
myfile002.pdf
\family default
,
\family typewriter
myfile003.pdf
\family default
.
\end_layout
\begin_layout Itemize
The downside here is that all figures have to have same height, width
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_______________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Example Code that Writes a Bunch of Figures
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pdf70.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%___________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
section{Layout}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Brief Note on par
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Many settings that affect graphs are sitting
\begin_inset Quotes eld
\end_inset
out there
\begin_inset Quotes erd
\end_inset
in memory
\end_layout
\begin_layout Itemize
To see them, run
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-018.lyx"
\end_inset
\end_layout
\begin_layout Itemize
To see a particular one, run
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-019.lyx"
\end_inset
\end_layout
\begin_layout Itemize
To set one, run
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-020.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_______________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Brief Note on par
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Danger: those settings will remain in effect for the duration of the device.
\end_layout
\begin_layout Itemize
When you close that device, all of the changes are
\begin_inset Quotes eld
\end_inset
forgotten
\begin_inset Quotes erd
\end_inset
and par() for that device reverts.
\end_layout
\begin_deeper
\begin_layout Itemize
Need to re-run if you change devices
\end_layout
\begin_layout Itemize
Many people recommend getting in the routine of saving par settings and replacing them when done.
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-021.lyx"
\end_inset
\end_layout
\begin_layout Itemize
Seems somewhat unnecessary to me because you can close the device and
\begin_inset Quotes eld
\end_inset
start fresh
\begin_inset Quotes erd
\end_inset
\end_layout
\end_deeper
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%___________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
par: mfcol and mfrow
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Either of these will cause R to subdivide a plotting device into 3 rows
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-022.lyx"
\end_inset
\end_layout
\begin_layout Itemize
Either of these will subdivide a plotting device into 3 rows, 2 columns
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-023.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_______________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
mfrow fills rows, mfcol fills columns
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
The order of
\begin_inset Quotes eld
\end_inset
drawing
\begin_inset Quotes erd
\end_inset
is the difference between mfcol and mfrow
\end_layout
\begin_layout Itemize
Suppose 6 plots are A, B, C, D, E, F
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{topcolumns}
\end_layout
\end_inset
\end_layout
\begin_layout Column
6cm
\end_layout
\begin_layout Description
mfcol fills the columns first
\begin_inset Tabular
\begin_inset Text
\begin_layout Standard
A
\end_layout
\end_inset
|
\begin_inset Text
\begin_layout Standard
D
\end_layout
\end_inset
|
\begin_inset Text
\begin_layout Standard
B
\end_layout
\end_inset
|
\begin_inset Text
\begin_layout Standard
E
\end_layout
\end_inset
|
\begin_inset Text
\begin_layout Standard
C
\end_layout
\end_inset
|
\begin_inset Text
\begin_layout Standard
F
\end_layout
\end_inset
|
\end_inset
\end_layout
\begin_layout Column
6cm
\end_layout
\begin_layout Description
mfrow fills the rows first
\end_layout
\begin_deeper
\begin_layout Standard
\begin_inset Tabular
\begin_inset Text
\begin_layout Standard
A
\end_layout
\end_inset
|
\begin_inset Text
\begin_layout Standard
B
\end_layout
\end_inset
|
\begin_inset Text
\begin_layout Standard
C
\end_layout
\end_inset
|
\begin_inset Text
\begin_layout Standard
D
\end_layout
\end_inset
|
\begin_inset Text
\begin_layout Standard
E
\end_layout
\end_inset
|
\begin_inset Text
\begin_layout Standard
F
\end_layout
\end_inset
|
\end_inset
\end_layout
\end_deeper
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{topcolumns}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_______________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Example: to fit horizontal screen
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-mfcol10.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_______________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-mfcol10.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_______________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
When you are finished...
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
Either:
\end_layout
\begin_layout Itemize
Reset the option manually
\end_layout
\begin_deeper
\begin_layout Standard
par(mfcol=c(1,1))
\end_layout
\end_deeper
\begin_layout Itemize
Or close the device
\end_layout
\begin_deeper
\begin_layout Standard
dev.off()
\end_layout
\end_deeper
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Some R Functions Use
\family typewriter
mfcol
\family default
Behind the Scenes
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Suppose you have a factor variable like
\begin_inset Quotes eld
\end_inset
race
\begin_inset Quotes erd
\end_inset
or
\begin_inset Quotes eld
\end_inset
sex
\begin_inset Quotes erd
\end_inset
\end_layout
\begin_layout Itemize
coplot generates separate plot for each value of the factor
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-025.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_______________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
R's Layout() Function Offers More Control
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Check the current layout:
\end_layout
\begin_deeper
\begin_layout Standard
\family typewriter
"layout.show(1)"
\family default
\end_layout
\begin_layout Standard
It should put a numeral
\begin_inset Quotes eld
\end_inset
1
\begin_inset Quotes erd
\end_inset
on a screen device.
\end_layout
\end_deeper
\begin_layout Itemize
layout wants you to specify an R matrix to
\end_layout
\begin_deeper
\begin_layout Itemize
divide the space by rows and columns, and
\end_layout
\begin_layout Itemize
let R know which figure will be drawn in which area
\end_layout
\end_deeper
\begin_layout Itemize
Stupid example
\end_layout
\begin_deeper
\begin_layout Standard
\begin_inset Formula \begin{equation}
mymat=\left[\begin{array}{cc}
1 & 1\\
1 & 1 \\
\end{array}\right]\end{equation}
\end_inset
\end_layout
\begin_layout Standard
Meaning: divide my plotting area into 4 parts, but let figure
\begin_inset Quotes eld
\end_inset
1
\begin_inset Quotes erd
\end_inset
use all 4 parts.
\end_layout
\end_deeper
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-layout10.lyx"
\end_inset
\begin_inset Graphics
filename plots/t-layout10.pdf
special totalheight=65mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%______________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-layout11.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%___________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-layout20.lyx"
\end_inset
\begin_inset Graphics
filename plots/t-layout20.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
R Squishes the Figures to Fit!
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-layout21.pdf
special totalheight=65mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Layout 5 images in a
\begin_inset Quotes eld
\end_inset
rainbow
\begin_inset Quotes erd
\end_inset
shape
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Formula \begin{equation}
mymat=\left[\begin{array}{ccc}
1 & 1 & 1\\
2 & 0 & 3\\
4 & 0 & 5\end{array}\right]\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-layout30.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_______________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
You Need 5 Plots for 5 Indicated Spaces
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-layout31.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Voila
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset Graphics
filename plots/t-layout31.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_______________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Cautionary Comment about Layout
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Layout affords the ability to fill a page with an arbitrarily complicated array of figures.
\end_layout
\begin_layout Itemize
I worry that some of this effort is wasted because some/many journals do not want a full page layout of graphs. If they will give you the space at all, they probably want the individual figures in separate graphs that can be arranged according to their style.
\end_layout
\begin_layout Itemize
Exception would be layout used to link together inseparable drawings, e.g.
\begin_inset Quotes eld
\end_inset
rug
\begin_inset Quotes erd
\end_inset
plots below scatterplots.
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%___________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
section{Lattice Layouts}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Trellis Graphics with the lattice Package
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Trellis graphics in S/S+ are highly prized (natural scientists especially)
\end_layout
\begin_layout Itemize
Main idea: make it easy/simple to create many plots that subdivide a sample and illustrate for subgroups (coplot, but a fully worked out framework)
\end_layout
\begin_layout Itemize
Deepayan Sarkar contributed the lattice package for R
\end_layout
\begin_layout Itemize
Some see lattice graphs as a complete replacement for existing 2D plotting framework (e.g., Doug Bates).
\end_layout
\begin_layout Itemize
I am more cautious, possibly because
\end_layout
\begin_deeper
\begin_layout Itemize
lattice graphics came along after I had mastered the others
\end_layout
\begin_layout Itemize
seems tougher to get individual pieces
\begin_inset Quotes eld
\end_inset
just right
\begin_inset Quotes erd
\end_inset
\end_layout
\begin_layout Itemize
see previous concern about difficulty of layout in publication.
\end_layout
\end_deeper
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%___________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
xyplot is the workhorse generic function
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
xyplot will accept a formula and figure out what to do with it.
\end_layout
\begin_layout Itemize
After a vertical bar, | , factors indicate desired subgroups.
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
% _______________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-xyplot10.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-xyplot11.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_____________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-lathist30.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-lathist31.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_____________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-lathist40.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-lathist41.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_____________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-lathist50.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-lathist51.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_____________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-lathist60.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-lathist61.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_____________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
Appears we just need to cut some extreme values.
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-043.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_____________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-lathist70.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-lathist71.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%______________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-lathist80.lyx"
\end_inset
\begin_inset Graphics
filename plots/t-lathist81.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_____________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-lathist90.lyx"
\end_inset
\begin_inset Graphics
filename plots/t-lathist91.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
section{Plotmath}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
The plotmath Framework
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
R has a
\begin_inset Quotes eld
\end_inset
LaTeXlike
\begin_inset Quotes erd
\end_inset
math markup called
\begin_inset Quotes eld
\end_inset
plotmath
\begin_inset Quotes erd
\end_inset
\end_layout
\begin_layout Itemize
Create an R
\begin_inset Quotes eld
\end_inset
expression
\begin_inset Quotes erd
\end_inset
, then when plotted, math will appear!
\end_layout
\begin_layout Itemize
read
\family typewriter
?plotmath
\family default
\end_layout
\begin_layout Itemize
run
\family typewriter
example(plotmath)
\family default
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%__________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Simple example
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm10.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%__________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Simple example
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm11.pdf
special totalheight=65mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
A Few plotmath Tips
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Two Equal Signs (== outputs =)
\begin_inset ERT
status collapsed
\begin_layout Standard
%%
\backslash
item $
\backslash
[
\backslash
]$ marks subscripts, ^ for superscripts
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Want * to show? Type %*%
\end_layout
\begin_layout Itemize
Want
\begin_inset Formula $\cdot$
\end_inset
? Type cdot
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
The Only Really Big Gotcha Is...
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Blending calculations and math.
\end_layout
\begin_layout Itemize
This does not work:
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{Sinput}
\end_layout
\end_inset
x <- 10 text(4, 5, expression(paste("x is ", x)))
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{Sinput}
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Instead, a more elaborate procedure is required.
\end_layout
\begin_layout Itemize
One method is bquote
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
bquote example usage
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm20.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[containsverbatim]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm21.pdf
special totalheight=65mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%_______________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
I've Been Proposing This as a plotmath Example
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm91.pdf
special totalheight=70mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Set Parameters, Create
\begin_inset Formula $x$
\end_inset
,
\begin_inset Formula $y$
\end_inset
, Make Title
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90A.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Create Plot and axes
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90B.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[plain]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm92AB.pdf
special totalheight=70mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Label Lower Axis, Draw Line Across Range
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90C.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[plain]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm92C.pdf
special totalheight=70mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Mark Interval from mean to
\begin_inset Formula $\sigma$
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90D.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[plain]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm92D.pdf
special totalheight=70mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Create formula for Normal Distribution
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90E.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[plain]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm92E.pdf
special totalheight=70mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Write Left Side Critical Value Below Axis
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90F.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[plain]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm92F.pdf
special totalheight=70mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Use polygon to Shade the Area Under Curve on Left
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90G.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[plain]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm92G.pdf
special totalheight=70mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Make Calculations about Area on Left Side
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90H.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Write Annotation Above Shaded Area on Left
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90H2.lyx"
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[plain]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm92H.pdf
special totalheight=70mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Insert arrow and text from mean to
\begin_inset Formula $-1.96 \sigma$
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90I.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[plain]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm92I.pdf
special totalheight=70mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Shade right side critical region
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90J.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[plain]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm92J.pdf
special totalheight=70mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Gather data on right side shaded area
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90K.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
%
\backslash
begin{frame}[plain]
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>=
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% <>
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
% @
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%
\backslash
includegraphics[totalheight=65mm]{plots/t-pm92K}
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%
\backslash
end{frame}
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Annotate right shaded area
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90L.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[plain]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm92L.pdf
special totalheight=70mm
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%____________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
frametitle
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
{
\end_layout
\end_inset
Insert arrow from mean to
\begin_inset Formula $1.96 \sigma$
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
\begin_inset CommandInset include
LatexCommand input
preview false
filename "plots/t-pm90M.lyx"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%________________________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
begin{frame}
\end_layout
\end_inset
[plain]
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename plots/t-pm92M.pdf
special totalheight=70mm
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
end{frame}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
%__________________________
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Standard
% ==========================================================
\end_layout
\begin_layout Standard
\end_layout
\end_inset
\end_layout
\end_body
\end_document