[R] Graphics and LaTeX documents with the same font [double-Y-axis graphs]
hadley wickham
h.wickham at gmail.com
Mon Oct 1 01:24:52 CEST 2007
> Thanks for trying this, Hadley, because the comparison
> is instructive in terms of the difference between the
> communication goals of analysis and presentation graphs.
Yes, and I think it's a difference that not enough people are familiar with.
> Actually, one should regard income as the independent variable,
> deaths as response, so what you want is
>
> > ggplot(csr, aes(y=deaths, x=income)) +
> + geom_path(colour="grey80") + geom_point()
> >
> but, instead of/in addition to geom_path, a bolder loess smooth
> would show the trend better.
+ geom_smooth()
will add a loess smooth to the above plot.
> This does, indeed show the inverse, and non-linear relation
> between welfare income and deaths more directly, a few outliers.
> Good for an analysis graph, but it fails the Interocular Traumatic
> Test for a presentation graph-- the message should hit you between
> the eyes.
But unless you trust the source of the presentation graph, one needs
the analysis graph to be sure that IOT isn't caused by manipulation of
the data.
Hadley
--
http://had.co.nz/
More information about the R-help
mailing list