-
-
Notifications
You must be signed in to change notification settings - Fork 5
Implementation Details
Under the hood this library utilises two hooks implemented in the plot.new()
function: before.plot.new
and plot.new
. Custom functions for changing the list of plotting parameters via par()
are appended to those hooks and are executed every time a new plot is created. This in turn forces the selected par()
values to be re-set again and again with each plot call, apparently making them permanent.
Currently 3 types of parameters can be implemented within themes:
- A subset of
par()
arguments that apply to single plots as opposed to multiple plots (likemfrow
). - Parameters specifying the border drawn around the plot (parameters starting with
rect.
) - Palette settings (parameters starting with
palette.
)
The best way to obtain all available parameters is by inspecting the internal structure of implemented themes like so:
pars <- basethme("clean")
The first 8 colors for all the available themes mimic the colors of the default palette by design. This choice is intentional and allows users to rely on col=1
always being "black" and col=2
always being red, etc. Even when a new theme and palette is chosen.
However the colors after the first 8 positions might be changed within the custom themes. For now color number 9 is always orange while color 10 is brown.