graphicsand e.g. lattice and ggplot2 packages building on
grid) and most R user has a preference for either of them.
panderOptionsin which the user could specify e.g. a color palette or the font family to be used in all of his plots. But which library is used by most of R users? And how many potential users would I loose by choosing that only one?
ggplot2calls. This decision was a fast and promising one, the development was rather cumbersome.
parbefore the actual commands (and even the plotting functions of
evalsgot even more bloated. Well, I decided to take that trouble.
graph.unifyis enabled in
evalsOptions(disabled by default not to freak out newcomers). You can fine-tune (
panderOptions) the foreground, background and other color palettes, the global font size and even the font family used, the grid with optional minor ticks (even in
baseplots), the legend position and the angle of axis labels besides some other small tweaks.
I will only concentrate on the results below to keep this post short, if you would be interested in the sources, please check out the relevant branch on GitHub.
First, let us check out how a default histogram looks like in the major graphics packages applied to
Please note that I have passed
binwidth to the
ggplot2 call not to abuse the comparison.
Doing the same with
evals (what is the default if you are using pander’s custom brew engine) results in:
I hope you would find the above graphs pretty similar 🙂