ez.xyplot | R Documentation |
mimic xyplot with ggplot (slightly horizontally jittered)
ez.xyplot(
df,
cmd,
ylab = NULL,
xlab = NULL,
xangle = 0,
vjust = NULL,
hjust = NULL,
facet = "cols",
theme.apa = TRUE
)
df |
data frame in long format |
cmd |
like "y|x,g", "y|x z,g", or "y|x z a,g" where y is continous or discrete (e.g., dx), x z a are discrete, g is individual/grouping variable
|
ylab |
y label NULL |
xlab |
x label NULL |
xangle |
angle of x-axis text 0 |
vjust |
vjust of x-axis text NULL. hjust and vjust are only defined between 0 and 1, 0 means left-justified, 1 means right-justified |
hjust |
hjust of x-axis text NULL |
facet |
one of 'cols', 'rows', 'wrap' |
a ggplot object (+theme_apa() to get apa format plot), +scale_y_continuous(limits=c(-5,8),breaks=seq(-5,8,by=2),oob=scales::rescale_none)
see http://stackoverflow.com/a/31437048/2292993 for discussion
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.